Don't know much about this but trying to learn.
The crossfader has 3 wires attached which I think are +, - and TX
I've connected the tx to the rx port of arduino and the other two to the power/ground.
When I waggle the crossfader the tx light flashes and when I stop it the light stops.
But the values I'm reading from the port make little sense. They are mostly in the 252-255 range with a few others.
Not sure where I'm going wrong here.
Can anyone offer any guidance? Thanks
If the device does indeed output asynchronous serial output data, then you need to match the voltage levels, polarity and baud rate to the Arduino. Preferably, use an oscilloscope to look at the output of the device, then you can determine the voltage levels, polarity and baud rate. If you don't have an oscilloscope, then at least try using different baud rates.
Another way to determine the baud rate is to write an Arduino program to measure and display the interval between transitions on the Rx line. Poll the rx line until you see a transition, then call micros() to get the time. Do this for a while, storing all the times in an array. After a while, dump the array to the serial monitor. The GCD of the interval between transitions is the bit interval, which is the reciprocal of the baud rate.
The spec sheet says the fader has 128 positions, so it could be encoding the position in a single byte. OTOH there may be some preamble to identify what sort of device it is. So you may get 2 or more bytes transmitted for each position change.
Thanks for the reply. I found some more info on the manufacturers website - http://infiniumtechnologies.co.uk/Faders-Technology
I've set the baud rate to 38,400, connected the power up to the 3.3V pin (as per the data sheet) and am getting half sensible information!
The first quarter of the fader gives values of 0 to about 64, then I seem to get two values at the same time of 64 to 128 and 192 to 255, the next quartile I haven't sussed out yet and the last quarter I get two bytes, one of 255 and the other of 192 to 255.
Perhaps this is the cascading referred to in the docs.
Anyway I'm getting there slowly I think!
Where did you find the datasheet? I couldn't find it by following that link you gave.
In the first quartile, are you seeing both even and odd values, or just even values? If just even values, try 19200 baud.
The data sheet is here: http://infinium.wsiefusion.net/PDF%20-%20Data%20Sheets/45mm%20datasheet%20issue%205%20-%2003.06.2011.pdf
I can only get sensible data at 38400.
With a bit of maths I get a range of 0 to 254 across the whole device. Hurrah.
If anyone from the future is reading this, you can get the fader direct from infinium and it is a bit cheaper, plus has a range of output options eg analogue voltage. This would probably have been a better bet. But no worries.
Thanks for your help.
I would like to use that Behringer X1 optical fader in a project as well. Reading the serial line seems to be straight forward, but I don't want to destroy the fader:
Which wire is GND, VCC and data? Is VCC = 5V?
(The links to the datasheet in here are all dead.)
After some testing (luckily the electronics did survive some totally wrong wiring):
RED = GND
middle = RX
BLACK = VCC 3.3V
(Now I try to make sense of those very strange bits that are send by the fader.)
The serial speed is 31250 baud (NOT 38400), now all position data is directly readable (0-127).
If anybody knows of a better (and longer) optical fader, please let me know.