advice for bench power supply as first arduino project

Hi,

After discussing with people here, I decided to do a bench power supply. I am at the point of thinking about the specs so far and want advice on these specs. I will then start doing the circuit design.

Desired characteristics

  • power from transformer / rectifier to get voltage DC levels appropriate for variable regulator max voltage.
  • supply 12, 5, 3.3 V fixed, not sure for current 5A maybe each?
  • variable supply 0-30V? 0-20V? 5A or so (LM 338 regulator?) and a pot.
  • measuring current on the fixed 12,5,3.3V
  • Measure voltage and current output on the variable voltage.
  • Current limiting?
  • LCD display showing current/ voltage for selected lines (or all maybe)
  • Arduino or atmel chip measuring current/voltage.
  • buttons to select options, which voltages are shown and other stuff as desired.
  • current limiting? heard about that but not sure what the use is aside from protecting a circuit.

I would appreciate advice on the above specs, to see if they are reasonable, and would like other desired specs from experienced people.

Thanks and best wishes.

Your first arduino project? I assume you have run several of the example programs. Which one comes closest to this new project?

Your description of the project sounds reasonable. Check in "Playground". There is lots of good information there. If you still have questions, we are here.

What are you going to do with it? Hard to build a bench supply into a project.
Likely to get more use out of a few fixed supplies that can become part of a project.
I use these 5V wallwarts to power a lot of boards and skip having an onboard regulator - seems redundant to have a 7.5V or 9V supply just to heat up a linear regulator to knock it down to 5V.
http://www.dipmicro.com/store/index.php?act=viewCat&catId=518

