Jump to content
Sign in to follow this  
wrs

Link G4+ Monitor

Recommended Posts

I'm currently developing a colour LCD monitor for the Link G4+ ECU.

To keep it simple I'm using the serial port on the ECU (considered CAN but I don't have a developed C library for that).

4D Systems in Ausi make a series of fairly smart touchscreen LCDs in various sizes. I've used these a lot for home automation systems and various other small projects.

One of the easiest small embedded development platforms is the Arduino kits. The current prototype uses a Freetronics Ethermega (same as an Arduino Mega but with Ethernet) and the 4D Systems uLCB-32PTU.

I've set up the Link G4+ to talk at 115k baud and Long Datastream to the Ethermega. The Ethermega sends the data request then receives the data block and translates it to display data for the LCD - really simple.

Included in the design is a real-time clock + you can add a SD card to trend all engine metrics to a file (haven't developed this yet but easy enough to add).

The current design shows time, date, RPM, IAT, ECT, MAP, TPS and Battery Voltage values as these are my requirements. A red warning screen pops up for warning messages (eg ECT too hot).

It's currently sampling at 250ms intervals (4Hz) but could easily sample at 100ms (10Hz) or even faster.

This makes a much cheaper and completely configurable colour LCD version of the Link display for a fraction of the price. The full retail cost of the prototype is around $280 *buying online).

If anyone is interested in the project and/or has ideas to add please let me know. I'm happy to send any forum member the design details and software (when complete). Depending on interest I may be able to make a production version of the board to sell to memebrs at cost.

I could even build to order with a LCD and layout of your preference - again at cost. Alternatively, since I have a development platform here, if someone wants to buy all their own bits I can help them get it going. I can send them the files for the LCD and the Arduino .ino file...

Share this post


Link to post
Share on other sites

