Honda CR-Z Hybrid Car Forums banner

1 - 20 of 27 Posts

·
Registered
Joined
·
43 Posts
Discussion Starter #1
Following on from the progress that Peter Perkins is making with manual control of the IMA assist and regen functions with the use, in part, of his excellent OBDIIC&C, I suggested the possibility of an extra LED bar graph on the OBDIIC&C to show the genuine assist and regen that is taking place while the manual override is in use. This is because the information sent to the gauge on the dash-pod only shows what the car has itself requested to happen, not what is necessarily actually happening.

IMA Manual Control. | Page 4 | Honda CR-Z Hybrid Car Forums (crzforum.com)

A quick google is showing that both blue and green 10 segment LED bar graphs are widely available. The dash assist/regen displays are also 10 segments each so that is ideal as it can still have the same look and feel as the dash display.

Just as an example here are both types:
10 Segment Light Bar Graph LED Display - Blue– The Pi Hut
10 Segment Light Bar Graph LED Display - Pure Green– The Pi Hut

My initial thought is that a relatively small case could be 3D printed to hold the bar graphs and their associated equipment that could then be neatly attached to the OBDIIC&C
 

·
Registered
Joined
·
620 Posts
LM3914 x 2 driving 2 x ten segments displays. (Green/Blue)

One PIC 12F1571 in serial contact with the OBDIIC&C.

The pic outputs 2 x 0-5V PWM signals to drive each LM3914.

Someone will have to knock up a pcb for it and source/design/print a box etc..
 

·
Registered
Joined
·
620 Posts
This is a demo OBDIIC&C LCD Bar Graph version..

WYSIWYG. No sneaky fudging of figures or values.
This is the Assist/Regen actual Kw IMA output. (Volts x Amps) Approx 1kw per segment. (linear)

 

·
Registered
Joined
·
43 Posts
Discussion Starter #5
After a bit of digging around I found loads of places selling a relatively cheap kit of parts for driving a bar graph, including a PCB Electronic Diy Kits LM3914 Display Board 3.7V Lithium Battery Capacity Indicator Module LED Power Level Tester 12V Li lion Lipo|battery tester lithium|lipo 12vlipo capacity - AliExpress

The pots can be omitted as we are directly inputting 0-5V, and the switch would be redundant as we would want it always on so that could be linked out. The PCBs are available on their own for less than 50p each 5pcs Electronic Diy Kits LM3914 PCB Circuit Board For Capacity Indicator Module Power Level Tester LED Display|board board|board diyboard electronic - AliExpress

Might not be the best solution, but it is off the shelf for little cost.
 

·
Registered
Joined
·
620 Posts
I use Ali Express a lot, it's generally pretty good for cheap stuff like this.

I ordered two modules of each green & blue to play with <£10

1.51US $ 22% OFF|Electronic Diy Kits LM3914 Display Board 3.7V Lithium Battery Capacity Indicator Module LED Power Level Tester 12V Li lion Lipo|Instrument Parts & Accessories| - AliExpress

I haven't seen a schematic for the pcb though.... :unsure:


EDIT

I added the Bar Graph to my OBDIIC&C BMS version screen as well, but scaled it at 2kw per segment instead of 1. (y)
I'll only get 10 bars of assist or regen if I'm pushing 20kw or more. :devilish:

Power levels below 1kw for the standard screen or 2kw for the BMS screen do not register.

The 1kw/segment bar graph calculation works like this...

Amps x Volts = Watts. e.g. 100A x 100V = 10,000 Watts (10kw)
Bars = Integer (Watts / 1000) (Rounded Down)

So...

900 watts / 1000 = 0.9 = 0 Bars

1100 watts /1000 = 1.1 = 1 Bar

10000 watts /1000 = 10 = 10 Bars

We can rescale this if we want later to increase the headroom. So say 1.5kw/bar/segment.
 

·
Registered
Joined
·
43 Posts
Discussion Starter #7

·
Registered
Joined
·
620 Posts
I've been having a read of the data sheet for the LM3914 and it looks like the use of at least one pot is useful for controlling LED brightness.
The blue is likely to be brighter than the green IIRC, so some adjustment on at least one of them to level it out makes sense.
 

·
Registered
Joined
·
620 Posts
These arrived from the far east before the Suez crisis and I soldered up a couple.

I adapted the circuit slightly to accept a 0-5V input for the full bars range as per the example schematic in the attached LM3914 datasheet.

As expected the blue are dazzling :cool: and the green are presently feeble, so some adjustment will have to be made..

63671


I need to knock up the tiny PIC serial to pwm converter to drive them from the OBDIIC&C IMA data now..
 

Attachments

·
Registered
Joined
·
620 Posts
Working now with the OBDIIC&C driving it via the serial interface.
Using the cheap LM3914 led bar graphs to mimic the OEM assist/regen dash display.
We can adjust this to display actual current, watts, kw, requested power, whatever.. (y)