If you're using an Arduino or something already assembled, then 7.5V supply makes sense.
If you're driving bunch of LED strings, then 12V supply and appropriate current sinking parts (NPN, N-channel MOSFET, open drain shift register) for Arduino to control makes sense.
Motors servos often need 6V, which is too high to use as 5V source and too low to regulate down to 5V, but 6V thru a diode or two (measure the drop across the diodes - '328Ps will run 16 MHz down to ~3.8V, ADC readings might need some manipulating if using internal 5V as the reference) into the 5V header could be okay.

Anyway, that's what I have. A box of supplies, and I mix & match as needed.
I used to have big transformer based thing with dual +/- outputs to supply op-amps with +/-12V from linear regulators, and a big 7805 in pancake package screwed to the side for a 5V source for older 74F and 74AS logic, power hungry stuff that was, and now HC shift register and a CMOS uC replaced all that.

For the potentiometers used to adjust the output, a normal 3/4 turn pot will frustrate you during those times when you are doing something like trying to find out how low a voltage something can operate at. For instance, if you are building something that will operate off of batteries.

I hate those setups with two pots set up as a "coarse" and "fine" adjustment. There are 10 turn panel mount potentiometers that are relatively cheap these days, shop Amazon or eBay for them.

I'm working on converting a PC power supply by fooling it into putting 5V out of the 3.3V output, so the 12V will put out about 18V, which I'm then putting a linear variable regulator onto to get a variable supply with 15V max. Not really a beginner's project, as I have to rewire some things to trick the controller IC into thinking all the correct voltages are present.

If you can find an older PC power supply with the TI chip TL494 in it, it is much simpler to change the output.

As for the rest, this is not really a simple project to do all that you want. You'll need high side current measuring, high side current control either through a power PNP or a P-channel MOSFET. There will be a fair amount of design work to be done. We're here to help, but you need to design it. Do you know how to use Op Amps to measure a small voltage difference where both voltages are greater than the Op Amp's supply voltage? You said "0-20V or 0-30V", do you really need zero volts? What will run from 0.1V? What is a realistic lower limit? Is the 1.2V minimum that the LM338 can put out low enough? There are ways to take it lower, if necessary, but you'll need a negative voltage available.

Well I meant my first real project :slight_smile:

I did all the examples of the starter kit from arduino and tested many sensors and units. 2 wire, one wire, spi, varies sensors and parts commonly used with arduino. I did many sketches to play around and amprocicient in c.

For fixed power, I have already converted pc power supplies to have 12, 5, 3.3v

I axm just missing the variable one really.

Is this project overkill?

Great, sounds like you have already got your feet wet (so to speak).

Is this project overkill?

I think that is only a question you can answer. You are probably itching to use the arduino etc. on a new project. So it would be a great learning experience, and provide you something that you may(or may not) have a use for. It isn't easy for a hobbyist like myself to figure out what the next project should be.

What do you intend to power with it? Overkill is certainly one possibility.
If you just need a variable reference, than a 5K pot from 12V and another from 5V might be all that is needed.
If you intend to source any decent amount of current at various voltage levels and intend to measure that current, then a bench supply might be useful.

I've considered doing this too. I would probably use a well-heatsinked LT3080 chip and control it with a digital pot which is in turn controlled by the Arduino. The Arduino would monitor Vout (with a voltage divider) and adjust the pot to make Vout match whatever the user set in a LCD + rotary encoder user interface.

Vin would be provided by any handy 12V 1A wall wart, though you could parallel LT3080s and use a laptop power brick if you wanted more amps.

A linear supply dropping 12V to 5V or 3.3V is rather inefficient at high amperage levels, but I don't beleive it will generate excessive amounts of heat for typical Arduino loads, i.e., 100mA or so. And when I did have a high amp load, I would probably run it at 12V and I don't think I'd be running it for hours on end.

One thing I'm not sure how to do in this setup though is current limiting? The LTC3080 datasheet does show a 'lab supply' example, can another 1Ohm current sense resistor be added to Vout and read with analogRead() or is it more complicated than that?

You can use a standard Op Amp as a high side current sensor, if you wire it up correctly.

Connect an Op Amp as a differential input, then use a voltage divider from each side of the sense resistor. The sense resistor should be on the high side (unregulated side) of the voltage regulator. The voltage dividers bring the voltage down to below Vcc of the Op Amp, and in the differential configuration, the Op Amp amplifies only the difference.

With the right values of components, the output is referenced to ground so it is 0V at zero current, rising to some value like 5V at 5A. Then that is fed to the Arduino through an analog input.

Then an output can be fed to control a high side P channel MOSFET or PNP power transistor to start shutting it off when the current reaches your previously set setpoint.

Thanks polymorph, some of that went over my head though. Would an ACS714 work if placed between Vout and the load: Arduino Current Sensor ?

I'm not sure the Arduino is fast enough to throttle back amperage when it exceeds the set limit? Seems like things might fry by the time Arduino's ADC samples the current, notices it's too high, and throttles back the digipot. But, with the LTC3080, I beleive you can pre-set the digipot for a particular current limit (after an initial calibration) and let the IC clamp down on excessive amperage without any further help from the Arduino? So the current sense could just be for LCD display purposes.

Only other challenge is a 1MOhm digipot for the LTC3080 lab supply voltage stage doesn't seem to exist. But shunting various fixed resistors (say, 800K, 400K, 200K, 100K) in series with a 100K digipot looks like it can approximate the same thing: http://forum.arduino.cc/index.php/topic,96637.0.html

Sure, the ACS714 will work, it is isolated so no worries about reading from the high side. Placing it between Vout and the load will be fine as it is very low resistance.

However, it only puts out 66mV per amp of current, centered at 2.5V. That is only 13 bit changes per amp, or 67 bit changes from 0 to 5A. That is about 74mA per bit change. IE, zero current will be a reading of 512, and 5A will be 579. Just about 6 bits of resolution (2^6 = 64).

You could potentially level shift with an Op Amp so 0A is 0V, and amplify it. I'd also change the Aref source. By default it uses Vcc for the Arduino, but that means it is subject to the accuracy and stability of the Arduino's power supply. If you change to the internal reference, it is very stable over time, temperature, and Vcc changes. In addition, it is much lower, only about 1.1V. So 330mV of change from 0 to 5A would be about 306 bit changes, or about 8-1/2 bits of resolution.

I agree, the Arduino is too slow to rely on to limit current. I'd hook up an Op Amp to limit current. It can be connected to an NPN transistor across the adjustable resistor to ground, the Op Amp wired to go High on the output to turn on the transistor and pull the adjustment terminal Low. Or an open collector comparator wired to pull Low when the current goes to high. And make it and adjustable setpoint, using a digital pot so the Arduino is setting the maximum current.

What happened to the LM338? It is great that the LTC3080 can go down to 0V without additional circuitry, but it takes 1.5M ohm to get to 15V with that chip.

Look at the bottom of page 17 of the PDF, it tells you how to use a -much- lower value adjustment resistor while only sacrificing the zero volt output, bringing it down to 0.5V minimum.

http://cds.linear.com/docs/en/datasheet/3080fc.pdf

And if you look at the bottom of page 18, it shows how to add one more as a current regulator. So you'd use the first part of the circuit with an isolated 100k digital potentiometer, and for the second LTC3080 you'd use the circuit from the bottom of page 17 in order to use a lower value digital pot.

Keep in mind that most digital pots are only 8 bit resolution. OK for setting the maximum current, but at 15V output max with 8 bit resolution that is about 59mV per bit change. OK, well, that's pretty good, actually.

Awesome polymorph, thanks. I'm more of a software guy so this hardware stuff seems like black magic.

I'd like to be able to test low-voltage circuits (like Joule thief - Wikipedia) so getting down to 0.5V is an important feature to me. Nice find on that smaller-sense-resistor LTC3080 circuit, that makes hardware and software easier than shunting resistors.

As for controlling the current, I understand the concept of an op-amp controlling a transistor, but that seems to be all the guts of an LTC3080 are anyway (plus a few other bells and whistles). I believe a 1024-step digipot will give approx. 1mA per step with an LTC3080 (0-1.1A) controlling current, which seems reasonable. Of course due to parts tolerance I might not get quite the full range, but .001-1.0A is good enough for my purposes.

Sucks about that ACS714 mV-to-A resolution. And it's not exactly a cheap chip. So, I'm no EE, but why can't we use a low-side precision 1ohm sense resistor? I believe 1ohm will drop 1.1V at 1.1A, which we could maybe measure with the Arduino's ADC using the internal 1.1V reference? I know low-side sensing isn't ideal but with only one Vout I think it might be ok?

polymorph:
You can use a standard Op Amp as a high side current sensor, if you wire it up correctly.

Connect an Op Amp as a differential input, then use a voltage divider from each side of the sense resistor. The sense resistor should be on the high side (unregulated side) of the voltage regulator. The voltage dividers bring the voltage down to below Vcc of the Op Amp, and in the differential configuration, the Op Amp amplifies only the difference.

With the right values of components, the output is referenced to ground so it is 0V at zero current, rising to some value like 5V at 5A. Then that is fed to the Arduino through an analog input.

Then an output can be fed to control a high side P channel MOSFET or PNP power transistor to start shutting it off when the current reaches your previously set setpoint.

I think I know what you mean, so I took the opportunity to take a look at fritzing, and made a VERY crude diagram. Does it represent what you meant? Ignore the resistance values, just look at the concept. Keep in mind I am pretty green :slight_smile:
Hopefuly the pic displays properly.