Go Down

Topic: [SOLVED] Bi-directional motor control with two mosfets? (Read 7848 times) previous topic - next topic

MorganS

I guess the Arduino is old enough that nobody had fourteen old phone chargers with USB connectors around the house to supply power back then.

It's also a learning environment. The 1A regulator on the UNO can actually do 1A under very specific conditions. Teaching how to find and read datasheets is part of the mission of Arduino. It's much better to learn by turning a $30 Arduino into smoke than a $130k device that your employer paid for.
"The problem is in the code you didn't post."

Paul__B

The 1A regulator on the UNO can actually do 1A under very specific conditions.
One drip per second of liquid nitrogen?

wvmarle

That, combined with lowering the input voltage to about 6.5V, as in 5V+ the minimum dropout at 1A output current. No liquid nitrogen can compensate for 12V input.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

zeeproduction

I understand that I have to be careful when playing with the 12V that is at the top limit of these boards.

At Raw pin I was powering only the electronics on the Arduino board and from 5V pin the HC-12 receiver module.
Motors were powered from a different 4V battery as before.
The 12V battery source was intended to be split for electronics and anything else that might need 12V but nothing else was not connected at that moment.

I tried to identify what smoked out but was not able to. In the moment I've seen the smoke it was coming from the regulator zone, but no precise component.

Could the processor be still alive? I saved it for maybe in the future I could place it on a spread board to use it. I did a test to upload some sketches but the upload was hanging.

I was wondering if it was I doing something wrong or something else.

So, in this case I should take down the 12V to around 5V to power the Arduino to make sure no smoke will be seen again. Right?

Or another option would be to change the capacitor to a 16V one, could do the trick?

What could be the simplest path? (I need 12V from a battery pack and only one for this project and I will definitely have to take down 5V for motors. Should I have different regulator modules for modules and Arduino? I expect a maximum 3A load on turn motor because is the stock "servo" that works on torque (very stupid).
Maybe I am kind of pushing the limits with what I am trying to do... I don't know.

Thanks so much. Learned lesson.

wvmarle

The processor may or may not be working, if it's a capacitor that burned very likely it still works. Try powering it over USB and see what happens.

Without knowing exactly which component broke I'd not trust the board any more, and just toss it in the bin and grab another. They're too cheap to spend much time on.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Paul__B

At Raw pin I was powering only the electronics on the Arduino board and from 5V pin the HC-12 receiver module.
So this statement conflicts itself.  You were attempting to "power" something from the Arduino 5 V pin.

I refer you back to #14.

So, in this case I should take down the 12V to around 5V to power the Arduino to make sure no smoke will be seen again. Right?
Yes, you need a 5 V regulated supply for the Arduino and HC-12.

Should I have different regulator modules for modules and Arduino?
If you have a regulator module that supplies regulated 5 V, and it has sufficient current capability to power the motor(s)  at stall and you wire the supply lines as a twin cable - 5 V and ground - directly from regulator module to the motor controller and a similar twin cable separately from regulator module to the Arduino - which means you have to run the control wires for the motor controller along with the power wiring back to the regulator module and then along with the power wiring back to the Arduino so that the wiring forms no loops - then you should be OK with one regulator module.  In fact the wiring would be more complicated with two.

zeeproduction

@wvmarle - I got it. Thanks. I'll burry it :(

@Paul__B - Yes. All the time I was powering the HC-12 from 5V of Arduino that was powered at Raw Pin with 7V. The problem came when did this with 12V.

The motors were powered separated from a 4V battery.

So far I understand that I need to have a regulated 5V minimum 4A (stall current on turn motor) power supply and have to run wiring in a star configuration from 5V PS to everything Mot1, Mot2, HC-12 and Arduino.

Then use 12V to power things coming from a relay operated at 5V by the Arduino.

Everything with common ground.

Would this be correct?

Thanks all.

Paul__B

So far I understand that I need to have a regulated 5V minimum 4A (stall current on turn motor) power supply and have to run wiring in a star configuration from 5V PS to everything Mot1, Mot2, HC-12 and Arduino.
That's about it.  :smiley-lol:  The supply capacitor at the power supply takes the hit from the impulses when the motor controller switches, so you do not want those impulses propagated to the Arduino.  An extra, substantial power bypass capacitor - 1 mF or more - at the motor controller would be a really good idea.

And my point is that you do not want outlying wires running from one point of the star to another; they need to be kept alongside the power wires from the point to the hub and out again, to avoid forming open loops.

zeeproduction

@Pau__B "And my point is that you do not want outlying wires running from one point of the star to another; they need to be kept alongside the power wires from the point to the hub and out again, to avoid forming open loops."
You are saying that I can run power wires from a device to other without closing the loop right?
As a matter of fact due to the arrangement of modules it is easier for me to distribute common ground and common positive V for 5V modules.

I will put some 16V capacitor to the power lines for motors and a smaller one maybe 1uF for HC-12. I suppose this way the Arduino board will be left alone and free of spikes.

It's nasty the turn motor that came with the RC car but I decided to take the challenge. Of course in the future I will go for a servo. (Meanwhile I played a bit with a few of them and tried to understand them).

Thanks a lot all. You shed some nice light into my lack of knowledge.

Paul__B

I will put some 16V capacitor to the power lines for motors and a smaller one maybe 1uF for HC-12.
1 µF is a bit small to do much.  For the motors, at least 1 mF.


westfw

Please don't use "mF" for millifarad.  (1mF == 1000uF)  It's use is uncommon because "m" used to be used for "micro", especially on caps.

Paul__B

Please don't use "mf" for millifarad.  (1mF == 1000uF)  It's use is uncommon because "m" used to be used for "micro", especially on caps.
I didn't.  :smiley-lol:  I used the correct SI unit "mF".  It is true "mf" or more generally "mfd" with a small "f" are used in antique documentation and disposals (WW2?) parts.  :smiley-eek:

westfw


Paul__B

You have a stock of WW2 disposals parts?  :smiley-roll:

I've got a few here ... somewhere ...

Go Up