Shop OBEX P1 Docs P2 Docs Learn Events
reading voltage up to 330 volts with a microcontroller — Parallax Forums

reading voltage up to 330 volts with a microcontroller

science_geekscience_geek Posts: 247
edited 2009-11-09 10:48 in General Discussion
I have a capacitor bank set up that charges up to 330 volts, i want to know what the voltage is at a certain point in time as the capacitors charge. is there such a device that will output a serial signal or pwm or something that i could read with either the propellor or basic stamp. this is for a charging circuit to charge the capacitors

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-11-09 05:58
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-09 06:02
    You need a high resistance voltage divider fed into an analog to digital converter. The voltage divider would have something like a 100:1 ratio, maybe a 1 megOhm resistor with a 10K pot and a 5K fixed resistor set up like this:
    
    330V -----\/\/\/\/-----/\/\/\/\-----\/\/\/\/----- Ground
                   1 Meg       10K Pot         5K
    
    


    The wiper on the Pot gets connected to the input of the ADC and you charge up the capacitors to some voltage you know, whether it's 100V or 330V, then you measure the voltage at the Pot's wiper and adjust the Pot so that the wiper voltage is 1/100th of the voltage across the whole resistor string.

    Remember that the resistors all have to be rated for the voltage involved. You may want to put a 5.1V Zener diode between the Pot wiper and ground to clamp that voltage in case of a failure of the 1 MegOhm resistor.

    Either a Prop or Stamp can handle an ADC.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-09 06:54
    If your capacitor bank is isolated from the power mains and shares a common ground with the measuring equipment great! The prior suggestions will work just fine. But, if your cap bank is being fed directly from the power mains (e.g. by a diode voltage multiplier) or if its ground is floating and can't be commoned to the ADC's ground, you will have to consider other options.

    -Phil
  • science_geekscience_geek Posts: 247
    edited 2009-11-09 07:09
    thank you all for such a quick reply. That is the kind of stuff that im looking for, i should have this working pretty quickly now, as for the caps, they are connected to a common ground and the power that comes from the charger is connected to the power supply of the prop or stamp (not really sure which one to use yet, depends on other people)
  • dMajodMajo Posts: 855
    edited 2009-11-09 10:48
    Mike and PhiPi have already answered.
    Just for security (as is usually done in such (HV) applications) I suggest you to replace the 1M resistor with two 500K or three 330K wired in series (just in case one fails)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
Sign In or Register to comment.