Solenoid & Stepper Motor power problem. PROTECT ME!

Purpose:
Rotate a 4 wire bipolar stepper motor (32.6 ohm) & activate a solenoid (13.3 Ohm) at different times. Using H-bridge ( LN298 4A) for the stepper & N-Mostfet (tp120) for solenoid.

INPUT
I have burnt multiple 1A H-bridges when using the same power source for all (19V 4.74A).
So, I use a 19V 4.74A for the motor & a 12V 2A for the solenoid. (This sucks)
Arduino is running of USB (Already burnt out an arduino when then other H-bridge blew, so i scared)

Parts
Motor https://www.sparkfun.com/products/9238
Solenoid Solenoid - 36v - ROB-10391 - SparkFun Electronics
H-Bridge Full-Bridge Motor Driver Dual - L298N - COM-09479 - SparkFun Electronics

PROBLEM
POWER! How do i safely power this, or MORE, with one power supply? I keep burning things out when I try to use one power supply...
I thought the 19V 4.74A voltage supply would work, but it burnt out my arduino and three 1 amp H bridges.. womp womp...

PLEASE HELP ME OPTIMIZE MY LAYOUT. ESPECIALLY BECAUSE I WILL BE ADDING 2 MORE to THE SAME CIRCUIT. (3 motors 3 solenoids 1 ardiuno) (+LEDs & bla bla). POWER PROTECTION; HOW??

First Why have you got the 5v output of the uno going to your breadboard?

Second Why do you (think have two Earth's on the upper (in the pic) rails of the breadboard?

Third How are you powering the uno?

Mark

Show us exactly how you have the H-Bridge connected. "Not Shown Correctly" doesn't help us.

I need the 5v for the LN298 H-bridge... (also, I use it for LEDs and another IR sensor)

I cannot find the LN298 in the frittzing software, but I have both outputs enabled and it works correctly. (no caps resistors diodes used). I am trying to draw up a custom part now. Bear with me, because I am learning Fritzing as I go...

the schottky across the solenoid, should be across the solenoid ONLY
you have it across the solenoid AND the NPN? FET

5V and 3.3V on the Arduino board isn't supposed to be connected together.

5v and 3v are not connected. It's a poor drawing.

I will fix the diode location today.

I still need to figure out how to wire ALL of this with one power supply SAFELY?

Oops? Data sheet shows pin 9 of this device as Logic supply voltage and pin 4 as Supply voltage. It appears you have these swapped. - Scotty

I just have it drawn incorrectly, but that all works. I double checked and you are correct sir!

Now if only someone could teach me how to power this contraption with only one power supply

Now if only someone could teach me how to power this contraption with only one power supply

Bit of a waste of power but:

19v-------7812 regulator
| | |
| | --------------------------7805 regulator
| | |
| ---------- solenoid supply ---------- logic supply
|
----------- stepper motor supply

  • Scotty

So I will have quite a bit of power loss?

I could just use a voltage divider for the solenoid, because I don't need a regulated voltage. I only need to make sure the current draw from the solenoid or motor does not impede or burn out the logic.

that's why i don't want to use 19 v on the solenoid. I don't need that much current being drawn from the solenoid. It is a killer. I would rather it draw ~12 V, So about 1 amp instead of 2 amps at 19v.

Will these type of regulators help to protect me from surges from the motor or solenoid? Noise?

I wouldn't call it a power loss; that suggests not having enough power. It would be a power waste in that the differential between input an output of a regulator is burned off as heat. e.g. for the 7812 the input is 19, the output 12 so 7 volts is 'burned off'. How much power is wasted can be determined by multiplying the voltage differential by the current going through the device. If your not energizing the solenoid ALOT, I wouldn't worry about it unless your running off a battery or battery pack; and I doubt that since 19 v would be an uncommon battery voltage. Same with the 7805. With your circuit you are only powering two ICs and the logic voltage they use is only for signals. The other way to go about it is to use switching regulators but they are significantly costlier.

Using a voltage divider for power is pretty much a no-no. In order not to have significant current flowing through the divider when connected across a potential, you've got to use some pretty high resistances. When you go to power a device with the divider, one or the other of those resistances will be in series with that load. A good amount of the voltage you need for your device will be dropped across the resistor.

Keep in mind that the 78xx series of regulators are only good for about an amp. They both have big brothers available in a TO3 package good for about 3 amps.

  • Scotty

If your worried about noise take a good long look at this

http://www.fightingrobots.co.uk/documents/EMIGuidelines.pdf this papers well worth a read by any one dealing with robots/motors and other things with coils in them.

Mark

PS you don't need to use just one power supply you just need to make sure that they all have a common ground!

M

Scotty!
Thanks for the explanation! This really helps!

I am probably going to run everything off a 12V supply and just get a 5v regulator for the arduino. Also, can anybody recommend places to put diodes that would prevent any further damage to my arduino. I guess i can place i diode between the arduino and the ground & b/w the arduino and the Vdd on the H-bridge?

A single 12V supply is the way to go, if you are happy with the solenoid getting 12V and the stepper motor about 10V (because the L298N drops about 2V). You can feed the Arduino directly from that 12V supply into the barrel jack or the Vin pin, unless you are drawing a lot of extra current form the +5V line. No need for a separate regulator.

As has already been pointed out, the diode in the mosfet/solenoid circuit is in the wrong place and does not protect the mosfet.

You also need 8 diodes connected between the L298N outputs and the ground and +12V supplies. See the L298N datasheet for details.

If you need to reduce the solenoid voltage, the simplest way is just to put a power resistor in series with it.

Great advice DC!

I will do just that.

I guess i will need schottky diodes since im working with ~1amp on the motors? i didn't know about the 2V drop! thanks for the help

No, 1N400x diodes will be fine. The stepper motors take less than 400mA @ 12V and the diodes only conduct briefly when a phase is turned off. It's when you control DC motors using PWM that the diodes can end up conducting for a large part of the cycle.