MCU for Controlling High Voltage

Discussion in 'The Projects Forum' started by nullDereferenced, Feb 14, 2012.

  1. nullDereferenced

    Thread Starter New Member

    Feb 14, 2012
    8
    1
    Greetings from my first post here! (not counting that test one, sorry about that).

    What I have are 24 channels to control. Each channel drives an almost purely capacitive load. The capacitance of the load for each channel is low (in the fempto range). This is really a DC circuit, and I really only need for each channel to charge its capacitor and hold the voltage across it. The voltage for each channel would preferably be in the range of 0-400V. I would like to be able to control each channel from a computer linked to a cheap microcontroller such as the PIC18F45K20. Cheap cheap cheap is the overall name of the game here.

    What I have tried so far is to setup an NPN transistor in the common emitter configuration, with 400V going through a resistor and into the collector of the transistor. Emitter hooked to ground. Capacitive load hooked between collector and emitter.I then had a separate power supply of 10V that drained into a potentiometer which then sourced a resistor going into the base of the transistor. By using the potentiometer to vary the voltage going to the base resistor (which in turn varied the base current), I was able to vary the voltage that was going to the capactive load. I had a circuit like this for each of the 24 channels. I also included an op amp in the original design for each channel as a voltage follower on the potentiometer. I have attached a hand drawn schematic.

    After realizing that hand adjusting the potentiometers for each channel wasn't a feasible option in the long run (and probably not as safe as I'd like it), I decided to try out computer control (e.g., a GUI with sliders for each channel). What I have come up with is to replace the hand adjustable pots with digital pots that I can control via I2C with a microcontroller. I found some dig pots that each have 2 channels on a chip, and can be configured for 8 different I2C addresses (i.e., 8 of that same model chip on one I2C bus). So I was thinking 2 I2C buses with 6 chips a piece (total of 24 channels), then use 2 digital pins from the MCU to write to each I2C bus (4 digital pins total). Communication from PC to MCU done via serial commands over a USB to TTL connector. I've also attached a simple schematic of that.

    The idea with using I2C communication is that digital outputs are cheap and common whereas it seems analog outputs will run a higher cost. If I had a cheap MCU with 24 analog output channels then I could just directly vary the voltage to each transistor base, but it seems like it will cost quite a bit more than the PIC's $2 price, but I could be mistaken of course.

    I am just wondering overall if there is a better way to do this. The common emitter design was just the first thing that seemed cheap and like it might work so I went with it. The charge time for each channel doesn't have to fast as you could probably guess by the manual control. A few seconds would even be acceptable, so low current is not huge issue. Making the computer programs isn't an issue either (that's probably what I'm best at).

    Please give me some feedback and suggestions on this. Thank you very much for your time.
     
  2. mkbutan

    Senior Member

    Sep 30, 2008
    270
    16
    what is the use of 400v
    where are you using it for is it theoretical question or you are using it practically
     
  3. mcasale

    Member

    Jul 18, 2011
    210
    12
    What are you trying to do? 400V can be very dangerous.

    Caution: once you charge your capacitors, and then turn on a transistor, you will have an unimpeded slug of current discharging from the capacitor into the collector.

    Also, you need to ensure your Base-Collector rating is really big. Same with the Collector-Emitter rating.
     
  4. nullDereferenced

    Thread Starter New Member

    Feb 14, 2012
    8
    1
    You mean that doesn't seem like a useful circuit? :D

    The capacitive load is essentially an electrostatic actuator. I am using this circuit for deformable mirror applications. Between 0V and 400V is applied to a plate which is fixed a small distance from a mirror surface. The mirror surface is grounded. This essentially forms a capacitor and also produces an electrostatic force that will pull the mirror towards the actuator. The force of attraction is controlled by varying the voltage to the plate (0V to 400V in this case). This system has 24 actuators; each would be fixed at different positions above or below the mirror so that a desired shape of the mirror can be achieved. Each actuator's applied voltage is independent of the others (neglecting the field interactions among the actuators).

    Does that give a good idea?

    Thanks.
     
  5. nullDereferenced

    Thread Starter New Member

    Feb 14, 2012
    8
    1
    Yes, 400V is extremely dangerous. Thank you for pointing that out for anybody reading this. I have been working with high voltage electrostatics for quite a few years (it's a big part of my research focus). I take quite a few precautions when performing tests. Sometimes, we get what is called "snap down" in which the electrostatic force is enough to pull the mirror to the actuator plate. This causes a short circuit and man do sparks fly!! I'm no where near that when it happens lol.

    So yes, take lots of precautions when playing with electricity.
     
  6. mkbutan

    Senior Member

    Sep 30, 2008
    270
    16
    hi
    I may be wrong but
    electrostatic actuator It is operated by a source of energy, usually in the form of an electric current, hydraulic fluid pressure or pneumatic pressure but for that (0-400v !)
     
  7. nullDereferenced

    Thread Starter New Member

    Feb 14, 2012
    8
    1
    Electrostatic Force for parallel plate capacitors (what we have for the deformable mirror system) is governed by the equation:

    F = (V^2 * eps_0 * A) / (2 * d^2)

    With:

    V= Voltage between plates
    eps_0 = permittivity constant
    A = area of plates
    d = distance between plates

    So by increasing or decreasing the voltage, you increase or decrease the force between the mirror and actuator. Obviously, there are dynamics involved here because d changes as the mirror moves. But we don't need to worry about that here.
     
  8. russpatterson

    Member

    Feb 1, 2010
    351
    16
    Sounds like an interesting project. What's the purpose of deforming the mirror? Interactive fun-house type thing? I'm not aware of a uC with 24 analog outputs. Usually there's a just a few bits of resolution on the built in DAC's on the uC's. You can get an IC that does lots of channels of analog output with quite a bit of resolution if you need it. Take a look here: http://search.digikey.com/us/en/cat...igital-to-analog-converters-dac/2556292?k=dac
     
    nullDereferenced likes this.
  9. mkbutan

    Senior Member

    Sep 30, 2008
    270
    16
    ok
    may be;
    but which Tr. are you trying to use with 400v at 'C' and 10v at 'B'
     
  10. mkbutan

    Senior Member

    Sep 30, 2008
    270
    16



    may be you required opto cupple in between the Tr. and the μC with mixer to fead the i/p to the μC

    as seen in schem 2
     
    nullDereferenced likes this.
  11. nullDereferenced

    Thread Starter New Member

    Feb 14, 2012
    8
    1
    Thanks Russ,

    It can actually be used for quite a few different applications. The two main ones I am focusing on are astronomy and communications. In astronomy, deformable mirrors may be used to augment telescope mirrors. As light enters the atmosphere it becomes distorted and the image is blurred. By correctly changing the shape of the mirror which the light reflects off of, you can actually correct those distortions and get a clear image. It can also be used to steer lasers for communication purposes. Many other applications too.

    Those DAC ICs might be a much cleaner and cheaper option than the digital pot option that I was looking at. I will look further into them. Thanks for the suggestion!!

    mkbutan,

    Sorry, I should have also mentioned that varying the gap is another way to vary the force. So as you mentioned, piston type systems are used for that purpose. Also, "charge control" is another method so maybe that is what you were referring to with the current? Although, with the voltage variation current still flows while the plates are charging (plus some for the unaccounted resistances to ground).

    I don't remember the exact model that I used previously, but they were rated for 400V Vce and greater than 10V at Vbe. There are many available for higher ranges than that.
     
    mkbutan likes this.
  12. nullDereferenced

    Thread Starter New Member

    Feb 14, 2012
    8
    1
    what's the i/p?
     
  13. mkbutan

    Senior Member

    Sep 30, 2008
    270
    16


    Input port of the μController
     
  14. nullDereferenced

    Thread Starter New Member

    Feb 14, 2012
    8
    1
    Thanks mkbutan,

    Just to make sure I understand, are you saying go MCU->Mixer->DAC->Opto->Tr ? With the idea being that the opto will protect the MCU and DAQ from the high voltage if something goes wrong?
     
  15. mkbutan

    Senior Member

    Sep 30, 2008
    270
    16

    yes you are right √:)

    but Tr => your Ist I/P
    Opto => Mixer IInd I/P
    ADC => μController
    From input => output
    Tr.=>Opto=>Mixer=>ADC=>μController
     
    Last edited: Feb 14, 2012
  16. nullDereferenced

    Thread Starter New Member

    Feb 14, 2012
    8
    1
    I think I want to go the other way, use digital output from MCU to ultimately control collector voltage of the transistor.
     
Loading...