custom power supply for Aruidno - suggestions please

I'm builing a custom Arduino project which will drive 3x 12V relays [1], some LED's [2] and capture input from push buttons and on/off switches. I can probably get away for 500mA, or probably less? The relays will be driven with 2N2222 transistors.

It will be mounted in a car / motor vehicle and I want to cater for input ranges between 12V and 24V (possibly upto 30V-35V to cater for spikes?)

[1] nt72-2c-s10 5V or nt72-2c-s10 12V - http://www.mantech.co.za/productinfo.aspx?item=35M2881^1
[2] High bright LED's and normal LED's - https://www.netram.co.za/904-high-bright-led.html

Any suggestions or recommendations on this welcome.
I want to construct a whole PCB from scratch, instead of using multiple different components wired up with loose wires, due to space contraints.

If you want easy, grab a USB phone charger :slight_smile: But that will only give you power for the Arduino, leds and switches.

The relays are a different story. First, you link the 24V version :stuck_out_tongue: And second, regulating to a voltage which is might matched at the input (so regulate to 12V while 12V at the input) is hard. Most regulators go out of regulation and just give you a slightly lower voltage on the output. Luckily, relays are not that critical. So you could just use a buck converter for them. An you are probably lucky, you talk about 12V to 24V so I assume a car? If a car battery is at 12V it's very low :stuck_out_tongue: And while running the voltage is closer to 14V (or 28V for the "24V" situation in trucks). So pick a converter which can handle that. But because of this, if you set the output to 12V an you input 14V they will regulate.

Other option would be to use zeners and burn a piece of the power to the 12V relays when connected to 24V. But you would have to check if you can get away with heat production etc.

Ow, and yes you can make a buck converter from scratch (with an IC) but PCB layout then is very important (and kind of a black art). So grabbing a off the shelf is easier. And if you grab a small of the shelf you can just solder it to your PCB directly. I just treat those small converters as a single IC like a 7805 replacement.

septillion:
If you want easy, grab a USB phone charger :slight_smile: But that will only give you power for the Arduino, leds and switches.

The relays are a different story. First, you link the 24V version :stuck_out_tongue: And second, regulating to a voltage which is might matched at the input (so regulate to 12V while 12V at the input) is hard. Most regulators go out of regulation and just give you a slightly lower voltage on the output. Luckily, relays are not that critical. So you could just use a buck converter for them. An you are probably lucky, you talk about 12V to 24V so I assume a car? If a car battery is at 12V it's very low :stuck_out_tongue: And while running the voltage is closer to 14V (or 28V for the "24V" situation in trucks). So pick a converter which can handle that. But because of this, if you set the output to 12V an you input 14V they will regulate.

Other option would be to use zeners and burn a piece of the power to the 12V relays when connected to 24V. But you would have to check if you can get away with heat production etc.

Ow, and yes you can make a buck converter from scratch (with an IC) but PCB layout then is very important (and kind of a black art). So grabbing a off the shelf is easier. And if you grab a small of the shelf you can just solder it to your PCB directly. I just treat those small converters as a single IC like a 7805 replacement.

I am fully aware of what you're saying, but I want to keep parts to a minimum and have it all work in as small a space as possible. So, two power supplies (24 to 12V + 12V to 5V) is too much. For that reason I'm thinking of using 5V relays so everything runs at 5V. I'm not using a car battery, but rather mount it in a car's electronics so I need to compensate for the alternator, which runs at 14.x Volts, or 28.xV (on a 24V truck).

Hey, it was you who said was using 12V relays :wink: I would indeed also pick 5V relays if I needed to switch between 12V and 24V.

And I never said car battery but just car :slight_smile: And I seem to be right. :slight_smile:

And if you use 5V relays as well, just use a DC-DC buck converter module. They are small so you barely lose space but gain the time you don't need to spend on getting the design right. And if you take advantage of the fact they have there own board (which you can mount perpendicular or layer on top of it) you can even save space. But whatever you pick, don't forget to add filtering and protection. A car is a very noise environment.

septillion:
Hey, it was you who said was using 12V relays :wink: I would indeed also pick 5V relays if I needed to switch between 12V and 24V.

