PCB with firmware to convert asynchronous serial data to X/Y analog voltages
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


serdac is two channel a serial to analog interface, designed to control a power wheelchair through a modified joystick.
For more information see http://www.hackingsma.com/?p=257
The serdac PCB and a 5-pin XLR connector replace the analog joystick. Serial data is transmitted in a packet format,
each channel value is represented by a signed 16-bit integer (although the dac is only 12-bit, the low 4 bits are ignored).
If the incoming serial data stream stops for more than 100ms the device reverts to neutral (1/2 vref) output voltage for two seconds before resuming normal operation.

serdac receives serial data at 115200 baud, 8N1 the data packet format is as follows:
	0xaa (sync)
	0xaa (sync)
	0x04 (length of payload to follow, ie. 4 bytes)
	chksum ( (Xmsb + Xlsb + Ymsb + Ylsb) % 256 )

Other notes:
I have tried modifying two different Invacare 1812 joysticks and both exhibit low sensitivity and poor linearity on the left side of the throw.
I originally thought that the problem was either with the joysticks or the serdac d/a converter but I have confirmed that the problem is not related to
either. I suspect that the problem is with the Invacare joystick firmware or possibly even the TDX3 firmware. The remedy is to swap the X/Y
axes in both the chair programming and the serial data source. This moves the problem from the left to the reverse direction, where it is less of an issue.