Im trying to figure out a signal from a joystick. it is 2.5 volts at center. attached is a picture of the arduino oscilloscope program out there ( i dont have my own). the bottom is a standard pwm from a pic chip (hardware pwm) 50% at 3khz. above is the strange amplitude modulated pwm. to make matters worse. the signal is the same for left or right, but it is somehow reversed. hard to see it precisly because im using a makeshift Scope. anyone know what type of control signal this is? al I am doing is holding the joystick left and it produces that wave pwm seen.
in the top picture. when I do not hold the joystick left it is a flat line at 2.5vdc (about 512 on scale)
in the bottom it drops to 0 when not pusling
the scale of the picture is: 0 = 0Volts and 1023 = 5volts
the top type of pattern is usually caused by sampling at a lower rate then the signal you are measuring.
i believe it is caused by a sample rate problem. I need to use a real scope. Others on irc have suggested that this is caused by a sample rate.
the joystick is off a pride jazzy 614 hd powerchair
strange joystick. very strong. does not use POTS. Looks like it uses inductors or something to measure a magnetic field. there is a coil with 2 leads, connecting to the board, at the center of the joystick base that moves with the 'stick'. there are 4 smaller but similar coils (mounted on IC's of sometype) that somehow measure the distance of the center coil in relation to eachother. Hall Effect? i havent fully figured the circuit out. the joystick very complex. it also has the bulky charging port on it (charges Two 55Ah universal lead acid :)) i mention this becuase there two atmega8 chips on the joytick alone. and the joystick only has 4 wires going to the motor controller module (which has 1 "atmega2056 sized" microcontroller (unknown to me). so the whole chaire uses 3 microcontrollers all SPI'ed to eachother.
so the driver, im not sure yet. all i see is a quad comparator lm339, atmega8, and another tiny ic im not sure what it is(6pin IC).
i expected to crack this think open and see some logic level IC's in there, but it replaces many of those compents and uses the anolog and digital ports of the atmega, making it highly software driven
this is what is printed on the main micro-controller.
so if you know what this is off let me knpw. i is prolly a Atmel chip of some sort.
ps, these chairs have tons of safety checks. I basically have two choices here if I want to use the motor driver board that came with it. emulate the joystick, or slide into the SPI bus somehow. it is possible because Pride sells a Y-cable for attaching some ipod accessory, SO DUMB, basically its a bluetooth module that works in tandem with the joystick. joystick and/or ipod touchscreen control. so the main microcontroller already has custom firmware to allow other devices to "register" movements. But reverse enginering a SPI bus seems impossible.
so im working on emulating the joystick for now. does not provide me with TOTAL control, (joystick movents are limited, there 2 wheels 1 joystick) but enough to get me rolling.