MEGAsquirt A place to collectively sort out this megasquirt gizmo

scangauge type display?

Thread Tools
 
Search this Thread
 
Old 03-25-2010, 01:18 PM
  #21  
Newb
 
FieldEffectDave's Avatar
 
Join Date: 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.
FieldEffectDave is offline  
Old 12-29-2010, 03:42 PM
  #22  
Senior Member
 
ianferrell's Avatar
 
Join Date: Aug 2010
Location: Maumelle, AR
Posts: 613
Total Cats: 3
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.
ianferrell is offline  
Old 03-09-2011, 04:34 PM
  #23  
Newb
 
sdlsaginaw's Avatar
 
Join Date: 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.
sdlsaginaw is offline  
Old 03-09-2011, 05:21 PM
  #24  
Newb
 
FieldEffectDave's Avatar
 
Join Date: 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!
FieldEffectDave is offline  
Old 03-09-2011, 06:27 PM
  #25  
Elite Member
iTrader: (1)
 
richyvrlimited's Avatar
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
Default

I wish my USB connector I ordered nearly a month ago would turn up then I can get cracking on mine again :(
richyvrlimited is offline  
Old 03-09-2011, 07:16 PM
  #26  
Elite Member
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,605
Total Cats: 16
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
240_to_miata is offline  
Old 03-09-2011, 09:09 PM
  #27  
Junior Member
iTrader: (8)
 
chokeasphyxia's Avatar
 
Join Date: Mar 2007
Location: Sarasota, FL
Posts: 331
Total Cats: 0
Default

Very cool display Dave.
chokeasphyxia is offline  
Old 03-09-2011, 09:14 PM
  #28  
Junior Member
 
Freaky Roadster's Avatar
 
Join Date: Mar 2011
Location: Guildford, UK
Posts: 163
Total Cats: 0
Default

That is really cool. Waiting on a full instrument binnacle replacement
Freaky Roadster is offline  
Old 03-10-2011, 05:28 PM
  #29  
Newb
 
FieldEffectDave's Avatar
 
Join Date: 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; 03-10-2011 at 06:07 PM.
FieldEffectDave is offline  
Old 03-10-2011, 05:33 PM
  #30  
Newb
 
FieldEffectDave's Avatar
 
Join Date: Aug 2009
Posts: 35
Total Cats: 0
Default

Attachments
Attached Files
File Type: pdf
MSSchematic.pdf (86.3 KB, 218 views)
File Type: txt
MainDisplay.4dg.txt (10.8 KB, 225 views)
FieldEffectDave is offline  
Old 03-10-2011, 05:33 PM
  #31  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,979
Total Cats: 356
Default

Another fan of Olimex...coolio!
Reverant is offline  
Old 03-10-2011, 05:51 PM
  #32  
Newb
 
sdlsaginaw's Avatar
 
Join Date: 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!
sdlsaginaw is offline  
Old 03-10-2011, 06:05 PM
  #33  
Newb
 
FieldEffectDave's Avatar
 
Join Date: 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, 127 views)
FieldEffectDave is offline  
Old 03-10-2011, 09:16 PM
  #34  
Elite Member
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,605
Total Cats: 16
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?
240_to_miata is offline  
Old 03-10-2011, 09:21 PM
  #35  
Junior Member
 
JustinHoMi's Avatar
 
Join Date: Jul 2005
Location: Hillsborough, NC
Posts: 273
Total Cats: 1
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; 03-10-2011 at 09:54 PM.
JustinHoMi is offline  
Old 03-10-2011, 09:37 PM
  #36  
Elite Member
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,605
Total Cats: 16
Default

gotcha. so that is why there are only a few variables in that file? its only the analog one.
240_to_miata is offline  
Old 03-10-2011, 09:43 PM
  #37  
Junior Member
 
JustinHoMi's Avatar
 
Join Date: Jul 2005
Location: Hillsborough, NC
Posts: 273
Total Cats: 1
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.
JustinHoMi is offline  
Old 03-10-2011, 09:56 PM
  #38  
Elite Member
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,605
Total Cats: 16
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.
240_to_miata is offline  
Old 03-10-2011, 10:01 PM
  #39  
Junior Member
 
JustinHoMi's Avatar
 
Join Date: Jul 2005
Location: Hillsborough, NC
Posts: 273
Total Cats: 1
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
JustinHoMi is offline  
Old 03-10-2011, 10:39 PM
  #40  
Elite Member
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,605
Total Cats: 16
Default

makes sense. He calls out serin() in the correct sequence of the bits.
240_to_miata is offline  


Quick Reply: scangauge type display?



All times are GMT -4. The time now is 07:53 PM.