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.
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.
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.
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.
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.
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.
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.
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.
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.
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.