Power supply choice

27 Jul 2012

I'm moving along with my project and now I have to make a design choice that I'm not sure which direction to take: the power supply voltage.

Here are the project facts:

  • The mbed will run without a PC so I need to supply it with external power
  • Drive a LCD which requires 3.3v and low current
  • Will read 1 or 2 DS18S20
  • Will read a pH probe via ADC (part of the solution involves a -5V rail so a LMC7660 will be used).
  • Will control a few optocouplers to drive relays for 110V-240V AC devices. The relays themselves will use a separate power supply to limit the noise and avoid too much current being drawn. Another option is to use SSRs and drive them directly on mbed.
  • Will control 4 to 8 0-10V analogue output with maximum of 10mA each.

All of this can be easily done with a 5V power supply except for the last one. To get 0-10V I need to amplify a 0-3.3v analog output (that I generate either via an external DAC or by adding a RC filter on a PWM port) with an opamp, this will require a power supply slightly above 10V.

Given that a separated power supply for this part alone is the least preferred option what would you recommend? My limited head proposed to me so far: 1) a 12V power supply with a switching step-down to 5V which will drive everything and let 12V directly into the opamp. 2) a 5V power supply to drive everything and a step-up circuit just to drive the 0-10V opamps.

I'm open to all ideas :)

Thanks

Silvio

27 Jul 2012

12V makes the most sense here. Seems like an isolated wall wart would work well.

01 Aug 2012

I have a similar sensor project but needed +/-10V out at 10mA for the sensor. For my circuit I used an external Microchip SPI DAC as I just could not get the mbed dac noise low enough.

I use an onboard 5V to +/-12V converter which runs at 80%+ efficiency for the opamp supplies. For the mbed and all of the circuitry I use a 5V 1A switch mode wall wart for mains power, but also have 4xAA cells when I want portability (lasts a few days according to the duty cycle of use).

But for you if you are powered via the mains a 12V supply is fine.

01 Aug 2012

Kevin Hobbs wrote:

I have a similar sensor project but needed +/-10V out at 10mA for the sensor. For my circuit I used an external Microchip SPI DAC as I just could not get the mbed dac noise low enough.

Thanks for the reply. I need at least 4 0-10V so the mbed DAC was out of the question but good to hear that the SPI DAC gave you good results. I'm planning to use Linear's LTC1660 DAC, which Microchip DAC did you went with?

Kevin Hobbs wrote:

I use an onboard 5V to +/-12V converter which runs at 80%+ efficiency for the opamp supplies. For the mbed and all of the circuitry I use a 5V 1A switch mode wall wart for mains power, but also have 4xAA cells when I want portability (lasts a few days according to the duty cycle of use).

But for you if you are powered via the mains a 12V supply is fine.

My project will only run on mains, no portability needed. Sounds like a waste to have a 12V supply just to run 90% of the circuits with 5V from another switching supply. In the other hand it will surely be cheaper than build a step-up 5V to 12V. This is my first design, not sure what the "industry best practices" are for most cases.

Silvio

02 Aug 2012

I am faifly sure you can get a 5Volt in, +/-12 Volt out stitcher 'LEGO BRICK',

and all that needs is 100uF caps.

I think the ramge is INA0512,

but there are 2-3 manufactures,

WARNING ! if you are taking 10mA @ 12V = 30mA on the 5Volt rail. (not sutable for batteries)

W out = W in + 2-5%

you canot get nothing for nothing,

If i can find the parts when i get to my PC, then i will update.

Ceri

02 Aug 2012

Quote:

I'm planning to use Linear's LTC1660 DAC, which Microchip DAC did you went with?

I actually used a Microchip MCP4822 or 4821 (not at desk, so not quite sure!) which went well. An extract of my code follows.

void Output_Volts(unsigned short Analog_out)
{
unsigned short Code_out;      // unsigned 16bits
    Code_out = 0x3000 + Analog_out;     // 0x11 = ChanA,x,Vout =Vref * data/4096, Output active 
                                        // Send 0x3XXX, the command to set 0x11,NibH, NibM, NibL i.e 0x3,data 12bits
    cs = 0;                             // Select the device by seting chip select low
    spi_dac.write(Code_out);
    cs = 1;                             // this action actually writes the data to the analog out pin   
}

simply called in my case by (yes I know it could be done in one line... but I wanted to keep final calculations separate).

Analog_out = 0x7FF;                 // set for nominal zero volts   *** need to add in calibration offset
Output_Volts(Analog_out);           // output to SPI dac

These DAC's work well an I powered mine from a low noise 5V linear regulator and treated the whole circuit as an analogue part to keep all digital noise away.

