New Board Review.

I finally figured out the problems and mistakes i made on the last board i made. and moved my ripple filtering from a 2nd board onto this one.

This controls 2-24v solenoids and 1-12v solenoid, in a timed sequence using an arduino. Can you guys tell me any improvements or mistakes i may have made with this.

I am using x-1 and X-2 for a toggle Switch

Thanks and i appreciate your opinions.

[BRD File here

[SCH file here](http://www.cadiansecurity.com/Eagle/Shield.sch)](http://www.cadiansecurity.com/Eagle/Shield.brd)

it fails DRC. you should always check that.

why bother with optos if you aren’t isolating? you are sharing a common ground.

Your optos have a max collector current of 50 mA. Your relays run 27 mA so you are “safe” there but I don’t understand why you are using an opto to drive a relay if you aren’t isolating. I would have used NPNs - cheaper and smaller. Heck, depending on your “noid” current, I would have thought about using MOSFETs and dump the relays+optos all together.

Your layout seems overly complex. I think it’s because of your parts placement. You put your relays on one side of the board and your optos on the other side. I would have put the optos (or NPNs) right next to the relay. You’ve got the traces running all the way across the board. I would have placed the “noid” connectors next to the relays. You placed your regulators in the middle of the board - I would have made a “power cluster” near the input connector. You might want to use a vertical orientation of the VRegs - they don’t look like they are drawing that much current so might not need the board to dissipate heat. Frankly, I’d start completely over on the layout.

If your 5V reg gets too hot (19V drop) you might want to feed it from the 12V reg.

Well Crap had not thought about that. new to micro electronics

Will this work?

[BRD File here

[SCH file here

God that makes it ALOT easier!](http://www.cadiansecurity.com/Eagle/Shieldtest.sch)](http://www.cadiansecurity.com/Eagle/Shieldtest.brd)

I’d make the supply and ground tracks wider.

Yeah, that cleans it up a lot.

NPNs make better low side drivers than high-side.

what kind of current draw do your solenoids have?

You seem to love your diodes. Why do you have one in-line between the VReg and your other circuits? Doesn’t make sense to me.

The diode between Vin and Vout of the Vreg is ok but only needed if you are going to power the device from another source. If power only comes from your “24V”, you don’t need it.

What’s the purpose of the inductor?

why do you have C2?

Does the arduino take 12V input?

Philba:
Yeah, that cleans it up a lot.

NPNs make better low side drivers than high-side.

What should i have used instead of the tip31?

what kind of current draw do your solenoids have?

24v 5.6 watts

12v 10.3 watts

You seem to love your diodes. Why do you have one in-line between the VReg and your other circuits? Doesn’t make sense to me.

These solenoids are noise as hell.

The diode between Vin and Vout of the Vreg is ok but only needed if you are going to power the device from another source. If power only comes from your “24V”, you don’t need it.

Dunno saw someone elses Vreg with it, and forgot the reason they said put it there.

What’s the purpose of the inductor?

my my implementation of a pi filter.

http://en.wikipedia.org/wiki/Capacitor-input_filter

why do you have C2?

Good point im not sure. i removed it.

Does the arduino take 12V input?

yes it does!

yes the Arduino takes 12v input.

Heh i also put the diodes across the solenoids backwards. i have corrected that as well.

What should i have used instead of the tip31?

TIP31 is an NPN, you have it as a high side driver.

24v 5.6 watts

12v 10.3 watts

that means at 12V it will draw .86 A. You are probably OK with that. Understand that you will see around a 1V drop through the TIP31 so your solenoids will see 11V. The real issue is power dissipation. Your solenoids will draw about an amp and the voltage drop in the TIP31 is about 1 V so your TIP31 will dissipate about 1W. It will get very hot in continuous operation. If your duty cycle is low, it's probably ok. If not, you'll want to be able to put heat sinks on them (mount vertical instead of horizontal).

These solenoids are noise as hell.

But I'm talking about D14. What does that have to with the solenoids?

By the way, I don’t see where the output of the VReg actually is connected to 12V.

But I’m talking about D14. What does that have to with the solenoids?

By the way, I don’t see where the output of the VReg actually is connected to 12V.

yeah D14 removed.

x-1 goes out to a Toggle switch. and comes back in through x-2. The voltage regulator drops the 24v to 12v.

And acutally since i dumped the relays i dont really need 12v any more. but i cant run the arduino off 24v. so ill leave the Vreg in there to drop it to 12. in the case of the Tip31s guess i could use an lm317 and up it to 13v.

On further reflection, I suggest you use an NPN darlington transistor instead of the TIP31. A TIP120 would work fine and is cheap but there are many out there. Look for an Ic of at least 3A and Vceo of >30

The TIP31 doesn’t have enough gain - you might have to supply 100 mA to get it to deliver 1A. Too high.

socoj2:

But I’m talking about D14. What does that have to with the solenoids?

By the way, I don’t see where the output of the VReg actually is connected to 12V.

yeah D14 removed.

x-1 goes out to a Toggle switch. and comes back in through x-2. The voltage regulator drops the 24v to 12v.

And acutally since i dumped the relays i dont really need 12v any more. but i cant run the arduino off 24v. so ill leave the Vreg in there to drop it to 12. in the case of the Tip31s guess i could use an lm317 and up it to 13v.

Actually, you could run the TIP off of 24V. Less power dissipation.

Philba:

socoj2:

But I’m talking about D14. What does that have to with the solenoids?

By the way, I don’t see where the output of the VReg actually is connected to 12V.

yeah D14 removed.

x-1 goes out to a Toggle switch. and comes back in through x-2. The voltage regulator drops the 24v to 12v.

And acutally since i dumped the relays i dont really need 12v any more. but i cant run the arduino off 24v. so ill leave the Vreg in there to drop it to 12. in the case of the Tip31s guess i could use an lm317 and up it to 13v.

Actually, you could run the TIP off of 24V. Less power dissipation.

Do Tip31 ok?

It’s very close. At 1A, the Hfe (gain) is 25. That says you need to deliver 40 mA of base current from the arduino. I believe the chip is rated to 40 mA per I/O pin but that’s really kind of pushing it. If you have the TIP31s, you can try them. If you haven’t bought the transistors yet, I’d get the TIP120 instead. It has a gain of 1000 and thus will only need 1 mA of base current to deliver 1A. Just a lot more efficient.

While we are talking about the transistors, you also need to put base resistors in series between the arduino pin and the base of the transistor. With the TIP120s, I’d use 1K. With the TIP31s, I’m not sure you can put a resistor in and get the gain you need. The resistor performs a safety function as is will prevent a short to ground from exceeding the spec’d current limit on the pin. It’s bad enough to blow the transistor - a lot worse to take out your arduino as well.

The TIP31s will run off of 24V just fine.

i changed it out for the tip 120s.

I really appreciate your help Philba…

got this fitted up.

I forgot to ground the arduino to my board and i fixed that via soldering.

Only problem is when i throw the switch that activates the tip120s.

i only see 2-5 volts on the output side.

Also any reason why freaking pin 0 is always high? even when i set it to LOW its still freaking lit.

since there were a lot of changes, it would be best if you posted the schematic.

Philba:
since there were a lot of changes, it would be best if you posted the schematic.

Not much has changed since the last posting of them.

[BRD File here

[SCH file here](http://www.cadiansecurity.com/Eagle/Shieldtest.sch)](http://www.cadiansecurity.com/Eagle/Shieldtest.brd)

You are using NPNs as a high side driver. You need to use them as a low side driver. The load should be between +V and the collector. Not between gnd and the emitter as you have them. The NPN should “sink” current, not source it.

Would recommend posting PNGs or JPGs of your schematic and layout, cause a lot of us don’t use Eagle.

bleh i put the load on the wrong side of the Transistor… Any how im guessing that is what the problem is.

I just wish it didnt take 4 weeks to get a board from batch.

Anybody ordering a board from GP i can throw in with?

dude, we’ve all been there. Get out your exacto knife. cut some traces, scrape off the resist and use some “blue” wires to rearrange the NPNs as low side drivers. You probably just have to make 2 cuts and 2 blue wires per transistor. Try it with one to see what happens. It will be ugly but you’ll get farther. Don’t toss the board because you screwed up. Get as far as possible. You might even be able to live with the changes.

I’d recommend using a solderless breadboard for prototyping. Once you get the design pretty much right, then commit to a PCB. As you get more confident, you can skip some of the SBB steps.