Monday, January 05, 2009

Battery monitor

Battery monitorWhat you are looking at is probably the most significant new thing I did for Lady Jane in 2008.

In amongst all the wires and things you see is a programmable chip - just visible in the top right hand corner.

This is a follow on from the PC based battery monitor/remote generator starter project I was working on. It was simply not practical to run a PC to monitor the battery all the time.

A chance remark from a friend over at the small marina nearby sent me down the programmable chip route.

The result is a simplified version of the previous battery monitor, free of any PC. The only thing I loose is the voltage charting function, which is possible but not implemented.

I use combinations of different coloured LED's to show me the battery voltage. With the switch set to monitor, the generator will auto-start when the voltage gets to below 24.1 volts.

To complete this project, I'm planning on putting the whole lot onto a PCB (still learning about that part) and packing it neatly into a box with just the switches and LED's showing.

For those who care about this sort of stuff, I used a PIC16F88 chip and a 'C' compiler from Sourceboost to produce the code. The Sourceboost forum is a great place to get help with both sample code and advice for the novice.

With these programmable chips, I'm learning anything is possible.

Next, some way away yet, will be to develop a remote engine monitoring system, to track key temperatures and pressures on my engine, turbo and gearbox. I'm really looking forward to seeing the charting produced from that.

9 comments:

  1. Yikes.....Hey Tim sounds like you're working on the Milenium Falcon! Happy New Year mate!

    ReplyDelete
  2. Was just directed here by a boat owning friend. Very interesting stuff!

    You might like to investigate the Arduino board, which has a wide range of sensor packages and programming library support for them already available - See the Arduino site. My good friends at tinker.it! are the UK distributor, and have an online store which sells the Arduino boards and related sensor packages...

    I'm building an Arduino-based central heating controller so I can get a better timer and remote (internet!) monitoring.

    ReplyDelete
  3. Hi there Rick & Karen

    A very happy new year to you too.

    Tim

    ReplyDelete
  4. Hi Matt

    Welcome on board!

    Thanks for the info.

    This electronics stuff is pretty good fun, and such a steep learning curve.

    Always something more to learn about.

    Regards

    Tim

    ReplyDelete
  5. Thanks, Tim!

    Hope it's useful to you...

    ReplyDelete
  6. Anonymous3:55 PM

    I would second the suggestion of trying the Arduino. The development kit is cleaner, opener and freer, with no weird variants based on individual chip models as there is with the PICs.

    ReplyDelete
  7. Thanks anonymous.

    I'll bear that in mind in future.

    ReplyDelete
  8. Hi Tim,

    Holy [expletive]! Lady Jane is quite the project! Our nautical project is somewhat, umm, diminutive by comparison.

    So... what circuit did you finally go with for the battery monitor?

    I think Arduino is a nice package, but I personally still prefer the PIC family. As you've found it's not that hard to work with and it's very well supported with products, tools and code.

    Cheers,

    kenn (from the Sourceboost forum)

    ReplyDelete
  9. Hi Kenn

    Great story/pics.

    All boats/boat projects take some commitment!

    I went for the straightforward voltage divider in the end. The idea being that it was simpler (less components therefore less to go wrong) and accuracy was not that critical.

    I don't see Matt's suggestion in terms of PIC vs Arduino, rather than the idea of using a kit versus components to get the job done.

    I originally started this trail with Phidgets, which seem more akin to Arduino's than PIC's, but needed a PC to run the application.

    I think that kits provide an easy entry to this cool stuff, at a price, whereas components provide the flexibility for more advanced applications where you only pay for what you need/use. Both have their uses, and there is, of course, always a middle ground.

    Just my view.

    Cheers

    Tim

    ReplyDelete