Re thinking your requirements.... 12Volts will be more 'normally' available, but will often be used with solenoids and valves etc., so will be noisey. With your own dedicated supply I would use the 5V supply to keep disipation lower and use a 5V to +/-12V module. As Ceri refered to a "lego brick" mine was a NMK0515SAC (actually +/-15V) and with the recommended decoupling and filtering worked well.

Contrary to Ceri's comment on battery power, mine is battery powered using NMHi AA cells of 2,400mAH capacity and with my usage duty cycle and expected system use duration between recharges works well, so it depends on your application, but for you this is not an issue.

Just to add a few extra comments on the mbed; I use multiple A/D readings per point i.e. readings are recorded at 100mS intervals but each is the average of 25 readings, using this techniquie I achieve sub one bit resolution. The external 3V3 supply is different from the onboard mbed 3V3 supply and as such may not track well if used for biasing the DAC output around zero i.e. bipolar operation. Makes sure you decouple the mbed well close to the pins, someone advised me to treat the mbed as a 'regulator chip' with a good input and output capacitors to a ground plane/ ground point and this worked well. Also use several ceramic capitors in parallel, high values and low to get rid of the supply spikes.

Hope that helps.

03 Aug 2012

Kevin Hobbs wrote:

I actually used a Microchip MCP4822 or 4821 (not at desk, so not quite sure!) which went well.

These DAC's work well an I powered mine from a low noise 5V linear regulator and treated the whole circuit as an analogue part to keep all digital noise away.

The cost per port for MCP4822 and LTC1660 is about the same but Microchip's is 12 bits while Linear is 10 bits. It is interesting that you got 5V at VDD and still managed to use mbed's 3.3V digitalout for the SPI, the datasheet specs is 0.7 VDD for "high" which is 3.5V. I was going to power the DAC from mbed's 3.3V directly. Once I receive my LTC1660 I will run some tests. I don't need super precise output but I do need it to be stable.

Kevin Hobbs wrote:

Re thinking your requirements.... 12Volts will be more 'normally' available, but will often be used with solenoids and valves etc., so will be noisey. With your own dedicated supply I would use the 5V supply to keep disipation lower and use a 5V to +/-12V module. As Ceri refered to a "lego brick" mine was a NMK0515SAC (actually +/-15V) and with the recommended decoupling and filtering worked well.

Thanks for the part number, I was going to build a step-up circuit but having a discrete component definately looks better. With 8 outputs at 10mA (max) I will be drawing around 250mA from the 5V for the opamps, I guess that strong decoupling on the step-up and opamps will be the key.

Kevin Hobbs wrote:

Just to add a few extra comments on the mbed; I use multiple A/D readings per point i.e. readings are recorded at 100mS intervals but each is the average of 25 readings, using this techniquie I achieve sub one bit resolution. The external 3V3 supply is different from the onboard mbed 3V3 supply and as such may not track well if used for biasing the DAC output around zero i.e. bipolar operation. Makes sure you decouple the mbed well close to the pins, someone advised me to treat the mbed as a 'regulator chip' with a good input and output capacitors to a ground plane/ ground point and this worked well. Also use several ceramic capitors in parallel, high values and low to get rid of the supply spikes.

Hope that helps.

Not sure I got the "external vs mbed" 3.3v supply. I won't have bipolar operation on the DACs but will on the ADC circuit for pH which is basically two opamps with insanely low current bias. The pH probe reads between -414mV and +414mV, the reading should be always somewhere between 100mV and 200mV, a 10 mV error here is already high enough to throw the reading way off. Hopefully using 3.3v supply and the "array" of parallel capacitors that you suggested will be enough to get stable readings. I believe that mbed's library ADC already samples 3 times before getting the results back but I will definately lean towards 15-20 readings.

Many thanks for the very informative reply, helped a lot. I hope to post soon on my tests and results.

Best regards

Silvio

04 Aug 2012

Quote:

It is interesting that you got 5V at VDD and still managed to use mbed's 3.3V digitalout for the SPI, the datasheet specs is 0.7 VDD for "high" which is 3.5V. I was going to power the DAC from mbed's 3.3V directly.

MY MISTAKE I powered it from a low noise 3V3 regulator - sorry.

Quote:

Not sure I got the "external vs mbed" 3.3v supply.

The mbed has two onboard linear regulators, one used by the uC chip the other available at the external supply pin. Just pointing out they are not the same and hence if used for in an analogue circuit with on board DAC/ADC they will not necessarily track.

Good luck with your design and look forward to seeing a published design.