View Full Version : Interfacing a current sense inductor to the stamp
03-21-2010, 08:23 AM
I have several current sense inductors that I have removed from some old ups circuit boards that I would like to use to monitor AC loads in my house (sump pump, laundry, etc.). How would you go about interfacing these devices to the stamp? Here's the datasheet:
03-21-2010, 10:00 AM
You will need to scale the output to 0 to 5vdc and then use rctime or an adc to convert the voltage to a number the stamp can use. The output seems to be 1v/A.
03-21-2010, 11:29 AM
Hey whyrnuts, are you an electrician? Just curious because of your username.
03-21-2010, 06:52 PM
Thanks for the info. I was getting about 75 millivolts when I had it on my soldering station circuit and it went down to practically nothing when I ran it through a rectifier. How would I go about scaling it up to 0-5VDC?
Very perceptive! Yes, I am an electrician. Most people don't make that connection (pardon the pun), even the ones who know what I do for a living.
03-22-2010, 03:20 AM
You'll probably have boost the value if the sensor output is less than the diode drop of the rectifier (about 0.7 volts for each conducting diode).
· Google "precision rectifier" for a sample op-amp circuit that will do the job for you. You can change the gain of the amp to give you 0 to 5 volts to feed into and a/d converter.
· I've attached a sketch of the circuit I've used on several projects. Its for low level DC signals but you can add a precision rectifier on the front end.
03-22-2010, 08:53 AM
Show how you have it wired. The output should be ac and you should be measuring across the sense resistor.
I have used 3 series silicon rectifier diodes as a quick & dirty digital DC current sensor. They create a ~2-volt drop across them when current flow through them. ANY current, so it doesn't matter what the DC voltage or current on the monitored circuit is, no sense resistor value to calculate. Zero volts across them when no current flows. Feed that voltage into a Stamp input pin: 0=no current, 1=current flowing, since the high-low threshhold is ~1.4 volts.
·"If you build it, they will come."
03-23-2010, 01:29 AM
Sorry for the delayed response. I haven't had internet access since yesterday morning.
Tom- Thanks for the sketch. I did a search and found a circuit at sound.westhost.com/appnotes/an001.htm (http://sound.westhost.com/appnotes/an001.htm) that has a simplified full wave rectifier (fig. 6) that I would imagine I could use to give your circuit a dc input. I have to admit I'm more than a little lost when it comes to analog circuits and opamps in particular, so please bear with me if I need a little more hand holding than most. I'm much better with digital circuits.
Stephen- I'm attaching a drawing of how I had it wired when I tested it with my soldering station. I was measuring ACmV at either side of the resistor.
erco-I like the simplicity of your idea (being that I'm a very simple person!) but am I right in assuming I'd still have to somehow bump up the voltage in order to make that 1.4V threshold?
Thank you all for your responses, but especially for your patience. I'm way out of my league on this one so please forgive me if I'm a little slow to catch on.
03-23-2010, 02:06 AM
Wiring looks correct. Do you have the correct value resistor for the model you are using? Can't think of anything else off the top of my head at the moment.
03-23-2010, 02:17 AM
· That will work fine as an input to the precision rectifier. One end of your sense resistor will be connected to 0 volts and the other will go to the input of the precision rectifier.
·· At some point you will have to do a test to determine what the maximum sense voltage will be when maximum load current is flowing. Say you measure 1 volt AC when 100 amps flows as a load.
· Set up your precison rectifier and op amps to give some nice output voltage, say 5 volts DC. That 5 VDC will represent·100 amps to the Stamp.
· Without forgetting that this is a great learning experience, you can buy a solid-state 100 A current sensor with 0-5 VDC output for $20 or so at DigiKey.
03-23-2010, 02:58 AM
I took the resistor off the board as well, and I believe it was 48 ohms (I don't have it with me now so I can't say for certain), which would be close to the recommended 50 ohms from the datasheet. So I guess I'm OK as far as that goes.
Thanks for confirming the precision rectifier. I'm going to order the parts and try it out. $20 sounds good for an important project (like the sump pump monitoring circuit) but I think I want to try to conquer my fear of op amps first - they do such bizarre things I always thought there was some sort of black magic involved. Maybe I can finally get my head around them. I get a much greater sense of satisfaction if I can learn something in the process of solving a problem. Besides, this is more a case of the parts driving the project, rather than the other way around. I thought it would be cool to recycle some of the parts off these boards, and what better way than to monitor what's going on in my basement when I'm not home?
Thanks again, guys. I'm sure I'll be posting again once I get the parts. On the off chance I actually get it right on my own I'll post my final circuit here.
Tom: Yes, my diode current sensor has its limits, it's DC only and that it doesn't measure the current flow, just that some current is flowing. For instance, I used it on a circuit where Supercaps were charging at various times, and the Stamp kept track of and displayed (on a DEBUG window) how long each item had been charging off of a common fixed-voltage supply.
For AC loads, I like the Kill-A-Watt meter, which can usually be had off Ebay for $20 or less.
·"If you build it, they will come."
03-23-2010, 07:24 PM
I am definitely going to file that one away because it's such a great idea. Most of my applications are just looking to see if something is running - I don't need to know how much it's drawing, so this is a simple solution. I like simple!
Have you interfaced a Kill-A-Watt to the stamp? I have one so I'd be very interested in how you did that.
03-24-2010, 04:17 AM
Not a stamp but a start in that direction www.ladyada.net/make/tweetawatt (http://www.ladyada.net/make/tweetawatt)