Notices
MEGAsquirt A place to collectively sort out this megasquirt gizmo

scangauge type display?

Old Mar 25, 2010 | 01:18 PM
  #21  
FieldEffectDave's Avatar
Newb
 
Joined: Aug 2009
Posts: 35
Total Cats: 0
Default

Basic Block diagram:



Supporting docs:

Display datasheet, includes overview, pinout, etc...

Low dropout 5V reg

RS232 transceiver (i was very lazy and bought somthing prefabbed, future improvement would be to layout everything on a single board etc...)

Like i said before its worth looking at the 4d website if your interested in the displays, its has a reference for the coding langauge etc...

4D Systems, Research and Development

The whole thing cost less than $100 AUD to make.
Old Dec 29, 2010 | 03:42 PM
  #22  
ianferrell's Avatar
Senior Member
 
Joined: Aug 2010
Posts: 613
Total Cats: 3
From: Maumelle, AR
Default

Any chance I could borrow your code? I ordered the 3.2" lcd w/ touch screen, and I'm going to just run in via serial to an ms3 (it claims 5v serial so no max232). I know the serial protocol is different, but a base for the 4dgl stuff would be nice.
Old Mar 9, 2011 | 04:34 PM
  #23  
sdlsaginaw's Avatar
Newb
 
Joined: Mar 2011
Posts: 7
Total Cats: 0
Default Also interested in code

I just ordered the hardware, going to build a unit for my MS1'd 1974 Fiat X1/9.

I'd rather not reinvent the wheel if your code is available to start from.
Old Mar 9, 2011 | 05:21 PM
  #24  
FieldEffectDave's Avatar
Newb
 
Joined: Aug 2009
Posts: 35
Total Cats: 0
Default

Ill start an open source project page with a CVS.

I'm hoping people go off and write code for cool features I can then put back into my display!
Old Mar 9, 2011 | 06:27 PM
  #25  
richyvrlimited's Avatar
Elite Member
iTrader: (1)
 
Joined: Jun 2006
Posts: 2,642
Total Cats: 42
From: Warrington/Birmingham
Default