I know I said that :wink: I did mention it as I have seen posts in the past where 12V relays were preferred over 5V relays. No sure if this could be a problem?

septillion:
And I never said car battery but just car :slight_smile: And I seem to be right. :slight_smile:

And if you use 5V relays as well, just use a DC-DC buck converter module. They are small so you barely lose space but gain the time you don't need to spend on getting the design right. And if you take advantage of the fact they have there own board (which you can mount perpendicular or layer on top of it) you can even save space. But whatever you pick, don't forget to add filtering and protection. A car is a very noise environment.

I want to to build this on a mass scale, a few hundred to begin with, so cutting down on cost and complexity in the long run would help. I already use some buck converters but think I can save a bit more on the project by directly imbedding some of those components onto the new PCB.

SO, would a buck converted be the best option for this type of design?

if it's an automotive application, you need to use automotive type relays. This will eliminate any need for a 12V regulator circuit. Now you only need a the 5V regulator.

also, you can replace the 2n2222 with a ULN2803. This can also save board space.

promacjoe2:
if it's an automotive application, you need to use automotive type relays. This will eliminate any need for a 12V regulator circuit. Now you only need a the 5V regulator.

also, you can replace the 2n2222 with a ULN2803. This can also save board space.

I'm sorry, but I don't agree with this statement. These relays can switch what they need to switch without issues.

Automotive voltage can vary between 12V, to 16V. Normally 14.5V when the engine is running, If the battery is almost fully charged. 24V to 32V for 24V Applications, Standard relays are not designed for this type voltage range. The added benefit is you do not have to have a 12V regulated power supply for these relays. And if you use remote relays you also eliminate any high current traces on the circuit board. You can place these relays anywhere they need to be. I have been dealing with automotive electronics since the 70s, and I have never run across a professionally designed circuit that used non-automotive rated relays in the design. your adding an extra complexity to your circuit by adding a second regulator. This is not necessary.

You should either use 5V relays or automotive type relays. But you should not use standard 12V relays with a regulated power supply. It just adds complexity and potential problems to your design.

promacjoe2:
Automotive voltage can vary between 12V, to 16V. Normally 14.5V when the engine is running, If the battery is almost fully charged. 24V to 32V for 24V Applications, Standard relays are not designed for this type voltage range. The added benefit is you do not have to have a 12V regulated power supply for these relays. And if you use remote relays you also eliminate any high current traces on the circuit board. You can place these relays anywhere they need to be. I have been dealing with automotive electronics since the 70s, and I have never run across a professionally designed circuit that used non-automotive rated relays in the design. your adding an extra complexity to your circuit by adding a second regulator. This is not necessary.

You should either use 5V relays or automotive type relays. But you should not use standard 12V relays with a regulated power supply. It just adds complexity and potential problems to your design.

Thanx, but you're drifting the topic away from what I originally asked for. I have been in the automotive industry as long as you have and know more than enough about the different voltages and spikes.
My relays of choice has very little todo with what I originally asked for.

Only one person has confirmed so far than a normal 7805 won't work properly. Should that be enough reason not to use it? I don't know. Guess I just need to build it and see.

promacjoe2:
Automotive voltage can vary between 12V, to 16V.

If I had 16V on my battery I would be very concerned... ::slight_smile:

promacjoe2:
Standard relays are not designed for this type voltage range.

If you mean standard 12V relays then kind of. A lot have a pretty wide range which you can of course extend with a resistor or a diode (steering). But make it also work on 24V, forget it, even with automotive relays.

promacjoe2:
And if you use remote relays you also eliminate any high current traces on the circuit board.

That of course completely depends on the application...

promacjoe2:
I have been dealing with automotive electronics since the 70s, and I have never run across a professionally designed circuit that used non-automotive rated relays in the design.

You mean non-automotive 12V relays you mean? Because every modest modern (black box) controller in a car has multiple. And now they finally switch to transistors for most. Which I would prefer in most applications as well nowadays.

7805 is indeed not really rated for 24V automotive. And besides that, in a modern jelly bean design you don't want to go linear for that kind of voltages and currents.

