Shop OBEX P1 Docs P2 Docs Learn Events
ADC Conversion *and* Reading — Parallax Forums

ADC Conversion *and* Reading

Mach3MaelstromMach3Maelstrom Posts: 7
edited 2009-04-25 20:41 in BASIC Stamp
I am working on a project where the current an AC circuit (i.e. to a laptop or other device) is read by the Basic Stamp and analyzed. I want the Stamp to be able to assign a value to a variable based on the current read.

From my understanding, the BS2 can only read DC signals. Therefore, I know I must convert the signal to DC, but I'm afraid to "blow out" the BS2 since there's a potential of 115V/~1-3A going into the device.



The attached schematic is an overall idea of what I want to do *for clarification purposes only*. I know it won't work on its own, but I'm giving you an idea of what I want to do. I will probably attach a capacitor to chassis ground to filter the current.

[noparse][[/noparse]EDIT]: I forgot to add a diode on the other side (where the rectifier isn't) to keep the current from "backflowing".
639 x 339 - 12K

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-04-23 23:11
    Take a look at the kill-a-watt and the hacks out there. the chip in that device has been used to read the current and voltage from the ac line.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • stamptrolstamptrol Posts: 1,731
    edited 2009-04-24 13:24
    By all means, use a current measuring method that provides ISOLATION from the power circuits. Either purchase a current sensing module (as suggested above) or at least use a current transformer and appropriate filtering and amplification. Even as just a sketch, your circuit is potentially quite dangerous to you and your Stamp.

    A good alternative is to use a multimeter that has a data output port. It gives a good variable range, provides isolation, and provides a nice safe data stream to work with.

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

    http://www.siskconsult.com
    ·
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-24 15:40
    stamptrol said...
    By all means, use a current measuring method that provides ISOLATION from the power circuits.·Even as just a sketch, your circuit is potentially quite dangerous to you and your Stamp.
    Potentially dangerous?· Actually dangerous!· That's a suicide machine.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Mach3MaelstromMach3Maelstrom Posts: 7
    edited 2009-04-24 16:27
    Like I said, I'm not putting this thing together like the drawing says. It's to keep people from getting confused as to what I mean regarding the design.

    Thanks for your input! I'll use a multimeter compatible with the Stamp. Does anyone have model numbers or anything of the like?

    Basically my question was: can the Stamp read current through its ports on its own? Or does it *require* a multimeter device?
  • JonathanJonathan Posts: 1,023
    edited 2009-04-24 17:13
    Allegro makes some nice Hall effect current sensors that can be read with an ADC. They are isolated to 3kV I think.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Mach3MaelstromMach3Maelstrom Posts: 7
    edited 2009-04-24 18:14
    I guess I'm asking how would I put together the circuit such that the Basic Stamp can read the voltage drop over that resistor in the above schematic.

    I'll look a little into Allegro. I want to be completely certain of my circuit before I blow something up (in a bad way, not the engineering way =P).
  • FranklinFranklin Posts: 4,747
    edited 2009-04-24 22:59
    Somebody said...
    I guess I'm asking how would I put together the circuit such that the Basic Stamp can read the voltage drop over that resistor in the above schematic.
    The stamp would need an adc Parallax sells some and has circuits and code on the page where they are sold. Some sensors talk spi or serial and you could connect them directly to the stamp. Does this answer your question?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Mach3MaelstromMach3Maelstrom Posts: 7
    edited 2009-04-25 20:41
    That's the answer I was looking for. Thank you!
Sign In or Register to comment.