Electronics > Beginners
Motor controller help!
(1/3) > >>
ManlishPotato:
Hi!
I've been ripping my hair of trying to get this project to work >:( >:( >:(, but seemingly no matter what i do i haven't been able to make it work reliably.
It's real simple really, just a atmega328 (non p) -pu + SN754410NE (essentially a l293 quad half-bridge).
The motor is a small 3-6 volt 100mA dc motor. The motor and micro-controller are driven by separate voltage, 6v@500mA and 5v@100mA respectively.

What happens is that i'll connect high or 5v from atmega to the motor controller, the motor spin from 1sec to at best 1min, when suddenly the 5v from atmega will collapse to 0v, and will remain like that until i reboot it.:palm:
My instinct was at first to directly connect atmega to motor controller without resistor pulled to ground like i did when prototyping with uno. But that didn't work at all with a raw atmega. At this point i have no idea as to why this isn't working.

Schematic and picture:
https://drive.google.com/drive/folders/1f7N4JG-nSVDko5vl9TXt3NpuTDINw7SS?usp=sharing

I'm not sure if this is a incredibly stupid question, but any answers are appreciated!
Thanks in advance!
ManlishPotato
Psi:
The first thing i see looking at your schematic is that you've not grounded both of the ATMega's ground pins.
Pin 8 is missing a ground.
Both Pin 22 and Pin 8 must be grounded externally.


Also you seem to have 3 power rails   VCC ,  5V  and 6V
Should that 5V on pin 16 of SN754410NE actually be VCC ?

ManlishPotato:
Whoops! That was a schematic errror. In the real world pin 8 is grounded, i should also note that the two separate voltages are connected via ground.
Psi:
Another thing is that you need some supply rail decoupling capacitors.
Put a 100nF cap between VCC and GND on each IC, as close as possible to the ICs two power pins.
Also put one between V6 and GND right at the SN754410
So 3x 100nF caps in total.
If you dont have any 100nF (0.1uF) caps you can use 1000nF (1uF) or anything in between

Without these the inductive spikes from the motor maybe getting onto the supply rail and crashing the ATMega


Also, breadboard connections suck for reliability.
ManlishPotato:
Oh! sorry! There are to voltage rails, 5v and 6v (these have a common ground) 5v in the schematic is the same as vcc. 6v is only used once and that's for pin 8 on motor controller, I.E this this for powering the motors.
i'll uppdate the schematic :)
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod