Motorised Fader analogRead issue

Hi I have an Alps motorised fader that im trying to get working on an arduino DUE. I have a circuit board made to power the motor via a 9v dc adaptor. issue is at some point something goes wrong and then analogRead of the wiper starts acting strangely. The wiper read will be perfectly normal. 0-1023 but at one point it changes and starts reading values 0 - 800. then it satys like that. can never get back to reading the full range. Furthermore it doesnt move linearly through the whole travel of the fader. analog read will be 0 until halfway through moving the fader and then jump up to 800 on the last half of the fader travel. any ideas ? schematic attatched,

You are getting noise from the motor that is interfering with your code.
This is because you have no reverse biased diode across the motor.
As you are using the motor in a H-bridge you need four diodes to do this.

See page 2 of the data sheet to see how to wire these up.
A lot of simple tutorials on the web miss out these diodes, with the result that you have found.

I would also put a 0.1uF ceramic capacitor from the pot wiper to ground.
Your capacitor across the motor must also be ceramic otherwise it will not work.

Are you absolutely sure you have identified the pins on the motorised slider correctly, because it is easy to get them mixed up. There are actually two slider pots on a motorised slider, one for the analogue circuit you want to connect it into and the other for the feedback of the position. The data sheet normally identifies the feedback slider with a superscript dash.
You can always use the alternat slider if you have damaged the track due to miss wiring.

1 Like

Thanks, ill take a look at that. much appreciated. Also may I ask what datasheet are you referring to?

This one ?

The data sheet of the L293, the chip that drives the motor. Not the L293 board itself but the chip’s data sheet.

1 Like

thank for all this, also yeah I'm pretty sure I have the pot wired correctly. it does read correctly for a while but then becomes incorrect after a bit. ill make those corrections and see what happens. I did also try the same circuit with a Bourns fader and this seemed to work perfectly. although it seemed to want 3.3v to read correctly whereas the alps needed 5v to get the correct range. ill investigate more. do you think the operating voltage of the DUE being 3.3v instead of 5 might be causing some issue perhaps.

But your schematic said it has a Leonardo as the processor and the pot is connected to 5V. If you have a Due then the end of the pot needs to be connected to 3V3. If you connect it to 5V then that would damage the Due’s input pin. If this is the case try another analogue input pin.

Sorry yeah my bad. Kicad doesn't have a due for a symbol so I used a Leonardo for the purposes of the schematic. Thats why I mentioned it also. but I can see the confusion. I have been using the 5v for the reading yeah. assume it was fine to still use it because the due offered it as an option but thinking about it I can see how this would be an issue now. Would this also mean the 5v being supplied to the H bridge from the 9v dc could also be an issue for the due ?

You can always just change he name on Kicad. A schematic overrides any words you might say.

What do you mean by this?

It shouldn’t because the L239 uses a transistor to switch it. However you might wonder if 9V is sufficient to drive your motor because you loose such a lot with that old thing on low voltages.

I just meant because the DUE has a 5v pin I just assumed I could use it without realising the basics of how it is actually reading the fader wiper position. (I'm still learning) but now I think about it it totally makes sense that it would be part of the issue. The 9v 2a adaptor seems to be able to power the motor fine. plus I hope it has enough power because I'm planning on adding some LEDS to this project also which will be powered by the same 9v adaptor... anyway appreciate the help. ill take a look at adding those improvements and see how it goes. thanks again.

Ok good luck. This is a photograph of a 4 slider unit I made to go in a joint project for a disabled sonic artist / DJ. We built various systems to help her get better access to Ableton Live. I used some WS2812 LEDs to mark the point where the sliders were positioned.

That's super cool too. Maybe I could just hire you instead :wink:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.