Go Down

Topic: Arduino powersupply from 27V~ (Read 3 times) previous topic - next topic

bld

Jun 05, 2010, 08:52 pm Last Edit: Jun 05, 2010, 08:52 pm by bld Reason: 1
I got a motor for my garage door with a output for external equipment.

It is a 24V powersupply, but delivers 27V when the motor is idle (non regulated output)

To make it work with my arduino and my 12V relays I made my own little simple powersupply


(Relays are going to be added to the left, and control inputs from the arduino to the right)

First added a bridge to convert the AC into DC, then a L7805CV (measured output 4.89V) on for the power to the arduino and a L7812CV (measured output 11.85V) for the relays. And then using a ULN2803 between the arduino and the 12V relays.

From 24-27V down to 5V seems like a lot to me, and sounds like it will pull hard on the L7805CV, or what?


I don't have much experience with this, so some advises before I put it into use, would be great. :)

Oh and last, I plan to power the arduino through the VIN, would that be a vise thing to do?
captain-slow.dk | non contagious!

bld

Oh, just did a closer reading on the datasheet, they say 25uF in and 0.1uF out. But all I got avalible right now is some 100uF and some 10uF, would it be possible to use them? Or is it very important that they are the exact values as in the datasheet?
captain-slow.dk | non contagious!

bld

Okay, adding the 100uF to the input then, and going to have a look at some of the old stuff i got laying and see if i can harvest anything usefull from it ;) thank you for your help so far
captain-slow.dk | non contagious!

bld

There, found some 0.15uF so that is pretty close to the 0.10, hope it is close enough because I think I was through most of my electronics scrap.

So far so good, but what about the VIN? Would it be right to power the arduino through that, now when I got a regulated power supply for it? And what about the step from 27V to 5V?
captain-slow.dk | non contagious!

retrolefty

#4
Jun 05, 2010, 10:36 pm Last Edit: Jun 05, 2010, 10:37 pm by retrolefty Reason: 1
Quote
So far so good, but what about the VIN? Would it be right to power the arduino through that, now when I got a regulated power supply for it? And what about the step from 27V to 5V?


Going from +27vdc through a 7805 type regulator is a large voltage drop and depending on how much +5vdc current you will be drawing on the Arduino board, the external 7805 might run very hot. If you are only powering the board then the current draw will be very low and it would work fine. However if you are using the Arduino +5vdc pin to power lots of LED's, etc then the current usage will be much higher.

To keep it simple, I would just try using your external +12vdc regulator's output and wire it to the Arduino's Vin pin. Again the current draw of the Arduino board and external components become the limiting factor as to how hot the +12vdc regulator will run at.

Be sure you wire backward connected diodes right across the relay terminals to keep transient spikes from propagating into your power circuits.

Lefty

bld

#5
Jun 05, 2010, 10:53 pm Last Edit: Jun 05, 2010, 10:55 pm by bld Reason: 1
Quote
Going from +27vdc through a 7805 type regulator is a large voltage drop and depending on how much +5vdc current you will be drawing on the Arduino board, the external 7805 might run very hot. If you are only powering the board then the current draw will be very low and it would work fine. However if you are using the Arduino +5vdc pin to power lots of LED's, etc then the current usage will be much higher.

It will only power the arduino and the wishield 2.0, nothing else. The 12V and 5V circuit should be seperated by the ULN2803.

WiShield 2.0 specs:
  • Sleep mode: 250[ch956]A
  • Transmit: 230mA
  • Receive: 85mA


Quote
To keep it simple, I would just try using your external +12vdc regulator's output and wire it to the Arduino's Vin pin. Again the current draw of the Arduino board and external components become the limiting factor as to how hot the +12vdc regulator will run at.

My idea was to use the 5V regulator for the arduino only, and the 12V for the relays to. It is going to only drive 2 relays first, but I might add more later, thats why I wanted to keep them seperated, and so if the 12V one fails because of the relays making it burn out or something, then would it only be the relays that got burnt.

I could also use a 12V regulator for the arduino, but the regulator on mine gets very warm when the wishield 2.0 is on.

Quote
Be sure you wire backward connected diodes right across the relay terminals to keep transient spikes from propagating into your power circuits.

Yes, going to add one 'across' the ULN2803.
captain-slow.dk | non contagious!

bld

Okay, but how important is it? Like, of curse it is important to make it right, but I searched on google on how others used the ULN2803, and every single one I found just uses one diode to take care of it. A few of them even show'd how it was done before (one on each coil) and how it was done with one single on the ULN2803.

Thought that when everyone did it like that, it must be the way it was done with it. But also easy for me to add one over each coil, just wonder why everyone does it the other way.
captain-slow.dk | non contagious!

retrolefty

#7
Jun 05, 2010, 11:51 pm Last Edit: Jun 05, 2010, 11:53 pm by retrolefty Reason: 1
Quote
Thought that when everyone did it like that, it must be the way it was done with it. But also easy for me to add one over each coil, just wonder why everyone does it the other way.


