ms can to analog coolant temp gauge.

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

Moderators: jsmcortina, muythaibxr

Post Reply
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

ms can to analog coolant temp gauge.

Post by Vauxi »

Hello.
I'm totally noob to the whole arduino and micro controller stuff. I've read a lot of posts in different forums about arduinos and I'm confused a lot :D What I have been planning is to use original instrument panel without modifying it at all. Idea is to replace original coolant temp gauge ptc resistor with can based pwm transistor control. This should be possible? What do I need? Looks like Teensy 3.2 is where to go? Do I need some chip to decode can signals too? Or is just basic bus terminator resistor enough? This whole idea may èxpand to the speedo too. But we'll see.. And if teensy is okay to go. Is just basic npn transistor coupling enough for job?
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

I've been struggling to get any can signal to the teensy board. I have two different can transreceiver and both of them doesn't react to the signal what ms2 v3 is sending out. So I figure that I should scope it. This is what I found

Image

Signal base voltage is 1.5V. Both swing voltages are around 1V. Are these correct ? I measured from open jimstim pins. Transreceivers are based to mcp2551 and SN65HVD230. I assume that these ready to connect transreceiver boards has correct pinouts. What could possibly be wrong ?

I use teensy 3.2 as arduino.
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: ms can to analog coolant temp gauge.

Post by jsmcortina »

Is your baud rate set correctly ?

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".
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

Do you mean at transreceiver boards or at teensy ? At teensy, propably yes. But there is no signal coming in. I dunno about these transreceivers.
http://www.ebay.co.uk/itm/1PCS-SN65HVD2 ... Sw7FRWZSvA One is like this.
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: ms can to analog coolant temp gauge.

Post by Matt Cramer »

I don't have experience programming the CAN protocol side of things, but I can confirm that it's possible to run some analog gauges off a PWM output. I did that for my '72 Chevy truck when I swapped in an LSx motor, which didn't have a separate coolant temperature sensor for the gauge.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: ms can to analog coolant temp gauge.

Post by Raymond_B »

1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

Yes I have. I've been swapping cables etc so many times. I don't know how I can or do I need to change transreceiver mode/state. Have to look on that.
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: ms can to analog coolant temp gauge.

Post by Raymond_B »

Use the Teensy's serial monitor to see if you are getting data.

Bust basically, and you probably know this, it needs to be set up like this.

Megasquirt ---------> CAN transceiver ----------> Teensy

Lastly, the MS2 you are using is set up for CAN right? And you have CAN broadcasting turned on?
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

Basic connection is known. Serial monitor doesn't display anything. Scoped the serial tx and rx lines to the teensy and there is no data going on. I have turned on the dash broadcast. That signal is shown in the image above.
seishuku
Experienced MS/Extra'er
Posts: 209
Joined: Tue Dec 01, 2009 5:38 pm
Location: Wisconsin, USA

Re: ms can to analog coolant temp gauge.

Post by seishuku »

You won't see anything on the RX/TX lines unless the proper dominate bit on the tx line is set (IIRC).
Is RX connected to RX and TX connect to TX?

The MCP transceiver is 5v, while the HVD230 is 3.3v, so just keep that in mind.

Also, is it just the teensy and MS in the bus? Is there a termination resistor in place?
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

Now I have some signal leaving from transreceiver. I dunno, it might be all this time a partially broken ground line. As I'm using only jumper leads. No breadboard here, yet. I've tried about any scketch I could find all from techdrop to the raymonds whole code. All of them shows in serial monitor either hello text or nothing at all. This time wires are tx-tx and rx-rx. Yep 5V is needed to MCP. MCP is now sending 5V squarewave signal to the Teensy and propably having something back because there is signal on rx line too. There was only one terminator so 120ohms were between can lines. It is a bit tricky to install another one when not using breadboard.

From Raymonds code, I removed // of three lines from serial print section and now I have welcome text at serialmonitor. I should have displayed much more than that?

I'm so noob at this. Try to bear with me :D

CAN Dash output is 50Hz. CAN baud in teensy code is 500k.
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: ms can to analog coolant temp gauge.

Post by Raymond_B »

Vauxi wrote:Now I have some signal leaving from transreceiver. I dunno, it might be all this time a partially broken ground line. As I'm using only jumper leads. No breadboard here, yet. I've tried about any scketch I could find all from techdrop to the raymonds whole code. All of them shows in serial monitor either hello text or nothing at all. This time wires are tx-tx and rx-rx. Yep 5V is needed to MCP. MCP is now sending 5V squarewave signal to the Teensy and propably having something back because there is signal on rx line too. There was only one terminator so 120ohms were between can lines. It is a bit tricky to install another one when not using breadboard.

From Raymonds code, I removed // of three lines from serial print section and now I have welcome text at serialmonitor. I should have displayed much more than that?

I'm so noob at this. Try to bear with me :D

CAN Dash output is 50Hz. CAN baud in teensy code is 500k.
Have you been able to do basic tests with the Teensy? Like the LED program? Have you ensured that is all working correctly
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

Yes. I managed to spin dc motor with the most basic pwm control code thorough dc motor controller and I got GPS signal to the serial monitor with example kitchen sink sketch. And of course I got the led turned on as first code ever. 8) So far CAN has been hair grayer difficult to handle.
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: ms can to analog coolant temp gauge.

Post by Raymond_B »

Can you post some pictures of how you have it wired? Also the transceiver has the termination resistor set right?

Oh wait, also the Transceiver needs to be tx-rx and rx-tx to the Teensy
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: ms can to analog coolant temp gauge.

Post by racingmini_mtl »

Raymond_B wrote:Oh wait, also the Transceiver needs to be tx-rx and rx-tx to the Teensy
No. It's Tx to Tx and Rx to Rx from Teensy to transceiver.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: ms can to analog coolant temp gauge.

Post by Raymond_B »

racingmini_mtl wrote:
Raymond_B wrote:Oh wait, also the Transceiver needs to be tx-rx and rx-tx to the Teensy
No. It's Tx to Tx and Rx to Rx from Teensy to transceiver.

Jean
That's what I get for doing this and then not touching it for a while. I'll go with "I was thinking about the Nextion serial connection", yeah that's it :)
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

Image

I just couldn't show real image of the most sketchier wiring of all time. :D Unless you really want. :lol:
Ms2 has correct terminator value of 120ohm. I think that transreceiver is meant to steal signals of working can system? Thats why it has very high resistor value in it? Otherwise low values may affect the signals? Now as writing this I do have 60 ohms measured resistance between can h and l. Now there is noting else but steady 5 volts on the RX line and 0-5V signal on TX line at Teensy. Serial monitor welcomes me only with Hello Megasquirt text with Raymonds code. I just dont get it.
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

What if can inputs are broken at teensy ? How I alter the code to use any other serial input? If I remember correct, some older can libraries used somekind other way to open/use ports?
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

I had a change to test jimstim and ecu that the can is working fully at their end. So the failure lies at teensy's end. :/ Well. Atleast this is ruled out now.
Vauxi
Experienced MS/Extra'er
Posts: 211
Joined: Sun Feb 19, 2017 9:06 am

Re: ms can to analog coolant temp gauge.

Post by Vauxi »

Ordered a new can transmitter. My two other has been broken from the beginning..
Post Reply