Shop OBEX P1 Docs P2 Docs Learn Events
Need guidence and ideas — Parallax Forums

Need guidence and ideas

TCTC Posts: 1,019
edited 2013-11-26 03:09 in Propeller 1
Hello all,
I have a project idea of using a computer power supply as a bench supply. I want to use the prop to control the power supply, monitor the "PS_OK" line, and monitor the voltages and currents. But I am having problems deciding on a few things.
1: what bit ADC should I use
2: what reference voltage I should use
3: what current sensor should I use
4: what display should I use.

I know these are all open ended questions, but here are my thoughts.

I was thinking of having .0001V resolution for the 3.3v, 5v, and the 12v rails. but I don't know if that would be worth it.
I was thinking of using Allegro's "ACS" line of current sensor, 20A with a .0001A resolution. But again I don't know if it would be worth it.
Then there is the problem of the display. I have 3 ideas, first use a 240x128 monochrome graphic display. second, use a 4x16 character display. third, use 7-segment displays driven by "MAX7219"

My mind cannot decide what it wants to do. PLEASE help me decide what would be the best options for me, or what would you do.
Thanks.
TC

Comments

  • SRLMSRLM Posts: 5,045
    edited 2013-11-23 15:29
    On a slightly related note, on a modern power supply that I've used I noticed that it didn't do well with voltage spikes on the power rails: the supply would automatically turn off. The voltage spikes came from back EMF from a motor.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-11-23 15:31
    You're missing a few important steps ...

    Is the power supply suitable for the uses I want to put it to?
    What are those uses?

    Many computer power supplies require a minimum current drain, usually on the 5V supply, before they'll regulate properly. Some require specific minimum loads on other output voltages.

    What voltages do you want to use? How much current do you want to be able to draw? What about other supply outputs?

    What do you want to display? What are you going to use to power the Prop and its associated devices including the display (whatever it is)?
  • jmgjmg Posts: 15,173
    edited 2013-11-23 15:32
    First, I'd check just how much control you can get, over what load and voltage ranges.

    SMPS usually have a limited sweet spot, and multi-rail ones can scrimp with inferred regulation.
    - ie they use the winding ratio, and do not try to resistance-correct

    A dummy load can help, if you want the external load to be able to go to zero on any rail, with some regulation maintained.
  • TCTC Posts: 1,019
    edited 2013-11-23 15:54
    SRLM wrote: »
    On a slightly related note, on a modern power supply that I've used I noticed that it didn't do well with voltage spikes on the power rails: the supply would automatically turn off. The voltage spikes came from back EMF from a motor.

    I have not tested the supply with voltage spikes yet, so I dont know if the supply would shut off. I would assume it would since it is a cheep one.
    Mike Green wrote: »
    You're missing a few important steps ...

    Is the power supply suitable for the uses I want to put it to?
    What are those uses?

    Many computer power supplies require a minimum current drain, usually on the 5V supply, before they'll regulate properly. Some require specific minimum loads on other output voltages.

    What voltages do you want to use? How much current do you want to be able to draw? What about other supply outputs?

    What do you want to display? What are you going to use to power the Prop and its associated devices including the display (whatever it is)?

    I wanted the power supply to be able to handle at most a few stepper motors. But that is not for some time.

    Since it is a cheep power supply, the supply powers up, PS_OK is working, and the voltages seem like they are ok when I measured them with my radio shack meter with no load.

    I was only thinking of using the 3.3V, 5V, and the 12V outputs. as well as the +5VSB just for the propeller (with a 3.3V regulator). I was thinking of being able to measure up to 20A of current on each output.

    On the display, I was thinking of just showing the Voltages, and the current of each output. And I think it would be nice to have all the outputs displayed at the same time.

    Powering the prop, and some of the other things would be powered from the +5VSB line. If they are not needed for standby mode, then they would not be on the +5VSB line.


    jmg wrote: »
    First, I'd check just how much control you can get, over what load and voltage ranges.

    SMPS usually have a limited sweet spot, and multi-rail ones can scrimp with inferred regulation.
    - ie they use the winding ratio, and do not try to resistance-correct

    A dummy load can help, if you want the external load to be able to go to zero on any rail, with some regulation maintained.

    Could you please explain more, I cant seem to understand what you are talking about.
  • Mark_TMark_T Posts: 1,981
    edited 2013-11-23 16:00
    Computer supplies are switch-mode and definitely noisy. They can afford to be noisy, digital circuitry is happy with
    circa 100mV of noise, it doesn't care. Most computer motherboards contain another switch-mode supply to drop
    3.3V down to processor voltage (0.9V or whatever at, perhaps, 150A). That itself injects so much noise back into
    the rail that there's no point building low-noise computer PSU!

    So there won't be much point going beyond 8 bit ADC unless you want to examine this noise in detail I reckon.

    However if you are contemplating adding some LDO linear regulation as well then more accuracy is useful, 10 bits
    is plenty unless you are going to have sense wires too (the voltage at the supply is not the voltage at the load with
    any normal wiring in between and a few amps flowing). If you total wiring is 0.01 ohm then 1A is 10mV drop, or
    2 LSBs at 10 bit sampling for a 5V rail.

    [ Oh yes, the ACS712 etc line of hall effect current sensors are very noisy themselves, expect 0.1A resolution at best ]
  • TCTC Posts: 1,019
    edited 2013-11-23 16:11
    Mark_T wrote: »
    Computer supplies are switch-mode and definitely noisy. They can afford to be noisy, digital circuitry is happy with
    circa 100mV of noise, it doesn't care. Most computer motherboards contain another switch-mode supply to drop
    3.3V down to processor voltage (0.9V or whatever at, perhaps, 150A). That itself injects so much noise back into
    the rail that there's no point building low-noise computer PSU!

    So there won't be much point going beyond 8 bit ADC unless you want to examine this noise in detail I reckon.

    However if you are contemplating adding some LDO linear regulation as well then more accuracy is useful, 10 bits
    is plenty unless you are going to have sense wires too (the voltage at the supply is not the voltage at the load with
    any normal wiring in between and a few amps flowing). If you total wiring is 0.01 ohm then 1A is 10mV drop, or
    2 LSBs at 10 bit sampling for a 5V rail.

    [ Oh yes, the ACS712 etc line of hall effect current sensors are very noisy themselves, expect 0.1A resolution at best ]

    See, That is why I ask questions. I had no idea PSU's were that bad, I always assumed they were very clean voltages. Maybe it might be best just to hook up a switch to the PSU and use my meter when I need to check things.
    But I am open for ideas.
  • kwinnkwinn Posts: 8,697
    edited 2013-11-23 16:45
    First, keep in mind what Mike Green and jmg posted. Not much point in spending a lot of time and effort on something that does not meet your needs, or something that goes far beyond your actual needs.
    1: what bit ADC should I use
    2: what reference voltage I should use
    A 12 bit ADC will provide better than 0.1% resolution, and a 4.096V reference voltage will provide a 1mV per bit resolution for voltages up to 4.096V.
    3: what current sensor should I use
    Depends on your application. For a power supply current I rarely need to know the actual current to better than 10mA, and for circuits that draw low currents my multimeter works just fine.
    4: what display should I use. I have 3 ideas, first use a 240x128 monochrome graphic display. second, use a 4x16 character display. third, use 7-segment displays driven by "MAX7219"
    Depends on your ultimate goals. I am using an old 15” LCD display driven by a propeller so that I can monitor up to 8 voltage/currents at a time. I hope to add a scope and logic analyzer to it at some point.
    I was thinking of having .0001V resolution for the 3.3v, 5v, and the 12v rails. but I don't know if that would be worth it.
    Probably not worth it. Most electronics will work just fine with any voltage that is within +-5% of the specified nominal voltage, so why go to extreme accuracy unless you need the precision for something.
    I was thinking of using Allegro's "ACS" line of current sensor, 20A with a .0001A resolution. But again I don't know if it would be worth it.
    Probably not, it seems like overkill.
    My mind cannot decide what it wants to do. PLEASE help me decide what would be the best options for me, or what would you do.
    Thanks.
    TC

    Take a look at what you realistically need for what you are doing now and look at equipment that exceeds those requirements by a reasonable amount. Don't go overboard on specs. Equipment continues to drop in price and increase in performance at a rate that makes purchasing equipment far beyond current needs a bad decision.
  • jmgjmg Posts: 15,173
    edited 2013-11-23 21:34
    TC wrote: »
    Since it is a cheep power supply, the supply powers up, PS_OK is working, and the voltages seem like they are ok when I measured them with my radio shack meter with no load.

    I was only thinking of using the 3.3V, 5V, and the 12V outputs. as well as the +5VSB just for the propeller (with a 3.3V regulator). I was thinking of being able to measure up to 20A of current on each output.

    You might find 20A is more liability than asset, 20A+ will remove a fine track from a PCB.

    If you do not need to adjust this, but just measure Vcc/Icc things are simpler, but I would still check the effect of load changes on voltages of the other rails

    Personally, I like bench supplies that adjust to 0V, as you can do margin and brownout testing.
    A simple linear post-regulator can give you adjustment and a more moderate current limiting.

    With something as cheap and universal as a LM317, you can adj to 0V if you provide a negative supply rail.

    A device that appeals for Supply monitoring, is the Microchip PAC1720 - this has mV (for Amp shunts) and V scaling built in, and is i2c.
  • TCTC Posts: 1,019
    edited 2013-11-24 11:08
    Because of all the wonderful advice, and opening of my eyes, here is my plan.

    still using the prop, I will use my 16x4 display, to show the voltage, and current of the outputs. for the outputs:
    3.3V, I am only going to worry about .001V resolution, and only measure up to 1A of current
    5V, i am going to worry about .001V resolution, and only measure up to 2A of current. (incase I use servo motors, and I have more 5V parts)
    12V, I am going to worry about .01V resolution, and measure up to 10A of current.
    kwinn wrote: »
    Take a look at what you realistically need for what you are doing now and look at equipment that exceeds those requirements by a reasonable amount. Don't go overboard on specs. Equipment continues to drop in price and increase in performance at a rate that makes purchasing equipment far beyond current needs a bad decision.

    Thats what I did. I realized I was over thinking things, I was thinking of "what ifs"
    jmg wrote: »
    Personally, I like bench supplies that adjust to 0V, as you can do margin and brownout testing.
    A simple linear post-regulator can give you adjustment and a more moderate current limiting.

    With something as cheap and universal as a LM317, you can adj to 0V if you provide a negative supply rail.

    A device that appeals for Supply monitoring, is the Microchip PAC1720 - this has mV (for Amp shunts) and V scaling built in, and is i2c.

    I wish I could afford a bench top power supply, but I have to work with what I got. I dont really think I would ever need to vary the voltage, but if I do, I can add it.

    For the PAC1720, It is perfect, I will be using it.

    Thank You everyone, I knew if I asked the questions you guys would help me get my brain in order.
  • kwinnkwinn Posts: 8,697
    edited 2013-11-25 22:40
    TC wrote: »
    Because of all the wonderful advice, and opening of my eyes, here is my plan.

    still using the prop, I will use my 16x4 display, to show the voltage, and current of the outputs. for the outputs:
    3.3V, I am only going to worry about .001V resolution, and only measure up to 1A of current
    5V, i am going to worry about .001V resolution, and only measure up to 2A of current. (incase I use servo motors, and I have more 5V parts)
    12V, I am going to worry about .01V resolution, and measure up to 10A of current.



    Thats what I did. I realized I was over thinking things, I was thinking of "what ifs"



    I wish I could afford a bench top power supply, but I have to work with what I got. I dont really think I would ever need to vary the voltage, but if I do, I can add it.

    For the PAC1720, It is perfect, I will be using it.

    Thank You everyone, I knew if I asked the questions you guys would help me get my brain in order.

    Sounds like a pretty good plan so far. Am I correct in assuming these are going to be fixed voltage supplies? If so you may want to consider adding a low current adjustable supply using a linear 3 terminal regulator powered from the fixed 12V supply. That would give you an adjustable output from 1.2V to 10+V for a very small increase in cost.

    PS - Those "what ifs" have cost me quite a bit over the years, and provided very little in the way of payback.

    Good luck with your project.
  • TCTC Posts: 1,019
    edited 2013-11-26 03:09
    kwinn wrote: »
    Sounds like a pretty good plan so far. Am I correct in assuming these are going to be fixed voltage supplies? If so you may want to consider adding a low current adjustable supply using a linear 3 terminal regulator powered from the fixed 12V supply. That would give you an adjustable output from 1.2V to 10+V for a very small increase in cost.

    PS - Those "what ifs" have cost me quite a bit over the years, and provided very little in the way of payback.

    Good luck with your project.

    Yes, you are correct, these are going to be fixed voltage supplies. I was contemplating on having an adjustable supply, but I dont know what I would use it for.

    The "What ifs" is why I had to ask the forum, I knew my mind was over thinking things, and it needed to be brought back to earth.

    Thank You
Sign In or Register to comment.