Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp WattMeter????? — Parallax Forums

Basic Stamp WattMeter?????

NerazzurriNerazzurri Posts: 2
edited 2008-02-27 17:47 in BASIC Stamp
Can i use the basic stamp micro-controller as a watt meter?

and if yes what do i need to measure a three phase quantity...

thanks.

Comments

  • metron9metron9 Posts: 1,100
    edited 2007-11-13 21:16
    AC? or DC?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • NerazzurriNerazzurri Posts: 2
    edited 2007-11-14 05:08
    AC
  • bjhbjhbjhbjh Posts: 11
    edited 2007-11-14 12:07
    You will need a set of current transformers like this to step the AC current down to a proportional AC voltage signal. Then you will need some kind of a front end to rectify that AC voltage to a proportional DC voltage analoge (or some other signal format) that the stamp can really deal with.

    The rectification needs to be suitable for low signal levels usually some kind of op amp cct like this For the reasons stated in the article, you cannot use power rectifiers due to low signal losses. Likely the rectified signal will also need to be applied to an RC network to smooth it out to a reasonably quick yet stable DC representation.

    I am doing a similar project but for four 5kW electric heating elements. I have the current transformers but am still looking for suggestions for a ready made but cheap front end circuit. I could sit down and build one but don't have time energy or inclination (IE I am too lazy).

    Any one got any suggestions for a simple off the shelf hack type source for a front end suitable for this type of thing?

    Thanks,

    Brian H. CET
  • GICU812GICU812 Posts: 289
    edited 2007-11-15 17:29
    I dont know specifically what you're doing, but heres my situation

    I've got a 20kw furnace I want to see how much power it uses over a period of time. Since I know its a fixed 20 kw (ignoring tolerances) all I need to do is measure how long its running. So what im doing is taking the control signal, which is 24VAC, rectifying it to 24VDC with a full wave bridge rectifier, and then using that to flip a relay. Connected to the relay on one side is a stamp, the other is ground. When the furnace turns on, the relay gounds the stamp, which counts in seconds how long it runs. From there I can calculate how many KWH are consumed.

    This wont work if you have a variable load, but I thought I would suggest it.
  • bjhbjhbjhbjh Posts: 11
    edited 2007-11-15 19:47
    Hi GICU812 etal,

    Thanks for the suggestion. Our situations are similar, however mine is not quite so simple. I am not just monitoring energy consumption, although these stats·will be·a side benefit.

    I am working with a 4 element furnace, 5 kW each. It is my 85 y.o. dad's furnace and he·lives some 20 km away from me. What·I really·want to be able to do is identify when any of the 4 elements·fail or are not getting energized. This happens from time to time and there is no external notification built into the furnace as built.

    We have added a current transformer to monitor the total current on a local analogue·ammeter.·With this,·we can see when the total current is too low and thus deduce that an element has failed, but we don't know which one till we go probing inside·with a clampon ammeter.

    Also, in this furnace, the 4 elements are energized a few seconds apart in sequence. Also there is a thermostat monitoring·outdoor temperature which decides whether to use all 4 elements or just 2 depending on·how cold it is outside.·So, the elements·don't all come on at once and the stepping relays have been known to fail.·Each element also has a·thermal trip for safety.·These·age and get more sensitive as they fail,·so even if an element is switched on OK, it might get switched off again prematurely·if a thermal trip decides, for what ever reason, that·it is over temp. We have experienced all of these·failure modes·over the years and only constant local vigilance can detect when things are amiss.

    My plan is to use a stamp that can sense that·all 4 load currents are really flowing, that knows when to expect each element to come on / off·as per the proper sequence timing etc, and·that will·realize if current suddenly stops flowing in an element out of sequence, that things are not right. I'd like to have the stamp then make this information available via a tcp/ip interface of some kind so that the instantaneous operating parameters are visible by html remotely.·Also, it should send any out spec alerts to me·by email or text message. In addition to all this, as I said, data logging will be a side benefit .

    The furnace·also·has a design flaw as far as I am concerned.·It turns the blower off at the same instant as the last element is powered off. If I were·designing such a furnace, I would have the blower keep going for a minute or so to cool the last element after its current stops. If I get ambitious, the stamp will trigger a relay to accomplish this too.

    Thats what I am up to. The only impediment is A) time to work on this and B) a nice cheap low involvement front end for the currrent 4 additional transformers already in hand.

    There must be something out there I could hack for this?

    Thanks & hope this is clear,

    Brian H
  • GICU812GICU812 Posts: 289
    edited 2007-11-15 20:51
    In that case, I would make a circuit to connect a relay to each element and use them to trip the stamp.

    This way you get a definitive on\off for each element, and you can pinpoint which one is off. Just metering the main power wire would only tell you that one was off, not which, nor if it was in sequence.

    Its a pretty good bet the furnace is running on 2 phase 240V.

    Someone PLEASE correct me if im wrong here, but I believe you should be able to just connect one leg of the element to ground (not literally) and get 120v. So just tapping one leg and ground on a transformer gets you a more workable voltage.

    Go from there with say a household wallwart transformer, dropping it to 12v DC, and use that to switch the outputs for grounding the stamp pins.

    This is certainly not the smallest option, nor the most advanced, but it provides %100 isolation between the stamp and the 240V power, and its the easiest to put together with old power adapters you have laying around, or can get cheap from any store.

    Actually, reading your post, we might have the same furnace, lol, a Panye 1FM or something like that, mine is 20kw as well. Mine is just single stage though, its either 4 elements or 0
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-15 21:20
    bjhbjh,
    A simple hack is not what you want when dealing with 240VAC at the kind of power levels and temperatures you're talking about.

    If the connections to each element are easily accessible, you could wind your own current transformers and rectify (and filter) the output.
    If you can fiddle with the size of the current transformer windings so the output of the rectifier is over 3 or 4V when the element is on,
    you could use it directly as an input to a Stamp I/O pin (I'd put a 4.7V Zener diode across the filter capacitor to limit the output).

    For the blower, you could put a 2nd relay in parallel with the one that's already there and use an optocoupler to sense the power to the
    existing blower relay. Your Stamp could turn on the 2nd relay whenever the 1st one goes on and delay the turn off of the 2nd relay that
    it's controlling.

    You could just use standard optocouplers for sensing when power is applied to the various relays that you want to monitor.

    Post Edited (Mike Green) : 11/15/2007 9:25:13 PM GMT
  • metron9metron9 Posts: 1,100
    edited 2007-11-16 03:13
    Another way without risking the electrical inspector giving you a nice red tag is to use something as simple as a vibration sensor to monitor when the blower is on. A simple piezo buzzer and a comparator or op amp. Some software filtering of the input and you are done.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • John_MacJohn_Mac Posts: 6
    edited 2007-12-17 05:47
    Is there a way to detect a ~10A DC current and log it periodically?· I know you can use a transformer for AC current.·· What about DC?

    John
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-17 06:30
    Measuring DC current is harder. You need to use a precision shunt resistor, ideally in the ground lead. You could run an op-amp and analog to digital converter from the logic supply referenced to the ground. The op amp would boost the low voltage across the shunt to the 0-5V range of the ADC.
  • John_MacJohn_Mac Posts: 6
    edited 2007-12-17 06:41
    Thanks Mike

    Here is a little more info on the problem.· I want to log the current drawn on a Lipo battery on my RC Heli.· The Lipo starts out around 11.6 volts and the bird can draw up to 30A depending on how hard you fly it.· If I put a resistor in line to basically measure the voltage drop across a calibrated resistor, that resistor is going to have the full 1-30A running through it!· Even a 1 Ohm would be dropping about 400W or more at times.· Is this a good idea?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-17 07:16
    These precision shunts look like a piece of heavy wire and have resistances on the order of milliohms. To measure something like 30A with a system voltage on the order of 12V, you want a full scale voltage drop on the order of 50-100mV to keep the power dissipation low.

    I'm sure there are other more complicated ways to measure high DC currents, but I have no experience with them.
  • John_MacJohn_Mac Posts: 6
    edited 2007-12-17 07:19
    Thanks Mike

    I will take a look at the shunts.
  • Jason-WIJason-WI Posts: 35
    edited 2007-12-17 22:19
    For DC current the Allegro ACS755 Hall effect current sensor will work much better than a current shunt. Depending on which part number they can measure 200 ADC. I am using a 50 A part to measure DC current in my electric RC planes. I am using a PIC micro with the internal 10 bit A/D. The same can be done with a stamp and an external A/D converter. The only thing I did to the output was scale it to the 0 to 5 volt input and remove the DC offset. I also set up a low pass filter at 100 Hz to filter out noise.

    http://www.allegromicro.com/en/Products/Part_Numbers/0755/index.asp

    Jason

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    He who dies with the most toys wins!
  • John_MacJohn_Mac Posts: 6
    edited 2007-12-19 02:56
    This sounds like the ticket!

    Can you give me a little more detail?· I have Dean connectors on my Lipo.· Do you put this directly inline from the battery to the ESC?· What PIC are you using and maybe a schematic?· Even a picture[noparse]:)[/noparse]· Using the PIC would bypass the overhead of setting up the Basic Stamp.

    Can you buy just one of the Hall chips?· Or did you just get a sample?



    John
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-12-19 17:17
    John

    Just go to this link and fill out the Registration· form

    And· once you have an account where it says this at the bottom of the page

    Just put what you are going to with it

    This is what i put

    And you must fill out anything that has "*·"

    The reason i am telling you this that they will call and to get more info what you are

    going to whit the samples that are going to send you

    ·Application Information


    Market *

    Auto

    Project Name

    Battery Tester

    Intended Application *

    Checking Battery's

    Design Cycle *

    1 to 3 months

    Estimated Annual Usage *


    ·0 to 3

    I hope this will help you


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 12/20/2007 4:26:19 AM GMT
  • John_MacJohn_Mac Posts: 6
    edited 2007-12-20 03:21
    Yup I did that last night....see if they send one.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-12-22 00:58
    John

    I just thought i let you know that some of the Samples that

    ·I ask for they come in the the mail today

    Now this some thing that I can work with

    I will let you know this work out

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-12-22 01:09
    Jason

    Thank You For posting ...>>>> Very Good idea.gif

    I·think this·will work in a project that was thinking about doing

    I was thing about how i was going measure the current

    ·I was not sure which way i was going to do it until you post this......>>>>>>.....Thanks....

    For DC current the Allegro ACS755 Hall effect current sensor will work much better than a current shunt. Depending on which part number they can measure 200 ADC. I am using a 50 A part to measure DC current in my electric RC planes. I am using a PIC micro with the internal 10 bit A/D. The same can be done with a stamp and an external A/D converter. The only thing I did to the output was scale it to the 0 to 5 volt input and remove the DC offset. I also set up a low pass filter at 100 Hz to filter out noise.

    http://www.allegromicro.com/en/Products/Part_Numbers/0755/index.asp



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • John_MacJohn_Mac Posts: 6
    edited 2008-01-07 06:04
    Hi Sam

    Just got back from vacation and they sent me a couple of the chips...hope I can find some time to make up the circuit and try it out.



    John
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-02-27 17:47
    John or Jason

    Have you come up with any thing more using the Allegro ACS755 Hall Effect Current Sensor



    Please let me know if you have

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.