Uses a tiny 12F1822 pic to receive serial data from the OBDIIC&C and then convert that into a 0 - 1.25V crude PWM/low pass filter generated voltage for each side of the bar graph.


Someone can knock up a little pcb and sort a case if they feel inclined. ;)

The OBDIIC&C has a tiny change in the firmware which will be included in the next general update.
The 12F1822 firmware will be posted here once I have tidied it up and done a bit more tweaking.
 

·
Registered
Joined
·
620 Posts
Change of direction to a single cheap 28 pin PIC16F886 doing all the work.. (y)

This simplifies the design, gives us more flexibility and avoids the old LM3914 chips.|

The PIC pin assignments on the schematic might look strange but if you look at the physical PIC you can see
I have kept all the assist led pins sequentially down one side of the PIC and all the regen led pins down the other for ease of pcb layout.
No crossing of the positronic streams (led lines) and you atoms exploding at the speed of light hopefully..

63704


We can drive the LED's with 5-10ma each and can choose the current limit resistors to match the Green v Blue perceived brightness with some bench testing.

63705


Using the PIC 16F886 also allows others to have a go at programming it with the free student edition Pic Basic Pro Compiler.

ME Labs Online Store: PBP 3.1 Student Edition (Free Download)

We do need to roll our own little pcb but it should be easy enough...

This design can accept serial data from the OBDIIC&C or a simple 0-5V Analog voltage input, so could be repurposed/used wherever a bar graph is wanted..

Lets challenge your programming ingenuity :unsure: Want a 'Knight Rider' style scanner.... LOL

I'll post my firmware in due course.. (Once it's written!)
 

·
Registered
Joined
·
620 Posts
Typical :rolleyes:

Just finishing assembling the above design then another brain wave based on NEOPIXEL WS2812 LED strings.....
These open up a whole world of possibilities and can be controlled with just an 8 pin PIC 12F1840!!!.

I have a 30 neopixel led string glued to my monitor from developing my conway 'LIFE' wall display project a few months ago..
I'll try and drive that with assist/regen levels in the different colours.

The mod crowd could have led strips glued to the sills/windows/bumpers that respond to power levels LOL...


You get the idea..

Here is one of my trusty OBDIIC&C gadgets hacked and driving 1024 neopixel LED's in a string and doing a lot of calculations o_O in between.

 

·
Registered
Joined
·
620 Posts
This an example of the super cheap self adhesive IMA bar graph NeoPixel WS2812 RGB string.

WS2812B 5V 5050 RGB LED Strip 1-5M 30 60 144 150 300 Leds Individual Addressable | eBay

I happen to have a 0.5M length of 30 leds in stock, but you can get a lot denser/closer/more leds per M.
You can also get waterproof variety in clear heat shrink tube etc..

63708


Apologies in advance for the state of my keyboard! :oops:


I have just ordered a 0.5M length of 72 leds, you can simply cut it up into say 3 x 24 led lengths if you want.

A 24 led string of the 144 led/m would be ~17cm long.. :cool: (We can scale it K/amps/whatever)

My little 12F1822 PIC driver won't care how many leds within reason (say 100 max) we just have to change one variable to tell it the number of led's.



We might even get the cosmetic modding crowd onboard with this.. (y)
 

·
Registered
Joined
·
18 Posts
Very smart!

I wonder if they could be mounted around the middle opening of the instrument binnacle, around the speedo and sweep colour to indicate assist?

I don’t think the assist and regen would work in that manor, but it might be a nice touch
 

·
Registered
Joined
·
43 Posts
Discussion Starter #16
This has escalated quickly :D.

Personally I'd attach a small LED string to the OBDC&C case and then squeeze the driver into the case, mainly to save on any more wires running around. Although something on the dash binnacle would look really cool 😎.
 

·
Registered
Joined
·
21 Posts
Very nice work, has someone started on a pcb already? Ive got a mate that does it regularly so i can make a design if needed👍 This could be quite cool to integrate on the top of the steering like wheel like some bmw M cars and ferraris have. It should be easily doable if there are free wires in the reel behind the steering wheel. Which should be there on some models depending on trim level.
 

·
Registered
Joined
·
620 Posts
See what your mate says.. (y)
We can use a 12F1822 or 12F1840 PIC same footprint/firmware etc.

The Neopixels can draw a fair bit of current at 5V (~50ma each) when the brightness is cranked right up.
I'm using a 100ma linear regulator on my cludged prototype but limiting my drive level to 10-25% for 30 LED's

You might want to use a 1A+ capable switch mode regulator for much more headroom.
Any tech questions post them on here as normal..

We could add a brightness twiddle pot and another jumper to give a bit more flexibility.
I'll think about that.. (Edit) See post below.
 
1 - 20 of 27 Posts
Top