And you say you want to make hundreds. That tells me two things
a) I don't really think you're up to that if you ask questions like this
b) I assume you want to sell them and not Open Source then so that's where my help ends. This is a forum for Arduino, an Open Source community. If you want to make money I want in on the profit :wink:

All I can say, look at the different switch mode IC's or modules you supplier can deliver and pick one that suits your needs :slight_smile: And don't forget to follow designer recommendations, to add the proper protection for automotive use and to make prototypes.

1, Under certain circumstances, low battery or after a hard start the alternator can put out 16V. It does not mean there is anything wrong with the charging system. Older cars with point type ignition system, is more susceptible to this than newer car with a high-energy ignition system, But it still can happen. You should only be concerned if this voltage doesn't drop quickly as the battery charges.

2, normally the maximum operating voltage of a relay is the operating voltage + 120%. This would make the maximum operating voltage of the standard 12V relay at 14.4V Max. Normal charge voltages 14.5 V. This means that the normal voltage applied to these relays exceeds the maximum voltage rating of the relay. The standard relay is more likely to fail prematurely. An automotive rated relay is designed to operate at 14.5V +120%. or 17.5V. And yes they make relays design for 24V systems. Alternatively, for low current applications, you can center tap the batteries to get your 12V. for higher current applications need a voltage converter, which is normally standard on many trucks to power radios and other higher current applications.

When it comes to automotive or trucks, When they say 12V or 24V, they actually mean 14.5V or 27V. + 110% under certain circumstances.

Everyone seems to be getting hung up on the relays themselves, but isn't the key to have a stable power supply?

5v relays should be fine so long as the power supply is stable. For that I suggest something like the attached.

septillion:
If I had 16V on my battery I would be very concerned... ::slight_smile:

16V in a car, under normal conditions is VERY concerning, you're right. But, I've seen cases where a faulty alternator can push much more than that through.
So, that beg's the question: How does one actually protect a curcuit from over-voltage?

septillion:
You mean non-automotive 12V relays you mean? Because every modest modern (black box) controller in a car has multiple. And now they finally switch to transistors for most. Which I would prefer in most applications as well nowadays.

7805 is indeed not really rated for 24V automotive. And besides that, in a modern jelly bean design you don't want to go linear for that kind of voltages and currents.

I have thought about replacing the relay with a transistor, but from experience, in another field (mobile generators and air compressors), relays tend to last longer than transistors.

septillion:
And you say you want to make hundreds. That tells me two things
a) I don't really think you're up to that if you ask questions like this

Why, cause I'm looking for recommendations on parts, from someone else who already tried a couple different components and know what works, and what doesn't?

As I said before, I can use an of the shelf buck converter. I have 34 spare ones right now (bought a bag of 50 a while ago), but want to keep the design on a single PCB. And, at the same time, I don't know if the LM2596S is the best way to go either.

septillion:
b) I assume you want to sell them and not Open Source then so that's where my help ends. This is a forum for Arduino, an Open Source community. If you want to make money I want in on the profit :wink:

So, building an open source platform and selling it is illegal? Am I not allowed to charge for my time, materials and assembly costs?
If that was the case, you wouldn't even have know about Arduino's!

What I am designing will be open source in the sense that people can change the Arduino sketch. The PCB will have a ISP header with instructions on how to use it to load a new sketch (just hope they don't mess with the boot loaders?)

septillion:
All I can say, look at the different switch mode IC's or modules you supplier can deliver and pick one that suits your needs :slight_smile: And don't forget to follow designer recommendations, to add the proper protection for automotive use and to make prototypes.

Herein lies the problem: There are so many.

RudiAhlers:
So, building an open source platform and selling it is illegal?

No, of course not. And that's not what I'm saying. What I am saying is that a lot of people here to help people learn and to boost the open source community. So a lot of people don't want to put time and effort into a project someone else is going to make money with and that includes me. And you will not be thanked for not telling on forehand.

So no problem in using in open source to make a sell-able product but not with my free help.

RudiAhlers:
Herein lies the problem: There are so many.

Then your work is set out :slight_smile: Make a list and start filtering on pro's and cons :slight_smile: