Teensy-based CANbus gauge (and more)

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

MS2tester
Master MS/Extra'er
Posts: 606
Joined: Sat Apr 11, 2009 12:54 pm
Location: Aalsmeer the netherlands
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by MS2tester »

that looks great
if only they where this smart at innovate motorsports
if they could build a gauge wich could display everything that cam in over the serial or can line
one wich you could program yourself with any display you want
sort of like tthe sx displays of dta
do you think you could get that far?
displaying the can egt unit values?
possible log chain values from can egt if the can egt gets around to support them
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by racingmini_mtl »

Supporting the CAN-EGT is no more difficult than supporting any other data. The way to do this is exactly the same as for getting the data from an MS2 or MS3. And all the information needed is in the ini file.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
MS2tester
Master MS/Extra'er
Posts: 606
Joined: Sat Apr 11, 2009 12:54 pm
Location: Aalsmeer the netherlands
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by MS2tester »

could extra log chain channels easily be added to the can egt unit
suchs as an SSI4 unit?
or would that require an entire rewrite of the can egt code!
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by racingmini_mtl »

That's a significant update to the code. And what is more annoying is that I don't have the units for testing so that makes it more difficult to implement; doing that remotely with someone's help is a real pain.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Suprazz
Master MS/Extra'er
Posts: 500
Joined: Mon Jan 22, 2007 7:58 pm
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by Suprazz »

I decided to make one for me with a 128x128 color Oled LCD. Thanks for the details on your project it helped me to understand the CAN protocol!
front (Small).jpg
board (Small).jpg
Best looking and most advanced CAN-bus gauge
Toyota Supra 7MGE, 7M-GTE and 1JZ-GTE Plug and play ECUs: http://www.perfecttuning.net
Serial to Bluetooth or Serial to WiFi
DIYAutotune Canadian, EFI Source and ECUMaster reseller!
burdickjp
Helpful MS/Extra'er
Posts: 72
Joined: Thu May 24, 2012 4:19 am

Re: Teensy-based CANbus gauge (and more)

Post by burdickjp »

That built in CAN controller and available breakout board REALLY simplifies things compared to what I had to do with an arduino:
http://grassrootsmotorsports.com/forum/ ... 878/page1/

I wish there was a full CAN breakout board that can talk via SPI liko ADAFruit's GPS breakout. (hint-hint for board devs)

answer my own question. This looks promising: http://www.mikroe.com/click/can-spi-3.3v/
and in 5v: http://www.mikroe.com/click/can-spi-5v/

Sigh. Why didn't I see that a year ago when I was playing with this?
It doesn't look like the pitch between rows on those are correct for breadboard use, actually. double sigh
xrattiracer
Experienced MS/Extra'er
Posts: 301
Joined: Fri Aug 01, 2008 2:25 pm

Re: Teensy-based CANbus gauge (and more)

Post by xrattiracer »

there are can shields for arduino which are exactly that; CAN to SPI. they are expensive, and bulky though. I do have one, but never was able to get it to do much due to the limited power of the arduino. The teensy changed all of that, with its easy to use built in CAN controller and powerful processor. It itself could be CAN to SPI if you really wanted, but it can be so much more (such as what I am using it for here).
If it helps any, i am breaking out i2c on the back with the intention of using a port expander to run things like gauge needle stepper motors.
jsmcortina
Site Admin
Posts: 39622
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by jsmcortina »

Possibly almost an off-topic question, but why are these multitude of boards easier than using a plain microcontroller and making a PCB to suit?
e.g. the Freescale MC9S08DZ family has CAN, I2C, SPI etc. No need for SPI to CAN as the chip has an actual CAN module.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Alfagta
Experienced MS/Extra'er
Posts: 239
Joined: Wed Aug 21, 2013 2:54 am

Re: Teensy-based CANbus gauge (and more)

Post by Alfagta »

jsmcortina wrote:Possibly almost an off-topic question, but why are these multitude of boards easier than using a plain microcontroller and making a PCB to suit?
e.g. the Freescale MC9S08DZ family has CAN, I2C, SPI etc. No need for SPI to CAN as the chip has an actual CAN module.

James
I think the main reason is the programming platform and the the plenty availability of libraries for the Arduino Platform.

The Teensy board also have CAN onboard the only stuff you Need is a Transceiver (like the MS).

Another question which Platform do you use to Program the Freescale stuff?
Alfa 156 GTA
Alfa 75 Race Car MS III -- alway latest FW
Alfa 164 V6 Turbo
Alfa 155 2,5TD RIP
Test MS II --always latest FW
Tunerstudio V2.6.11 Registered
MegaLog Viewer V3.4.04 Registered
Suprazz
Master MS/Extra'er
Posts: 500
Joined: Mon Jan 22, 2007 7:58 pm
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by Suprazz »

On my side, I build my own board with microchip components. I was using this small developement called the noogroove because I had it laying around, if not, I would have done it with a microchip microcontroller.

