LROBBINS wrote:First, to make sure we're talking about the same things, when we say Controller what we usually mean is the Power Module, while the Joystick Pod is the whole black case that contains joystick, switches, lights, circuitry and so on. I tend to call the joystick mechanism itself the joystick "pot", but I don't know what others call it.
LROBBINS wrote:In general, all ground connections should be, somewhere, connected together and on a 5V system there shouldn't be more than a millivolt-level difference from one ground pin to another- Because of impedance/resistance of the wires, there might be some slight difference between two ground pins, but one tries to engineer that out as it can cause no end of problems. The only situation in which one is likely to have different, not-connected-to-each-other, ground lines is if two circuits are isolated by something like an optocoupler.
LROBBINS wrote:I can not tell from your photo how the wires from the pod's circuit board and the wires from the pot are connected to each other, or how you could possibly have such a large difference measuring voltages respect to one ground line versus the other. Can you post a picture that shows the connections on that board, and another that shows what the connections were like in the original hookup between pot and circuit board? Or a schematic of both situations, or both the photo and schematic?
LROBBINS wrote:When you hook up the Arduino, you should be following the same rules: all grounds MUST be connected together unless you use optoisolaters, AREF of the Arduino should be connected to Vcc of the joystick, and you have to put a line in your program so that the Arduino uses that AREF for its measurements, if you are measuring the joystick position with the Arduino.
LROBBINS wrote:I get the impression, however, that you want to use the Arduino to supply voltages that mimic what the joystick would produce. Please think carefully about this. The Arduino does not have a digital-to-analog converter. The AnalogWrite function produces a PWM signal; a square wave with varying on and off times to (on average) approximate a steady intermediate voltage. That kind of signal might not be usable by the P&G electronics. You might be able to use an RC network to massively smooth that PWM signal, but you would probably want to program the Arduino to produce its PWM at a much higher switching frequency than its default. Better yet, you could feed the Arduino output to a real analog-to-digital converter chip, or if you want just a few values, use the digital output pins of the arduino to select among different voltage dividers.
woodygb wrote:lordk,
Are you attempting R/C of the wheelchair?
I have been working on interfacing the Arduino to a pair of Curtis scooter mobility controllers that did not like the PWM output of the Arduino ... even with smoothing I could never get a satisfactory voltage signal ..in the case of the Curtis's a 0v - 2.5v - 5v.
So I've changed over to a dual digipot ( 254 steps ) as the final output stage from the Arduino ...this seems to work just fine.
The Arduino sketch code that I've knocked up... cribbed from various sources around the web and modified ...has a place in it to alter the voltage swing around a 2.5v center.... assuming that the input to the digipot is 5v.
Return to Everything Powerchair
Users browsing this forum: Burgerman, emilevirus and 468 guests