AlbertHall
- Joined Jun 4, 2014
- 12,347
Does the L298N get hot?
Not at all.Does the L298N get hot?
DJ. I am not sure if the power supply has a filter capacitor, but I think so.Does your latest circuit include a snubber? If the motor doesn’t have to reverse, a diode. Or an RC snubber... And does your power supplies include a filter capacitor?
What about an optocoupler?I have found thet using the same supply for an arduino and motors or sevos usually causes the arduino to eventually hang. It will happen sooner if there is inadequate supply decoupling and no noise suppression across the motor. Try running the motor and arduino each from its own regulated 5V supply, with both commons connected together at the 12V supply source. I think it will help.
In your layout, study where the motor current flows, especially the ground.So, clearly, the motor creates an interference that disrupts the I2C bus.
Sadly, I don't (yet) have an oscilloscope to be able to tell if there is noise across the lines.In your layout, study where the motor current flows, especially the ground.
If any part of the ground of the arduino/LCD carries the motor current then that current can result in a noise voltage which is injected the other circuits.
All the grounds for arduino/LCD system should be connected together.
The grounds for the motor ciscuit should be connected together.
There should be one and only one connection between the two separate grounds described above.
This often called a star ground system.
I am actually now using an opto-coupler to totally separate the the engine from the Arduino side.What about an optocoupler? What would you do with it?
Just use a supply system that will work.
Yes. I tried putting capacitors on the motor. It didn't help.Did you try a 0,1uf or 0.01uF capacitor across the motor leads? The motor may be producing a lot of RF interference if it has brushes that are sparking. Such RF can get back into the power leads and hence into the controllers.
Also, does the I2C bus have pull-up resistors? Try putting 10k resistor to each line from Vcc. Some internal pull-ups are not strong enough in a noisy electrical environment.
Have you taken any notice of all the advice you have been given on how to connect your supplies?Sadly, I don't (yet) have an oscilloscope to be able to tell if there is noise across the lines.
I do connect grounds together when applicable.
by Jake Hertz
by Aaron Carman
by Jake Hertz