One reason is that it is always better to 'shunt' the transients as close to the source causing them as possible. Shunting them after a long wire run or through a semiconductor IC terminal is just not as effective. ICs have them sometimes built in to protect the IC not necessarily the whole system. So to repeat, best to have them on the relay terminals.

Lefty

jackrae

Wasn't it the leming who said "I'm jumping off this cliff because everyone in front is doing so"    

Good engineering practice and/or common sense should never be substituted by "following the crowd"

jack

retrolefty

Quote
Good engineering practice and/or common sense should never be substituted by "following the crowd"


Except when  it comes to voting in elections. The lemmings will always determine the outcome, might as well join them.  ;)

Lefty

bld

#10
Jun 06, 2010, 12:19 am Last Edit: Jun 06, 2010, 12:29 am by bld Reason: 1
Quote
Wasn't it the leming who said "I'm jumping off this cliff because everyone in front is doing so"    

Good engineering practice and/or common sense should never be substituted by "following the crowd"

jack

True, but without knowing anything about that thing, you can't use your common sense, because you simply don't have a clue about what is more right than the other.

So what would you do if didn't know what to do?

I did as most people are told to do, searched to find the solution on my problem, by looking at how others did it. And when over 10 different people on 10 different sites did it the same way, and even show'd how it was done before (no idea how it was done before without the ULN2803), and then how it was done with the ULN2803, I figured that must be the way. But apparently that was 'wrong' to search in an attempt to solve the problem too.



But back on the topic...

The 5V should be pulling around 300mA, and that is when the WiShield is on it's highest documented current plus a bit for the Arduino itself. (wasn't able to find any accurate measures, but found some saying it used about 70mA when running a program and not supplying anything on any of the outputs, and that is how mine will be most of the time too.)
captain-slow.dk | non contagious!

retrolefty

#11
Jun 06, 2010, 12:32 am Last Edit: Jun 06, 2010, 12:45 am by retrolefty Reason: 1
Quote
and then how it was done with the ULN2803, I figured that must be the way. But apparently that was 'wrong' to search in an attempt to solve the problem too.


It's not 'wrong', it's just not necessarily the 'best' method. The single diode at the ULN2803 might very well be effective in many designs. However if say the wire runs from the ULN2803 is 20 feet away from the relays, you might still see transients couple into your power source that you wouldn't see if you use diodes across the relay coils. A lot depends on the induction value of the relays, that determines how large a transient is developed from the collapsing magnetic field when the relays are de-energized. Also it would depend on if any of the relays de-energize at the same time or not. There is no 'perfect' solution to things like transient suppression and ground loops, it's as much an art as a engineering task and past experience to tame such problems, if indeed you even have these problems.

I have used relays driven directly from Arduino output pins and used no diodes at all (couldn't as they are single coil latching relays, and therefore there is no 'backwards' voltage that would allow a diode installation), however these were very low current relays, around 12ma and the Arduino output pins are pretty rugged and I've had no problems to date wiring that way.

So keep in mind that user advice posted here is based on person experience and maybe not the best or only solutions to your task. Indeed I have even seen 'solutions and recommendations' posted here at times that was absolutely wrong (go figure, someone is wrong on the Internet  ;) )

Lefty

bld

Got it with one diode for each coil now, and even got one for the ULN2803 too, and hope it can just stay there too, so I don't have to move it again...

And I only got about 15mm for the one, and 20mm for the other, wire soldered on the bottom of the board... And they are Omron G2R-1-12V relays.
captain-slow.dk | non contagious!

jackrae

Without wishing to become embroiled in an argument about right and wrong circuit design, the 2803 has a potential weakness in that all 8 output suppression diodes are connected to a common pin.  If this pin, or its track becomes defective (even slighyly high resistance) the effectiveness of the onboard suppression diodes will be compromised.

The older generation of us will remember using lamp test circuits on control panel alarm lights,.by means of a common test button feeding banks of diodes to each indicator lamp. If any single diode failed short circuit, this acted as a common feed such that any circuit going into alarm would bring up all indicator lamps. - not much help when the bovine is hitting the fan.

ie a single failure mode can jeapordise all your circuits, so good design practice will endeavour to engineer out such common mode failures wherever possible.  For the price of a penny diode across each of the relay coils, your circuit integrity will be much improved.

jack

bld

#14
Jun 06, 2010, 06:11 pm Last Edit: Jun 06, 2010, 07:01 pm by bld Reason: 1
Almost finished the power supply.



One diode for each relay, and even one for the ULN2803 too (too lazy to remove it again).

The capacitors also helped on the voltage, the 12V is measuring 12.00V and the 5V is 5.01V, so this is so close to being perfect :D thank you, all who shared information here.

Also tested the relay functions, and everything is working just like expected, and the relays driven by the 12V circuit and control (+ Arduino) by the 5V.

Probably look extremely simple for most here, but this is actually the most "advanced" circuit I have made so far.




Got everything ready for it now, just asking a last time before destroying anything...

Should I be able to just connect the minus to GND and the 5.01V to the 5V pin on the Arduino, and then power it all from that?
captain-slow.dk | non contagious!

Go Up