Shop OBEX P1 Docs P2 Docs Learn Events
Post a voltage divider circuit and code for battery level measurement — Parallax Forums

Post a voltage divider circuit and code for battery level measurement

MigsMigs Posts: 95
edited 2010-07-22 12:31 in General Discussion
Hi Amigos:

Can someone post a voltage divider circuit for a Basic Stamp board? Something to measure the voltage of an 8 volt battery through the analog input pin. How would the code look?

Thanks amigos,

Migs

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"We either make ourselves miserable, or we make ourselves strong. The amount of work is the same." Carlos Castaneda
"One single grateful thought raised to heaven is the most perfect prayer. " G. E. Lessing
“How much of human life is lost in waiting.” Ralph Waldo Emerson
My website: www.intoku.net my e-mail:mreznicek@pretensa.com me:Miguel Reznicek

Comments

  • hover1hover1 Posts: 1,929
    edited 2010-07-21 20:49
    There is no Analog input pin on a Basic Stamp. You will need an Analog/Digital converter as covered in this document:

    http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Web-BasicAnalogDigital-v1.4.pdf

    Jim
    Migs said...
    Hi Amigos:

    Can someone post a voltage divider circuit for a Basic Stamp board? Something to measure the voltage of an 8 volt battery through the analog input pin. How would the code look?

    Thanks amigos,

    Migs
  • MigsMigs Posts: 95
    edited 2010-07-21 21:31
    Thank you Jim! Maybe a thought for the next Basic Stamp incarnation then! -Migs

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "We either make ourselves miserable, or we make ourselves strong. The amount of work is the same." Carlos Castaneda
    "One single grateful thought raised to heaven is the most perfect prayer. " G. E. Lessing
    “How much of human life is lost in waiting.” Ralph Waldo Emerson
    My website: www.intoku.net my e-mail:mreznicek@pretensa.com me:Miguel Reznicek
  • Desy2820Desy2820 Posts: 138
    edited 2010-07-22 02:14
    If you don't need extreme accuracy, basic measurements can be made using a voltage divider (resistors), a capacitor, and the RCTIME command.· See this page for the nitty-gritty:· http://www.emesystems.com/BS2rct.htm#B_voltage

    I hope this helps!
  • MigsMigs Posts: 95
    edited 2010-07-22 12:31
    Hi Desy:

    Well that sure is a unique approach!

    Thanks for the link.

    -Migs

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "We either make ourselves miserable, or we make ourselves strong. The amount of work is the same." Carlos Castaneda
    "One single grateful thought raised to heaven is the most perfect prayer. " G. E. Lessing
    “How much of human life is lost in waiting.” Ralph Waldo Emerson
    My website: www.intoku.net my e-mail:mreznicek@pretensa.com me:Miguel Reznicek
Sign In or Register to comment.