Shop OBEX P1 Docs P2 Docs Learn Events
voltage monitor with bs2 — Parallax Forums

voltage monitor with bs2

Let's Go!Let's Go! Posts: 124
edited 2010-11-21 09:03 in BASIC Stamp
my project needs to monitor the voltage and when it gets to about 12 volts, i want the bs2 to turn on a relay, etc.

can anyone share how to monitor the voltage level with the bs2, or point me in the direction where i can see some code example.

thanks,

jim

Comments

  • CampeckCampeck Posts: 111
    edited 2010-11-19 05:18
    Just use a LM339 comparator fed into a BS2 pin with a pullup resistor on the pin to +5v
    Use a 220 protection resistor on the pin as well to avoid costly coding errors.

    Or does it need to constantly be aware of an actual voltage reading? In that case use an ADC. There are examples in "What's a Microcontroller?"
  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-19 08:48
    Have a look at EmeSystems' website. Use the "app-notes" link at the bottom of the page. There's a section on using the RCTIME statement to monitor battery voltage.
  • CampeckCampeck Posts: 111
    edited 2010-11-19 10:36
    now thats handy!
  • Let's Go!Let's Go! Posts: 124
    edited 2010-11-21 09:03
    thanks to mike and campeck
Sign In or Register to comment.