Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing a current sense inductor to the stamp — Parallax Forums

Interfacing a current sense inductor to the stamp

whyrnutzwhyrnutz Posts: 11
edited 2010-03-23 21:17 in BASIC Stamp
Hello all,

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:

www.cooperbussmann.com/pdf/12df78b3-cefd-4bb1-a911-2e4dcc25ecb3.pdf

Thanks,
Tom

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-03-21 03:00
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • electromanjelectromanj Posts: 270
    edited 2010-03-21 04:29
    Hey whyrnuts, are you an electrician? Just curious because of your username.
  • whyrnutzwhyrnutz Posts: 11
    edited 2010-03-21 11:52
    Stephen -
    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?

    electromanj-
    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.
  • stamptrolstamptrol Posts: 1,731
    edited 2010-03-21 20:20
    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.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
  • FranklinFranklin Posts: 4,747
    edited 2010-03-22 01:53
    Show how you have it wired. The output should be ac and you should be measuring across the sense resistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ercoerco Posts: 20,256
    edited 2010-03-22 14:20
    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."
  • whyrnutzwhyrnutz Posts: 11
    edited 2010-03-22 18:29
    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 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.

    Thanks!
    Tom
    600 x 371 - 16K
  • FranklinFranklin Posts: 4,747
    edited 2010-03-22 19:06
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • stamptrolstamptrol Posts: 1,731
    edited 2010-03-22 19:17
    · 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.

    · Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • whyrnutzwhyrnutz Posts: 11
    edited 2010-03-22 19:58
    Stephen-
    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.

    Tom-
    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.

    Thanks!
    Tom
  • ercoerco Posts: 20,256
    edited 2010-03-22 21:48
    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.
    http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=200452163931

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • whyrnutzwhyrnutz Posts: 11
    edited 2010-03-23 12:24
    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.
  • FranklinFranklin Posts: 4,747
    edited 2010-03-23 21:17
    Not a stamp but a start in that direction www.ladyada.net/make/tweetawatt

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.