Neat display (electronic tinkerers only........)

Jeremy Harris

100 MW
Joined
Oct 23, 2007
Messages
4,208
Location
Salisbury, UK
I purchased one of these (http://cats-whisker.com/web/node/7 ) last week and have just got around to playing with it.

I have to say I'm impressed, as it's very easy to drive from a simple microcontroller. I've hooked it up to a Picaxe 08M (http://www.rev-ed.co.uk/picaxe/) , the little baby 8 pin controller that is easy to programme using a high level language a bit like Basic. This chip has 10 bit ADC inputs, digital I/O and serial I/O, making it easy to interface directly to the display and measure battery voltage/current. This thing would make a very nice ebike power display, as it's small enough to fit into a very compact case.

I'm looking at making an intelligent battery charge meter for my electric boat, using this as the display. I'm measuring current with one of these (http://www.lem.com/hq/en/component/option,com_catalog/task,displaymodel/id,90.37.19.000.0/ ) current sensors and hope to be able to measure both charge power (from the solar panels) and discharge power (power used by the motor) to get a simple bar graph display of true watt hours remaining in the battery pack. I am currently thinking of displaying an instantaneous charge/discharge bar graph on the top line (centre zero) and a charge remaining bar graph (E to F) on the bottom line, but may change my mind.

So far, I've knocked up some test code and hardware and made a neat temperature meter using a DS18B20 temperature sensor. This works well, with a digital readout on the top line in degrees Celsius and a bar graph on the bottom line.

There's no good reason why one microcontroller (perhaps one of the bigger Picaxe chips) couldn't drive several of these, as all that's needed is a single wire serial connection per display. With a bit of imagination a comprehensive dash board display could be built fairly easily.

Jeremy
 
been thinkering with picaxe chips almost 2 years from now, and it has some limitations.

Also been thinking in bilduing ny own "Cicle.analyst", but with more powerfull hardware

The plan - use a arduino board for the brains (Atmel AVR atmega168 chip) and display, and use maxim-ic chips for battery protection, charging and fuel-gauging (using TWI for comunicating with arduino).

After building the first prototype, im planing releasing it open-source.

Picaxe aproach is possible, but headaking in big projects, but quite fun to explore its simplicity on smaller projects

Example - build ur own hub temperature probe with a alarme buzzer, way easy and u already have the hardware.

enjoy!
 
Jeremy Harris said:
There's no good reason why one microcontroller (perhaps one of the bigger Picaxe chips) couldn't drive several of these, as all that's needed is a single wire serial connection per display. With a bit of imagination a comprehensive dash board display could be built fairly easily.
That's a neat display, and I can see quite a few uses for it, especially since it is so easy to write to.

It could easily be made into a backlit (edgelit, actually) display setup, with multiple meters for different things. Wish it didn't cost so much, though. :(
 
Looking at the Cat's Whisker site, it looks like they sell a version of this display (minus the controller board) with a built in backlight (http://cats-whisker.com/web/node/14 ). It should be possible to just swap the display over and get a backlit one, or maybe they could supply it built this way.

I agree about the price, I'm guessing that they view this as a low volume product and have pitched the price to recover their development cost. Judging from the slick interface and ease of use I would guess that they have a fair few hours tied up in development, and, as the chap emailed me on a Sunday, I suspect that this company is pretty much a one-man-band.

I've found the Picaxe chips to be an easy way of testing a concept out. On one project, I developed the idea using a Picaxe, then, once I'd got things working passably well, I switched to the equivalent PIC chip for the final version. This worked well, as the final version ran a bit faster, but used the same PCB as the Picaxe prototype.

Jeremy
 
Jermey,

That looks identical to the EagleTree PowerPanel... which is about 30.00 usd (20.00 usd less than that screen) and supports i2c interface which most MCU support.

No backlight but for a quick fix - it's a nice piece of kit.

Im still looking for Nokia style LCDs with backlight and serial, ttl or i2c driver board... I found a few but they were odd character sets and so on.

-Mike
 
Hi Everyone,

Nigel here from Cat's Whisker Technologies. I thought I'd reply to some of your comments...

First of all, thanks very much for buying one of our products Jeremy - and your comments are much appreciated. We designed the TextStar to be super easy to use and it's ideal for use with PICAXE chips.

You mention the fact that a PICAXE chip could easily be made into an eBike power display - have you tried the graphing? If not, try something like this little bit of code:

Code:
serout 2,2400,(254,"b",16,75)

...with the Rx pin of the display connected to I/O pin 2 of the 08M. This will give you a 16-character wide bar graph set at 75%. I'd say that would be ideal for a power display.

Re. the backlit version of the display, the problem with the backlit screens you have seen on our website is that if they were fitted to the current TextStar then you wouldn't be able to get at two of the switches because the LEDs that light the display stick out a bit...rather annoying for us as well as you! It would be interesting to see if your side llighting idea would work - might be worth a try.

I will freely admit that the inspiration for the TextStar came from the Eagletree screen :D although getting the heatshrink tubing right took ages. However, I don't think there will be any argument that ours is easier to use. Theirs is designed to work with their (excellent) data logging products rather than being a general purpose LCD screen.

Jeremy, I think you'll find your TextStar is amazingly useful and that with PICAXE you can make all sorts of gadgets...have fun and if you ever need any questions answered please feel free to use the contact form on our website (http://cats-whisker.com/web/contact). The PICAXE forum is the best place to get questions about their line of chips here http://www.picaxeforum.co.uk/.

Cheers,
Nigel

PS Yes, we work every day here at Cat's Whisker :shock: Yesterday (Sunday) we were starting preliminary work on a project for the film industry at Pinewood Studios...it's all go!
 
Thanks for the tips, Nigel, nice to see you here. I have tried the bar graph, in fact it was the ease of doing this that attracted me to this display, along with the small size. It's a pity about the backlight problem, as that would be very useful for an ebike display.

I've been working on a super-efficient electric boat, a river launch designed for day trips for just two people, for the past few months. The hull is a long, slender low drag one, a bit reminiscent of small Edwardian launches. The decks are covered in flexible solar cells, which, coupled to a LiFePO4 battery pack and efficient brushless motor provide enough power for the boat to be used with no need for mains power charging (I hope!).

The display forms a key part of the concept of making the boat's systems easy to use. I don't want to befuddle users with data, so have opted to try and make a simple "fuel gauge" that will give a good representation of the endurance left in the battery system (the solar cells can only provide about 50% of the required cruise power, the rest comes from the battery that is charged up when the boat is not motoring). The snag with such a simple display is that it really needs to be a bit more intelligent than just displaying raw data, as I need to try and get a good estimate of remaining battery capacity based on measurements of power into, and out of, it. This is easier said than done when it comes to batteries where the capacity depends to some extent on the rate of discharge!

I'll keep you posted on developments with the display in this project, thanks for taking an interest.

Jeremy
 
Hi Jeremy,

Interesting project. Yes, calculating the amount of charge left in batteries can be difficult...it's a complex calculation, not just a matter of getting out what you put in.

I'll keep an eye on this page and see how you get on.

Regards,
Nigel
 
I've pretty much finished my simple power meter for the electric boat. I've hooked up a Hall current sensor, together with a Picaxe 08M microcontroller, to the Textstar display. The code turned out to be much simpler than I expected, largely due to the easy drive requirements for the display.

Here's a photo of the prototype, with a 12V supply dumping current through a 10 ohm load:

4180006182_c32238e1fb_b.jpg


The top row displays battery voltage, battery current (+ for charge, - for discharge) and power (in watts, same sign convention as battery current). The bottom row displays remaining battery capacity in percentage Ah. It's pre-programmed with the actual useful capacity of the battery pack and logs charge and discharge so acts as a proper "fuel gauge".

This unit was designed for the low power requirements of the boat project, with a maximum voltage of just over 18 volts and a maximum current of about 25 amps. It would be fairly easy to modify the basic design for higher voltages and currents, though, if anyone wanted to have a go at building one. The PCB for the prototype is very much a one-off, using toner transfer ironed on to the board, so I'm not going into production!

This might be of interest to someone, though, if so I'll post the schematic.

Jeremy
 
Nice work Jeremy, this is exactly what I was saying we need in another thread a few weeks ago.
There's plenty of voltage based power gauge displays around but one that works of amp hours is exactly what we need with the lithium discharge curve (and especially lipo) Have you hooked up a wattsup meter or similar to compare the accuracy of your ah calculations ?
 
Hyena said:
Nice work Jeremy, this is exactly what I was saying we need in another thread a few weeks ago.
There's plenty of voltage based power gauge displays around but one that works of amp hours is exactly what we need with the lithium discharge curve (and especially lipo) Have you hooked up a wattsup meter or similar to compare the accuracy of your ah calculations ?
bikestackoo6.jpg

Who eats a tire like that?
 
Hyena said:
Nice work Jeremy, this is exactly what I was saying we need in another thread a few weeks ago.
There's plenty of voltage based power gauge displays around but one that works of amp hours is exactly what we need with the lithium discharge curve (and especially lipo) Have you hooked up a wattsup meter or similar to compare the accuracy of your ah calculations ?

I've checked it using a meter on the bench, rather than using a watts-up, and it looks pretty good so far. It's easy to adjust the calibration, just by changing numbers in the software (the three pin connector is the serial programming port, it can be programmed in-situ, like the Infineon controllers).

The advantage of using the Hall current sensor is that it's bidirectional, so the unit can keep track of charge and discharge current, unlike the Watts Up or Cycle Analyst meters, that can only measure current in one direction, I believe. This meter keeps track of Ah by just logging the current every second, and adding up the number of amp seconds (positive or negative) flowing through the two red leads. The timing isn't too accurate, as it relies on the microcontroller clock, but it's easy to compensate for this in the software and anyway I only need an overall capacity remaining accuracy of a couple of percent, due to the resolution of the bar graph.

Jeremy
 
A watt's up is definately one-way only, but I thought cycle analysts were bi-directional (because they report regen gains)? Am I wrong? I was planning to buy one and that was one of the atractions.

How did you access the DS18S20, jerremy? Write some 1-wire master impersonation code for the picaxe? (I'm interested in this - I like 1-wire and need a temp sensor on the bike). Temped by a reprogramable dashboard as opposed to a cycle analyst. Have you posted more details anywhere yet?
 
CA is bidirectional. If you wanted to, you could run charging leads through the controller, so when you charge, it powers up the CA and reads the current going into the batteries.
 
wookey said:
A watt's up is definately one-way only, but I thought cycle analysts were bi-directional (because they report regen gains)? Am I wrong? I was planning to buy one and that was one of the atractions.

How did you access the DS18S20, jerremy? Write some 1-wire master impersonation code for the picaxe? (I'm interested in this - I like 1-wire and need a temp sensor on the bike). Temped by a reprogramable dashboard as opposed to a cycle analyst. Have you posted more details anywhere yet?

On checking, I see you're right, the CA does seem to be bi-directional, I guess that there must be an internal level shifted supply to allow the shunt voltage to be read both sides of the supply rail. It's easier to do with a Hall current sensor, though, as it outputs 2.5V for zero current and swings up or down from this for positive or negative current.

The Picaxe already has a built in command to read the DS18S20, readtemp. This makes temperature reading a breeze, because this command just return the temperature in degrees celsius.

The hardware design is pretty easy, just a Picaxe 08M, a voltage regulator, the Hall current sensor, the display module and a handful of passive components. The software still needs some fine tuning, although it works fine I think that I can get the display to look a little better if I re-order some of the code to synchronise write commands to the display better.

Once I have the final code sorted, I'll post it on this thread, together with the schematic. Adapting it for higher voltage/current or different battery capacities should be fairly easy, just a matter of a couple of component changes and a change to a couple of variables in the software.

Jeremy
 
Hi Jeremy,
Can we get an update on this neat project meter please?
 
Can we please get an update with the schematic and code :) :) :)
 
Sorry for not getting back to this, I sort of dropped it when it wouldn't do quite what I wanted for my solar boat project. The problem was really the lack of an accurate real time clock on the small microcontroller I used for this prototype. I planned to use the program cycle time to derive the time base needed to calculate amp hours and I couldn't get this to be accurate enough for monitoring long duration (several days) of charge and discharge. It'd work fine as an approach for calculating short duration (maybe a few hours) consumption, but the errors would get cumulative beyond this. I also never got around to calibrating the code for the right time, because of this. Code space is very tight, so a bigger variant on this controller might be an idea!

Anyway, here is the schematic for the prototype:

Battery Status Unit.JPG


And here is a text file with the rough prototype code (note that this needs some work to set the right values for some correction factors and probably still has bugs in it!): View attachment battery monitor basic code V1.3.doc

(sorry, I had to cut and past the code into a Word doc as the forum doesn't allow .bas or .txt files as attachments)
 
Jeremy Harris said:
The problem was really the lack of an accurate real time clock on the small microcontroller I used for this prototype.
That is also a problem with the Turnigy meters, and probably also with the WattsUp, and it is bad enough that they are even inconsistent to each other, AFAICT.

In my recent experiments checking a repaired one against a new one, and against a WU, I found that the Wh and Ah didn't really add up right between the two vs the voltage and current differences they each exhibited, which means that their RTCs are not accurate even relative to each other. So for now, there probably isn't a commercial watt meter that's accurate over long periods, although someone probably has a personal project that does, somewhere.
 
Back
Top