Go Down

Topic: Hall effect sensor and L293D IC on the same 5v power supply? (Read 74 times) previous topic - next topic

vinicius0197

I'm trying to build a RPM counter using arduino, and to achieve that, I choose to use a simple hall effect sensor together with a small neodymium magnet stuck on a wheel attached to a DC motor.
I'm using the L293D IC to control the movement of my motors. I've tested the hall effect sensor and the L293D separatly and everything worked just fine. Problems began when I noticed that both the IC and the sensor required a 5v power supply from the arduino, and the sensor just doesn't work whenever the IC is also connected to the 5v power supply. I've read many times that this chip draws a lot of power, and I think that maybe that's the reason for the malfunctioning of the sensor. But what should I do? There's any way to get this sensor working again while the L293D is on?

Wawa

You can run the chip's logic (VCC1) from the 5volt pin of the Arduino, but you can't run the motor power pin (VCC2) from that 5volt pin. The motor should have it's own supply.
Post a diagram or picture, showing how you have connected things.
Leo..

vinicius0197

Yeah, I know. I'm powering the motors with a 12V external power supply. I'm using the 5v on the arduino to power both the chip's logic and the hall effect sensor. Like I said, it works just fine if I'm powering just one of them, but the sensor starts giving wrong readings if I power both the chip's logic and the sensor with the 5v.
Here's a rough sketch of my circuit (sorry if it's confusing):


Wawa

Not confusing.
So you get wrong readings even without the motor connected?
Layout/wiring is also important.
Do you have decoupling on both VCC pins (see datasheet), and decoupling in the Hall sensor.
Leo..

vinicius0197

Not confusing.
So you get wrong readings even without the motor connected?
Yeah, that's right. If the chip's logic is powered on, I get wrong results.


Do you have decoupling on both VCC pins (see datasheet), and decoupling in the Hall sensor.
Leo..
No, I'm not using decoupling (I have to add some capacitors between Vcc and Gnd, right? What values should those capacitors be?).

CrossRoads

0.1uF ceramic caps from ALL Vcc pins on all devices to Gnd.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy