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

BS2 voltage monitor

BS2BOBBS2BOB Posts: 3
edited 2012-09-17 09:33 in BASIC Stamp
I'm designing some custom electronics for my old muscle car and among the features I would like to have a digital display of the vehicles battery voltage. Can a BS2 module monitor the battery voltage in a car?

Comments

  • kd8bxpkd8bxp Posts: 14
    edited 2012-09-12 18:58
    BS2BOB wrote: »
    I'm designing some custom electronics for my old muscle car and among the features I would like to have a digital display of the vehicles battery voltage. Can a BS2 module monitor the battery voltage in a car?

    I don't know a whole lot yet, still learning myself, but I just did something like that for my robot project, and I used a ADC0831 - I modified the circuit that is in the basic analog and digital v.14 pdf file, The chip is 5v, and I am working with 36v, so I made a voltage divider, and took used a regulated 5v for the refrance voltage. I also modified the program slightly so that the stamp shows a voltage that is closer to the 36 to 40v I am working with. It was very easy to do, but don't make my mistake and hook the chip up to the wrong positive voltage.

    I also modified the program so that it shows (debug & LCD) the voltage with refrance to 40v and not 5v - in other words if my voltage is 32.34v - the display will say 32.34v not 3.4v (or whatever the calculations work out too) that was pretty simple to do, and the PDF explained it better then I could.

    The way I understand it to work is as my main battery drops in voltage, it also drops voltage across the voltage divider, the 5v refrance is constant and the difference is computed and sent to the stamp...the stamp then does the math and displays the voltage in the debug & on my lcd.
    So you'll need to do something like that, and get the 12v car battery to something 5v or less, and a 5v regulated source for the comparison.

    I think the PDF I was reading is at parallax.com/Portals/0/Downloads/docs/books/edu/Web-BasicAnalogDigital-v1.4.pdf

    For course I am using mine so if the battery goes low the robot will go to it's charger, so your application will be different, but it sounds like it's pretty close to what I was doing. Hope this helps you out.

    LeRoy, KD8BXP
  • Mike GreenMike Green Posts: 23,101
    edited 2012-09-12 20:01
    There's also a discussion of using a BS2 for battery monitoring here. Click on the app-notes link at the bottom of the page. It's under RCtime Command.
  • ercoerco Posts: 20,256
    edited 2012-09-12 20:09
  • BS2BOBBS2BOB Posts: 3
    edited 2012-09-16 08:39
    Thanks for all the help,
  • RED 7RED 7 Posts: 5
    edited 2012-09-17 08:48
    erco wrote: »

    Haha, nice...

    @BS2BOB: I know everything on here is dedicated to Parallax products, so maybe I shouldn't go here... I'll give it a shot.

    I am pretty sure that most PICAXE's have an analog input (ADC). I haven't worked with an analog input before, so I'm not familiar with their capabilities, however, it would seem like you could get your idea to work more easily with something like that. Here's on PICAXE's specs: http://www.picaxe.com/Hardware/PICAXE-Chips/PICAXE-18M2-microcontroller/#tSpecification
  • Mike GreenMike Green Posts: 23,101
    edited 2012-09-17 09:33
    Yes, PICAXE has built-in analog inputs, but it's a bit harder to use than Parallax's Basic Stamps and the level of support is quite a bit less ... "Yah pays yer money an' yah gets yer choice".

    It's really easy to do battery level monitoring as described on the website I mentioned in Post #3 and it's also really easy to interface a Stamp to an analog to digital converter (ADC) like the ones Parallax carries. Parallax has all sorts of sample code and schematics. You'll generally get better results using an external ADC, but, for battery monitoring, the extra accuracy probably doesn't matter.
Sign In or Register to comment.