Hey its been a few weeks since we last spoke hows everything going?
What exactly is the first code supposed to do I see when I hook it up it shows me values that corresponds with the movement of my joy stick but where does the trapping come in at?
The arrows program fails to connect every time.
The third code was for joystick to arduino and back to my jazzy controller but it wont power up if I do not have the wires hooked up as they were before I cut them. I get seven blinking lights and then it powers off.
Help with any of these issues would be greatly appreciated. I'm new to this and its very disheartening to not see any results. Thanks
Okay, here goes. The joystick is powered by the arduino and no longer hooks up to the chair in any way. To control the chair the joystick is not even needed. I leave the joystick hooked up to my arduino in case I want to take over manual control from the arduino.
The 5v goes into the joystick and is passed back on three analog lines. One is a reference that never changes; it stays at 2.5v. The other two lines are the X and Y axis on the joystick. With the joystick in the untouched neutral position you should get 2.5v on each of them as well.
The arduino reads the analog line up to 5 volts (I think) this translates into a number between 0 at 0v and 1023 at 5v. 2.5v should read around 512.
The control stalk monitors the theee analog lines.
These power chairs are made for folks that can't move too well so they tend to be over-safe in their design. Any issue with the chair and they shut down.
If you turned on the chair while you were pushing on the joystick you could cause an injury. So if the stalk detects that the joystick is not in neutral then it will throw an error.
To turn on the chair you must have 2.5v on all three analog lines.
The PWM will put out up to 5v (I think) and is a range from 0 to 255 whit 0 at 0v and 255 at 5v.
To get 2.5v out of a PWM you need to send the signal 256, you may have to play with this number up or down a bit to gt it just right.
If you picture tapping a ballon into the air so that it stays afloat at eye level this is a bit like using PWM to holt a voltage. As the ballon falls you give it another tap. It will more or less stay in the same general area. This is not good enough for the Jazzy and it will detect a fault.
You must use a capacitor to act as a pool to hold power. This is more like keeping your hand under tha ballon to ensure it stays at the right level.
The capacitor will tend to float aroud a bit too as it gains or looses power. With a resistor to ground on the negative lead of the capacitor you can drain the pool at a predictable rate and level the whole thing out.
The resistor/capacitor circut is pretty common. I used a 1k resistor and a 16v 68uf capacitor. This was a completly random selection that just happened to work. (I am not an electronics person)
With the 2.5v on each analog line, and the wheel locks in the locked position you should be able to turn on your chair.
If the chair won't come on then the resistor/capacitor circut is too far out of spec or the 256 sent to the PWM needs to be adjusted a bit.
Looking at the PDF I attached you can see that X and Y have a set range. If you go out of the range the chair will show a fault and shut down.