This was only a test and prototype so this is why I didn't designed a PCB.
20150108_055602 (Small).jpg
Best looking and most advanced CAN-bus gauge
Toyota Supra 7MGE, 7M-GTE and 1JZ-GTE Plug and play ECUs: http://www.perfecttuning.net
Serial to Bluetooth or Serial to WiFi
DIYAutotune Canadian, EFI Source and ECUMaster reseller!
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by racingmini_mtl »

jsmcortina wrote:Possibly almost an off-topic question, but why are these multitude of boards easier than using a plain microcontroller and making a PCB to suit?
e.g. the Freescale MC9S08DZ family has CAN, I2C, SPI etc. No need for SPI to CAN as the chip has an actual CAN module.

James
James,

If you look at the pictures I posted previously, you'll see that I needed to have multiple boards to fit everything. The Teensy was just one in the complete package. And the price of the complete board is very close to what it would cost me for the bare board plus components. I had a look at making a board to have a slightly better fit and that didn't make much sense in terms of cost and work involved.

And this is for an open source project so using a common and widely used platform makes it a lot more user friendly. There are many libraries already present and more being created. And the processor used on the Teensy is a quite powerful one so even if the firmware is not as optimal as one created for this specific task, it will still be more than adequate for the job.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Zaphod
Master MS/Extra'er
Posts: 390
Joined: Thu Aug 14, 2008 11:38 pm
Location: Germany

Re: Teensy-based CANbus gauge (and more)

Post by Zaphod »

@Suprazz - what display is that? Do you have a link?
--------------------------------
fun is not a straight line

Image

Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
mickeymarrows
Master MS/Extra'er
Posts: 415
Joined: Fri Sep 23, 2005 6:35 am
Location: Ropley, Hampshire, UK

Re: Teensy-based CANbus gauge (and more)

Post by mickeymarrows »

Zaphod wrote:@Suprazz - what display is that? Do you have a link?
Looks like a 4D Systems 128 G2...
'82 Golf GTI ABF 16v MS2 Extra sequential COP
'77 Scirocco G60 MS2 Extra sequential
xrattiracer
Experienced MS/Extra'er
Posts: 301
Joined: Fri Aug 01, 2008 2:25 pm

Re: Teensy-based CANbus gauge (and more)

Post by xrattiracer »

James,
Yeah being able to leverage the Arduino libraries was a big thing for me. I am fairly new to embedded programming but have a couple decades of scripting experience under my belt so i am familiar with coding but have a hard time making the transition to compiled languages and then to embedded. I do very much dislike the Arduino "IDE" though and have made good progress in using an IDE meant for c/c++ (in this case, QT Creator) to compile for the Teensy (still using the Arduino libs though). For the $17 it costs for the Teensy module, it is not worth designing my own circuit from scratch and losing the nice Arduino compatible bootloader and such. And with the nice compact size, I wouldnt gain much space physically either.

I will have to look into that display. Some of it will be covered up by the LED ring, but it would still be nice to have more real estate. And color. The arduino that the display code was originally written for didnt have enough memory to do more than the 128x64 monochrome display but the teensy does.
xrattiracer
Experienced MS/Extra'er
Posts: 301
Joined: Fri Aug 01, 2008 2:25 pm

Re: Teensy-based CANbus gauge (and more)

Post by xrattiracer »

And here is the final prototype. very happy with how it turned out.

Image

Image

Image
jsmcortina
Site Admin
Posts: 39622
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Teensy-based CANbus gauge (and more)

Post by jsmcortina »

Nice enclosure!

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
burdickjp
Helpful MS/Extra'er
Posts: 72
Joined: Thu May 24, 2012 4:19 am

Re: Teensy-based CANbus gauge (and more)

Post by burdickjp »

xrattiracer wrote:there are can shields for arduino which are exactly that; CAN to SPI. they are expensive, and bulky though.
I have one, too, but I want a breakout board.
Zaphod
Master MS/Extra'er
Posts: 390
Joined: Thu Aug 14, 2008 11:38 pm
Location: Germany

Re: Teensy-based CANbus gauge (and more)

Post by Zaphod »

xrattiracer wrote:And here is the final prototype. very happy with how it turned out.
Beautiful, I like how it turned out! When will they be available for buying...? ;-)

Btw. in my case- I wouldn't even need an enclosure, because it will be in the dash anyway...

Greets
Sven
--------------------------------
fun is not a straight line

Image

Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
pit_celica
Master MS/Extra'er
Posts: 682
Joined: Tue Jul 18, 2006 3:12 pm

Re: Teensy-based CANbus gauge (and more)

Post by pit_celica »

What software are you using for PCB board design?

Where did you have them fab?

Really nice project!

Sam
xrattiracer
Experienced MS/Extra'er
Posts: 301
Joined: Fri Aug 01, 2008 2:25 pm

Re: Teensy-based CANbus gauge (and more)

Post by xrattiracer »

I am using Cadsoft Eagle for design, and have them made through oshpark.com
Post Reply