Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN Data

This forum is for the discussion of other projects on Megasquirt/Microsquirt hardware that don't fit into any of the other forums

Moderators: jsmcortina, muythaibxr

Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Raymond_B »

Joeli0 wrote:I am starting this project next week. Can anyone screen shot their settings in TS for how the CAN is broadcast or is it as simple as enabling it. This is my first go round but has me excited with the possibilities. Thanks.
Check out the CAN info in the manuals, that's what I did and played around with all the different settings.
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

Ok I have played with the Nextion display for about a month. Im getting the hang of it. Got some programming in for touch screen relay operation and such. Really cool stuff. I am bench testing my MS3X and trying to get it to talk to the waveshare transceiver. I have canH (spr1) to canH of transceiver and canL (spr2) to canL of transceiver. I have ground and 3.3v to transceiver verified by my volt meter. I have rx of transceiver to tx of pin 3 of teensy and tx to pin 4. I enabled master enable in CAN Parameters in TS and have dash enable on under dash broadcasting.... Im not getting anything according to CAN listen sketch in the teensy. Any steps to troubleshoot would be appreciated. Thanks!

Sent from my SM-N920P using Tapatalk
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

Image

Sent from my SM-N920P using Tapatalk
Alfagta
Experienced MS/Extra'er
Posts: 239
Joined: Wed Aug 21, 2013 2:54 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Alfagta »

Have you put the wires internally from spr1/2 to the js pins under the ms3 card?
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
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Raymond_B »

Also do you have the jumper setup on the CAN transceiver to terminate the bus?
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

Alf no I havent. I wasnt aware I had to do that being that it was purchased already assembled. That may be the missing link.

Raymond I have canH to what I assume was Canh on stim board. I have 3.3v and ground verified to transceiver and I have the tx and rx of transceiver to tx and rx of can bus 3 and 4 pins on teensy.

Sent from my SM-N920P using Tapatalk
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Raymond_B »

I cannot remember the default state of the Waveshare board, but go over the doc real quick. Devices on a CAN bus need to be configured in one of two ways so it's not really that the device is not fully assembled it just depends on how it's used. Anyway it's just a little jumper to set.
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

After more research I think the internal jumpers in the MS3 are not there from JS6 and JS8 to the SPR1 and 2. I bought a pre assembled board and assumed it was in place.

Sent from my SM-N920P using Tapatalk
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

Is anyone willing to share their .hmi and .ino files for me so I can reverse engineer how I want mine to work? I can see the CAN data with my scope. I try to serial print to the monitor but all I get are a stream of 0s that are there whether the CAN communication is present or not. I have communication between the processor and display and have had other successful projects between the two. I feel like I just need to get over this last hump lol. Thanks so far...

Sent from my SM-N920P using Tapatalk
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Raymond_B »

Joeli0 wrote:Is anyone willing to share their .hmi and .ino files for me so I can reverse engineer how I want mine to work? I can see the CAN data with my scope. I try to serial print to the monitor but all I get are a stream of 0s that are there whether the CAN communication is present or not. I have communication between the processor and display and have had other successful projects between the two. I feel like I just need to get over this last hump lol. Thanks so far...

Sent from my SM-N920P using Tapatalk
I posted my Arduino code about 1/2 way down on the 1st page. Also remember that the Nextion is a Serial device, I think I ended up outputting to Serial 2 to have the monitor fire up in the IDE.
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

Yes Raymond I went through it. I have the general idea of what it is doing but since I cant seem to get communication i was trying to go in steps. I wanted to see if I could verify CAN data through the serial monitor but I cant figure it out.

Sent from my SM-N920P using Tapatalk
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Raymond_B »

Understood.

OK so let's try to pare down the setup.

Just connect the MS to the CAN transceiver and then to the Arduino. Leave the Nextion out for now. I attached a basic CAN listen program, I picked it up off the Teensey forums. Using this you should see some sort of data stream in serial monitor in the IDE.

If still no joy please post your MSQ and .ino file renamed to .txt
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

Ok so I found my problem and now have CAN data displaying on serial monitor. I thought CAN rx had to go to CAN TX on Teensy but in this instance CAN rx goes to rx and tx to tx. So now I attempted to connect the Nextion to the Teensy with a basic box made up of "t0" to "t8" test boxes. When I powered it up it changed some of the boxes to 0 but did not change values. DO I have to use nextext to declare the text boxes on the screen so the Teensy know where to sent values? I feel like I am close? Also in the Nextion editor how do I change baud rate to 115200? I change it in the ino to 9600 because I wasnt sure. Thanks Raymond!
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Raymond_B »

I'll have to go back and remember how I changed the baud rate, but you do have the Nextion on Serial2 of the Teensy right?
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

I think its a problem with the CAN ids on the new firmware. In your code they are 1520+ and on the new MS3 firmware they are 1512+. Probably why when I turn it on it prints zeros.

Sent from my SM-N920P using Tapatalk
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Raymond_B »

You can edit the starting point for the CAN ID's. But again, just to make sure you're Nextion is on Serial2 right? Or do you mean you're getting all 0's in Serial monitor when connecting to Serial 1 of the Teensy?
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Joeli0
Helpful MS/Extra'er
Posts: 58
Joined: Tue Dec 29, 2015 6:38 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Joeli0 »

Hi Raymond. I was getting all zeros on the display. The problem ended up being how the CAN broadcast was enabled in my MS3. I was referencing an old manual for the firmware I had. Now the values are being displayed correctly but its just slow. My next step is increasing baud rate on Nextion.

Sent from my SM-N920P using Tapatalk
frdstang93
MS/Extra Newbie
Posts: 19
Joined: Wed Mar 26, 2014 6:24 pm

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by frdstang93 »

Huge thanks to Raymond_B for putting the info out there to help with this on various forums and a huge thanks to Joeli0 for nudging me in the right direction to get this thing going.
robinpipirs
MS/Extra Newbie
Posts: 5
Joined: Fri Jul 29, 2016 5:08 am

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by robinpipirs »

I see that you're using rx tx with the tensy how is that compared to using a mcp2515 interface? Pros cons ? Anyway the lcd looks really interesting. :)

Skickat från min SM-G935F via Tapatalk
Raymond_B
Super MS/Extra'er
Posts: 1394
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas
Contact:

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Post by Raymond_B »

robinpipirs wrote:I see that you're using rx tx with the tensy how is that compared to using a mcp2515 interface? Pros cons ? Anyway the lcd looks really interesting. :)

Skickat från min SM-G935F via Tapatalk
I used this project as a way to get started with CAN and micro-controllers so it's the only one I have experience with. Next up is to try a Teensy 3.6 that has 2 CAN buses. I hope to use it to drive an OEM CAN dash display from the MS.

Thanks!
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3X/v3.57
http://www.buildpics.org/
Post Reply