JWoodrell 285 Posted April 10, 2014 Share Posted April 10, 2014 I posted this on a different forum and got some help but wanted to run it past you guys to see if anyother ideas shook out of the tree. [this is a repost from a different forum combining a few of my posts] hey guys the project I am working on requires me to sense the presence of 120v on 15 different lines back to my microcontroller, trying to do it with optocouplers means i have to drop 120v across resistors to provide 20mA to the opto LED means i am dissipating 2.5W on 15 different resistor sets... 30W in a relatively small plastic box is gonna get very hot.there has to be a simple way to detect, hey there is voltage here. no power is required eventually just driving the input to the micro through an opto for isolation. I can't find any microtransformer on digikey, although I may not be looking in the right place.the end goal is just verifying the SSR relays are actually "closing" to verify that voltage is being sent out to the control relays. they are 100-c09d10 allen bradley relays on the equipment I am building this for so I have to work with them. they only draw about 80mA when once they are closed so i don't think there is enough for a current sense solution... but I am open to whatever ideas people have.thanks for helping me with this, ac stuff is still new to me, my projects are usually just 3.6-5V dc stuff. [----------------------------------------------------------------------------------------] well this is how this ended upthe simulator predicted 30mA through the opto-coupler, and the physical circuit hit around 36mA if you discount an oscillation (which happens each time and I'm not sure why but i don't think its a problem) the part is rated for a max of 150mA input current so i don't think 30-40 is gonna hurt it. i think i can write off the difference to the simulator using "generic" LEDs and also the resistor being 5% and the cap being 10% tolerance. ah well close enoughI am using the input pullup resistor in the micro controller to pull up the open collector on the output transistor, so it goes low when voltage is present, and high when not... and as a nice side effect there is a short timing pulse when the current is 0 (changing directions) at the top and bottom of the sine wave that gives me a short timing pulse i can time the operation to for a zero crossing switching of the SSRsall in all this worked out very well, thank you guys for the help. there is a small oscillation (at around 1MHz but it is very small around 2mA) but I'm not worried. [----------------------------------------------------------------------------------------] how I ended up hooking it up. The optocoupler does in fact pull the line low, and even gives me a timing pulse incidentally here is the oscillation at the peak current draw here is the current draw plot in general (across a 100 ohm resistor) more of a triangular wave rather than a sine that the simulator predicted, but i guess thats real world components any thoughts on better or simpler ways to do it? Quote Link to post Share on other sites
Fred 453 Posted April 10, 2014 Share Posted April 10, 2014 If you're trying to minimise power draw, how about having a voltage divider with a high resistance and detect this lower voltage with a high impedance amplifier? A more complicated circuit, but less power dissipation. It depends what is the priority. After a quick Google throws up TI's AMC1100 Isolation Amplifier (or maybe other alternative products on the page). http://www.ti.com/product/amc1100 I haven't looked at it in detail but that's the sort of thing I was thinking of. Also, does the opto really need 20mA? A few mA are not worth worrying about at normal driving voltages, but if you could get away with 5mA that might make a significant difference in this case. Quote Link to post Share on other sites
JWoodrell 285 Posted April 10, 2014 Author Share Posted April 10, 2014 the power for this is coming from a 840KW 4160V generator, so power is pretty much unlimited, my primary concerns are isolation, footprint, cost, and excessive heat dissipation. I like that sensor chip, but at 3.75 a piece they will get expensive, and sensing current would require the relay at the far end to be working. the second concern is the need for 15 copies of this on the board and those SOT8's will take up too much space i think. Thanks for the suggestion, I may use those for a different function i need though in studying the charts in the datasheet, I only have to overcome the current flowing from the pullup resistor on the input pin to drag the line negative, so about 0.072 mA so based on the current transfer ratio it looks like 1 to 2 mA would be the actual minimum to be safe, but since the capacitor doesn't disipate heat I'm not all that concerned, I will play with smaller currents and see if it improves the timing pulse action. Quote Link to post Share on other sites
spirilis 1,265 Posted April 10, 2014 Share Posted April 10, 2014 I read somewhere one thing to keep in mind with voltage dividers and other circuits for conditioning HV is redundancy--think hard about the choice of components and design, e.g. in a voltage divider, if the GND side resistor blew or wasn't soldered right, would anyone get hurt and/or is a total loss of the board acceptable? Probably also surges/spikes to consider... Sent from my Galaxy Note II with Tapatalk 4 GeekDoc 1 Quote Link to post Share on other sites
JWoodrell 285 Posted April 10, 2014 Author Share Posted April 10, 2014 that is something to say towards the opto then, because worst case is the capacitor would fail shorted and would cause the optos LEDs to blow and wouldn't take out anything else cause the output side is still isolated. GeekDoc and spirilis 2 Quote Link to post Share on other sites
RobG 1,892 Posted April 12, 2014 Share Posted April 12, 2014 Why not use low input current optos like 6N138/6N139 or dual channel HCPL2730/HCPL2731?I am using them for MIDI apps, which use 5mA current loop, but you could go as low as 0.5mA.I would probably settle on 1.5mA120Vrms*1.5mA*50%=0.09WPing me if you decide to use them. Quote Link to post Share on other sites
rockets4kids 204 Posted April 12, 2014 Share Posted April 12, 2014 You might also want to check out this app note from Microchip on transformer-less power supplies: ww1.microchip.com/downloads/en/.../00954A.pdf You could use one of these to drive an opto-isolator if you want a steady-state signal. JWoodrell 1 Quote Link to post Share on other sites
abecedarian 330 Posted April 12, 2014 Share Posted April 12, 2014 Could you not rectify AC to DC and then switch a transistor to signal the MCU power is on? Quote Link to post Share on other sites
rockets4kids 204 Posted April 12, 2014 Share Posted April 12, 2014 The app note I referenced discusses both resistive and capacitive supplies. Look for the "Advantages and Disadvantages" section under each. Quote Link to post Share on other sites
JWoodrell 285 Posted April 12, 2014 Author Share Posted April 12, 2014 unfortunately i have to detect 16 different lines (these are output verification on a relay control module, so i gotta do 15 copies of this circuit, and don't have the room to implement alot of these suggestions.) the msp430 talks to an open drain constant current led driver, driving the LEDs inside some SSR relays to switch the AC signal to control the 120v relays on the target piece of equipment) each of these outputs is what I am sensing and feeding into the sensing optocouplers, all acting as open drains on on a common sensing bus, so when i put it through self test, it turns each one on and off seperately looking for that sense buss to be pulled low. here is what the board layout looks right now (with the capacitor driven optos) looks like for those playing at home... the LED driver is a Texas Instrument TLC5926 the SSRs are Panasonic AQH3213A the Optocouplers are Lite-On LTV-814HS, and LTV-844HS (single, and 4 channel units) and the 3.6v regulator is a Texas Instrument TPS54336 switcher this PCB actually serves 3 functions. the wall mounted box has this board to drive the primary 15 relays, if I cut along the 120v line, and mount a second version via standoffs with the JP points and close the solder jumper on the back, it will act as a second relay board with its LED driver serial input coming from the output of the main LED driver, so it is a second set of 15 relays as an optional expansion for them. neither of these have the MSP430 mounted on them though, the hand held box has this board in the base with the MSP430 mounted and none of the 120v stuff populated, and going out the PB_IO header, and the OLED_IO header to the frint panel of the handheld unit to the switch board that has the user push buttons and OLED on it for the interface, so this same PCB has 3 different jobs built into it. GeekDoc 1 Quote Link to post Share on other sites
enl 227 Posted April 12, 2014 Share Posted April 12, 2014 what is the current draw? The other option, if the current draw is sufficient, would be an inductive pickup, or a hall effect pickup like the Allegro ACS710 or 712 series. Both the inductive and the current sensor IC are isolated. The IC is cheaper. The 5A version of the 712 is a couple bucks. Advantage to these is current measurement. Edit: just reread the intro. At 80mA, you should be able to go with current sense. A 5A sensor has resolution of 10mA at 10 bits(bipolar), which is about ok for 80mA (look for the periodic change). An inductive pickup with the appropriate ballast resistor is more than good, but will need extra components to protect against overcurrent and bias to positive. Quote Link to post Share on other sites
rockets4kids 204 Posted April 13, 2014 Share Posted April 13, 2014 The goal is to sense whether a line is hot, not measure the current through a load. Quote Link to post Share on other sites
GeekDoc 226 Posted April 18, 2014 Share Posted April 18, 2014 That board is a thing of beauty! The Army is lucky to have you. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.