Sounds like a neat project.
Not sure if your stepping on electronz (link's) toes a bit though.

Will the final product still use an arduino micro and board or something a bit more purpose built for a vehicle.

Edited by Thorburn

Share this post


Link to post
Share on other sites

Will probably just keep the Arduino base so it's simple for anyone to modify.

Link publish all the data you need to make your own system in their help menus.

When I approached them to ask if comms was possible to their ECU they pointed me to everything I needed.

Anyone wanting a pre-developed LCD display can just use one of theirs.

In my case I wanted to monitor and alarm on bad situations hence developing my own (plus I wanted a colour LCD).

I susect there won't be an enormous amount of interest - I'm just making the offer in case anyone has been thinking they want their own custom display with data and/or monitoring not currently available directly from the Link products. I'm certainly not trying to make a commercial product to compete with theirs...

Edited by wrs
  • Like 1

Share this post


Link to post
Share on other sites

Been making my own as well but for the dta s80 and using canbus instead.

Share this post


Link to post
Share on other sites

Ha i've been working on mine as well for stock BMW ECUs that support the BMW D2 and 3 protocols, Autronic SM4, Pectel SQ6 etc. Its been in testing for sometime now. The software and electronic bits are the easy part, Where the challenges lay are having it all stay together in a high vibration environment (a car) . Its a challenge to say the least.

Mine is integrated as part of the steering wheel which brings its own challenges. Works tits though.

Share this post


Link to post
Share on other sites

Now that's a good idea - hadn't considered putting it on the steering wheel. I like it!!

Share this post


Link to post
Share on other sites

Ha i've been working on mine as well for stock BMW ECUs that support the BMW D2 and 3 protocols, Autronic SM4, Pectel SQ6 etc. Its been in testing for sometime now. The software and electronic bits are the easy part, Where the challenges lay are having it all stay together in a high vibration environment (a car) . Its a challenge to say the least.

Mine is integrated as part of the steering wheel which brings its own challenges. Works tits though.

You should add support for the dtsfast data stream then I wouldn't have to bother with mine ?

Share this post


Link to post
Share on other sites

I susect there won't be an enormous amount of interest - I'm just making the offer in case anyone has been thinking they want their own custom display with data and/or monitoring not currently available directly from the Link products. I'm certainly not trying to make a commercial product to compete with theirs...

Registering some interest here. I have a G4 Storm that's pre-can bus (can be upgraded apparently) although not sure that would make a difference for serial. If one wanted to customise the display then it would presumably require altering the code? Unfortunately that's a zero skill area for me... although it seems a few of you guys have the skills, so am jealous.

For example, if it was on my car instead of:

time, date, RPM, IAT, ECT, MAP, TPS and Battery Voltage

I'd be interested in the following for my needs:

ECT, MAP, Battery Voltage, oil pressure, lambda, boost target (its adjustable by knob) if that's a logged parameter. And something related to warnings (could it scroll through warnings if there were multiple?)

And if I had more inputs to the ECU (in other words if I got a new ECU), I would be interested in fuel pressure, oil temp, coolant system pressure, EGT, blah blah. Basically the main value to me in something like this is in avoiding buying and mounting a bunch of gauges.

Either way, I am interested to learn more if you were to add info to the thread.

Edited by CamB

Share this post


Link to post
Share on other sites

You should add support for the dtsfast data stream then I wouldn't have to bother with mine

All good, PM me will grab some details off ya.

Share this post


Link to post
Share on other sites

Also very interested have 2 race cars E46 &E36ti both running link fury's and after displays for oil pressure and water temp in addition to yours?

Share this post


Link to post
Share on other sites

All good, PM me will grab some details off ya.

Tried but got an array error. Pm me your email address and what info you need and I'll send it through .

Cheers

Share this post


Link to post
Share on other sites

Tried but got an array error. Pm me your email address and what info you need and I'll send it through .

Cheers

Done

Share this post


Link to post
Share on other sites

Definitely interested, have a G4 Xtreme+, but not sure if they are compatible as they seem to be CAN only? But I don't know sh*t about the ECU, that's what tuners are for!

Share this post


Link to post
Share on other sites

Some good progress has been made on the project.

I've got the colour LCD formating done and talking to the uP on the Arduino board. I'm getting the data from the ECU ok and have some of it mapped to the LCD.

I'm trying to figure out a way to make it configurable for anyone who wants to use it - even if they're not software savy. The Arduino side is easy as a bunch of remarked 'define' statements at the beginning of the software can enable the values you want to look at so any or all can be configured to suit a personal requirement simply by un-remarking the define statements for the options you want. The difficulty is with the LCD - it requires a uniquie setup for every possible combination of data.

Maybe the answer is to just have a bunch of preset options (maybe 10) and the user can pick the closest to their needs if they can't make the modifications themselves.

I've also included a colour controller into the design so anyone with colour Angel Eyes or other colour LED lamps can control the colour, brightness and on/off of the LED's. It will adjust the RGB in 100 steps for each colour and 100 steps for overall brightness so any colour is possible. This code came straight from my house automation project.

I'm not considering data logging yet but it would be possible as the Arduino supports SD cards in FAT16 or FAT32 so not too much limitation on storage - certainly enough for months or even years of log data...

Share this post


Link to post
Share on other sites

I've looked at 4D stuff before but didn't like how they did the screen design and interfacing with the uP. Developed my own software to generate code for an arduino running a TS LCD, can pick up the whole set for around $50. It's still in development, but I've used it for a few things. http://www.tawatech.com/G2/G2.html It might solve the problem of unique setups as you can just create different 'windows' as required and reuse the widgets across the lot. I reckon an orange/black pallet could look pretty mint with the E36's...

PS. I'm not stalking you, I swear!

Edited by tawatech

Share this post


Link to post
Share on other sites

You might find the arduino runs out of grunt when you start wanting to data log to sd at any real decent rates.

I have my raspi pulling all possible values from my ecu now over can bus. Just waiting for display to arrive now.

Share this post


Link to post
Share on other sites

Thanks for the info.

Re the LCD - looks like a good project.

The main reason I like the 4D display is it's uses it's own uP to do all the work - which has its adavantages and disadvantages. It wouldn't be too difficult to create a bunch of different forms (say 6-8 for each layout options) and just reference their objects using an array. It would mean all the object parameters are fixed as they are coded into the LCD. What I like about your project is the ability to contral all aspects of the object (eg colour) to allow for personal preferences.

Re logging - I haven't had any problems logging data to a SD card before. The basic Arduino @ 16MHz seems to be able to write around 8kb/s to the SD card without problems (not using the Arduino library). This is a lot of data...

For all high-speed applications I don't use the Arduino libraries (have been using the Amtel ATmega range for many years before Arduino came along). While the Arduino libraries make life simple for beginners the code is usually very slow (1/10 of what is possible on many library functions). If I need high speed I either directly control a peripheral or create my own small task specific library. If speed isn't important I just use the Arduino library - they're pretty good for most cases.

I'm nearly done the first cut for my application. After that I'll look at what it will take to mod for others to use.

By next weekend I'll be able to put up some photos of the working system.

Share this post


Link to post
Share on other sites

I had done some logging before, but when it came to sampling the ADC, receiving serial data, updating a LCD, and logging at the same time it got a bit slow but that was using the libraries. You're obviously a lot more clever at programming than me :)

Keen to see what it looks like when you get some pictures.

Share this post


Link to post
Share on other sites

Yep, analogRead is very slow and I'm pretty sure it's blocking (stops all other program execution and waits for the ADC). I haven't used the Arduino serial library that much but will check how it goes before committing to it.

I usually use a timer to generate an interrupt to trigger an ADC conversion. On the ADC interrupt I store the value into an array and increment the mux. This way the ADC is sampling at a fixed rate in the background with very little input from the CPU and the values are stored into an array of integers.

You can do the same for the serial port too - keep the overhead very low.

From memory the Arduino analogRead takes some very long time like 100us. If it is actually 100us then several thousand processor cycles are wasted...

Conrolling the ADC, Serial Port and SPI for the SD card using interrupts is very much faster than the standard libraries.

I'm certainly not that good a programmer and mostly self taught - just been doing it for a very long time.

  • Like 1

Share this post


Link to post
Share on other sites

The other way is to use a timer interrupt to process comms/critical events, and just loop all the inefficient sh*t in the main loop. Have used that to both control a screen, and steppers at around 25kHz pulse frequency.

Share this post


Link to post
Share on other sites

I have it running in it's first cut form.

The photos below are the unit out of the car on my test bench - so no comms with the ECU. In this state all the values in the receive buffer are zero and display as such with the offsets etc.

At present all screens will likely need a bit of prettying up and I want to change some of the icons to get a better looking theme. I'm also open to suggestions for layout.

RPM is in the top left corner in the bigger text with the Coolant Temp next to it - these are the two main items of interest for me.

The unit is based on the Freetronics Ethermega, 4D Systems uLCD-32PTU, Freetronics RTC Module, Freetronics Light Sensor Module and a Custom Isolated RS232 Module using a ADM3251E chip.

It samples from the ECU every 100ms and updates the LCD if values have changed.

It has a full-colour Halo controller built in. It remembers the last state of the halos and the colour settings using the spare non-volatile memory in the RTC. The RTC was added in case logging is ever added to the design + to show the time + to give a small non-volatile storage space that has no write limitation.

The halo's also dim with the ambient light level so are always the same relative brightness whether on at night or during the day. The brightness is also held constant with varying battery voltage levels.

The LCD in the car also dims to match the ambient light level so it doesn't blind you at night. This requires a custom mod to the LCD as the uLCD-32PTU does not support dimming standard. It only requires removing one chip resistor from the LCD board and tacking on a new resistor to a spare pin on the connector. This pin then gets linked to a PWM output on the Arduino board to directly control the backlight LED.

At present it's only monitoring for over-temperature and jumps to a over temp warning screen if the event occurs. I haven't got a screen shot of this in the pictures below.

Ethermega Board

w0peti.jpg

Adapter Interface with the RTC module and RS232 module + off-board connectors

20740mv.jpg

Main Screen

2kkorl.jpg

Time Adjustment Screen

13yfgxw.jpg

Halo Control Screen

14ch0ck.jpg

Edited by wrs

Share this post


Link to post
Share on other sites

I spent a little time today tidying up some of the text. Long strings tend to flicker a little if the whole string is re written - like the time 00:00:00. Now I'm writing each set of digits individually and only if they change so there is no more flicker.

Also, played around with some backgrounds, font colour changes and changed the icons for the Halo & Time.

Here's the new screens (but almost anything is possible).

Main Screen:

2wgrbq8.jpg

Time Setting Screen:

2whkpsh.jpg

Halo Control Screen:

wrdx89.jpg

Edited by wrs

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...