Interference from motor on analog input pin?

Status
Not open for further replies.

Dejay

Member
Not sure if this is the right place to ask. I've done this tutorial with the Teensy 3.1 from a starter kit using the L293D chip with a DC motor and a potentiometer I read on an analog input pin. It's all powered through the USB port (Vin pin of the teensy).

It works but I noticed that the range of the potentiometer changes. If I turn the potentiometer way down the motor is supposed to turn full speed backwards, but the potentiometer only reads about 10% instead of 0% (or 1%). It seems either the motor or the L293D H bridge is interfering with the analog pin. It seems rather obvious really that something like a motor could do this (maybe 5V voltage drops a little? Or electromagnetic interference through induction or something?).

But I'm an electronics noob. How would I go about to avoid such interference? Thanks.
 
It seems either the motor or the L293D H bridge is interfering with the analog pin. It seems rather obvious really that something like a motor could do this (maybe 5V voltage drops a little? Or electromagnetic interference through induction or something?).

Most likely, the 0V voltage rises a little due to current from the motor and non-zero wiring resistance. This is why high-current devices like motors, bid LEDs, etc typically have their own power supply. Also, a motor can become a generator - for example if it has been spinning fast, the mechanical inertia keeps it spinning for a while, and now it is making electricity rather than consuming it.
 
Thank you! I'll try first with a separate power source.

But I still connect both ground leads of both power sources to the same ground, yes? (Because there is only one ground connector for the L293D)
 
Status
Not open for further replies.
Back
Top