I wish my USB connector I ordered nearly a month ago would turn up then I can get cracking on mine again :(
Old Mar 9, 2011 | 07:16 PM
  #26  
240_to_miata's Avatar
Elite Member
iTrader: (2)
 
Joined: May 2007
Posts: 2,617
Total Cats: 16
From: Cromwell, Connecticut
Default

I forgot about this thread. I really want to make one of these. I know the kid who originally created the LCdash. He is the one that got me hooked on megasquirt over 6 years ago with his eclipse followed by a Nissan Maxima setup.

IN for the source code and maybe a how to?
The above link for the datasheet isnt working
Old Mar 9, 2011 | 09:09 PM
  #27  
chokeasphyxia's Avatar
Junior Member
iTrader: (8)
 
Joined: Mar 2007
Posts: 331
Total Cats: 0
From: Sarasota, FL
Default

Very cool display Dave.
Old Mar 9, 2011 | 09:14 PM
  #28  
Freaky Roadster's Avatar
Junior Member
 
Joined: Mar 2011
Posts: 163
Total Cats: 0
From: Guildford, UK
Default

That is really cool. Waiting on a full instrument binnacle replacement
Old Mar 10, 2011 | 05:28 PM
  #29  
FieldEffectDave's Avatar
Newb
 
Joined: Aug 2009
Posts: 35
Total Cats: 0
Default

Old code for the simple 4d display <> RS232 <> Megasquirt attached if anyone wants to take a squiz.

Links for displays:

http://www.4dsystems.com.au/
http://www.4dsystems.com.au/prod.php?id=84
http://www.4dsystems.com.au/download...FX-DS-rev3.pdf


I am actually working away at a new version implemented slightly differently:



http://arduino.cc/forum/index.php/topic,53309.0.html



Improvements are:

* More code space and RAM for more features. (Using only the display gives only 400 bytes of RAM to play with)

I always wanted to add a graph feature, so if you felt an engine glitch or hesitation whilst driving you could quickly (whilst taking due care on the road) flick through some key parameter histories to see what just happened. Ran out of RAM trying to implement it in the display alone.

* Uses CAN interface to Megasquirt. (Its not as complicated or difficult as it sounds)

* Simple one wire bus over clock spring for steering wheel switches instead of analog multiplexing. (which was terrible.) Puts ~120ma of current through the clock spring contact to keep it clean.

* Code written in arduino IDE for fast OO code implementation and hopefully opens it up to a wider range of people to have a go at adding their own features.

* OLED display is shut down properly when IGN > off. (Apparently this can damage the display of not performed)

* Don't have to sacrifice horn function to use the clock spring for display functions.


Almost ready to start laying out a PCB which I will make available on batchpcb.com hopefully I can get it nice and small so it can be tucked in a corner of the cluster discretely with a short ribbon cable to the display - so minimal internal hacking of cluster required.


I've attached a pdf of the hardware schematic, feel free to critique.

Last edited by FieldEffectDave; Mar 10, 2011 at 06:07 PM.
Old Mar 10, 2011 | 05:33 PM
  #30  
FieldEffectDave's Avatar
Newb
 
Joined: Aug 2009
Posts: 35
Total Cats: 0
Default

Attachments
Attached Files
File Type: pdf
MSSchematic.pdf (86.3 KB, 267 views)
File Type: txt
MainDisplay.4dg.txt (10.8 KB, 250 views)
Old Mar 10, 2011 | 05:33 PM
  #31  
Reverant's Avatar
Elite Member
iTrader: (10)
 
Joined: Jun 2006
Posts: 6,020
Total Cats: 369
From: Athens, Greece
Default

Another fan of Olimex...coolio!
Old Mar 10, 2011 | 05:51 PM
  #32  
sdlsaginaw's Avatar
Newb
 
Joined: Mar 2011
Posts: 7
Total Cats: 0
Default

Do you have the .fnc files as well?

I can't wait for my display to arrive. I should have used faster shipping!
Old Mar 10, 2011 | 06:05 PM
  #33  
FieldEffectDave's Avatar
Newb
 
Joined: Aug 2009
Posts: 35
Total Cats: 0
Default

Lookup tables attached.

Another fan of Olimex...coolio!
Yeah was a neat little board. Seems crazy that so many people are stuffing about with SPI CAN sheilds on their arduino's when it takes 5 mins to stick the arduino bootloader on this dev board and set up the right environment files in the ardunio IDE.
Attached Files
File Type: txt
MegasquirtLookupTables.fnc.txt (6.6 KB, 147 views)
Old Mar 10, 2011 | 09:16 PM
  #34  
240_to_miata's Avatar
Elite Member
iTrader: (2)
 
Joined: May 2007
Posts: 2,617
Total Cats: 16
From: Cromwell, Connecticut
Default

Just ordered my parts to do the older 4d display <> RS232 <> Megasquirt setup.

I spent about an hour reading thru your code. Seems real similar to C or BASIC, so I should be able to play with it a bit

I am still pretty limited when it comes to programing. What do you need the .fnc files for btw?
Old Mar 10, 2011 | 09:21 PM
  #35  
JustinHoMi's Avatar
Junior Member
 
Joined: Jul 2005
Posts: 273
Total Cats: 1
From: Hillsborough, NC
Default

Nice project Dave. I also made a display with an Arduino, so I'm sure that I'll contribute code at some point. BTW, can you do CAN and RS232 comm simultaneously with the MS-II? Edit: I'm sure you can. I look forward to seeing the Arduino code.

Originally Posted by 240_to_miata
I am still pretty limited when it comes to programing. What do you need the .fnc files for btw?
In this case it provides a mapping between the raw analog reading and a real temperature/pressure/etc value.

Last edited by JustinHoMi; Mar 10, 2011 at 09:54 PM.
Old Mar 10, 2011 | 09:37 PM
  #36  
240_to_miata's Avatar
Elite Member
iTrader: (2)
 
Joined: May 2007
Posts: 2,617
Total Cats: 16
From: Cromwell, Connecticut
Default

gotcha. so that is why there are only a few variables in that file? its only the analog one.
Old Mar 10, 2011 | 09:43 PM
  #37  
JustinHoMi's Avatar
Junior Member
 
Joined: Jul 2005
Posts: 273
Total Cats: 1
From: Hillsborough, NC
Default

For those particular sensors it's easier to use a table to determine the output than a mathematical equation. The other sensor's output can be more easily expressed with simple math.
Old Mar 10, 2011 | 09:56 PM
  #38  
240_to_miata's Avatar
Elite Member
iTrader: (2)
 
Joined: May 2007
Posts: 2,617
Total Cats: 16
From: Cromwell, Connecticut
Default

1 more dumb question:
in the above code we request the serial data with
serout(82); which provides a ascii "R" ... I understand that

But after that we assign every variable to serin().

What does the 39 bytes of data look like from megasquirt? when you assign a variable the value serin() such as:

baroADC := serin();

doesnt it Assign the 0 - 255 value that megasquirt spit back? How are the variables being assigned the correct thing?

I guess I am a little confused on how the serial data is returned from megasquirt and assigned to all the individual variables.
Old Mar 10, 2011 | 10:01 PM
  #39  
JustinHoMi's Avatar
Junior Member
 
Joined: Jul 2005
Posts: 273
Total Cats: 1
From: Hillsborough, NC
Default

I haven't looked at his code, but the serial data is returned from the megasquirt in one big block. Each variable is offset by a certain number of bytes. Read these:

http://msextra.com/doc/ms1extra/COM_RS232.htm
http://msextra.com/doc/ms2extra/RS232_MS2.html
http://msextra.com/doc/ms2extra/can/ms2can.html
Old Mar 10, 2011 | 10:39 PM
  #40  
240_to_miata's Avatar
Elite Member
iTrader: (2)
 
Joined: May 2007
Posts: 2,617
Total Cats: 16
From: Cromwell, Connecticut
Default

makes sense. He calls out serin() in the correct sequence of the bits.

Thread Tools
Search this Thread

All times are GMT -4. The time now is 03:25 AM.