Simhub with Nextion and Nano

I‘m totally new to the world of Arduino and opening this topic since there are supposed to be „no dumb questions“. I‘m trying to build a dashboard for my race rig that is controlled by simhub software. Hardware on hand:

Nextion 4,3 Display
Arduino Nano clone Ch340

I was following a YT tutorial which used a USB-TTL adapter to arrange communication between simhub and the Display. I dont have one of those but I do have a Nano which also has RX and TX functionality. So I wired things up and got the Nextion to boot but that is where it ends. I tried uploading various TFT files but everytime the Nextion uploader goes through all different baud Settings and then reports „no Nextion found“

What is the obvious thing that I‘m missing here ? Or is what I am trying to do impossible?

How do I get data going from Simhub to the Nextion?

Please tell us exactly how you have the Nano connected to the display?

bumperklever:
is what I am trying to do impossible?

No. It is slightly more complex (and a little more expensive) than using a USB to TTL serial adapter, but it's certainly possible.

What is simhub and how does it relate to your Nextion display? How does it relate to your Nano? I’m confused as to what you have connected your Nextion to, how you connected it and where a USB to serial converter comes in.

Note that I would expect a USB to serial converter to output RS232 voltage levels, which are ±12V (IIRC), certainly not the 0V to 5V (or 3V3) a Nextion needs. I think if you connected a USB to serial adapter to a Nextion serial port you might have damaged it.

I suggest you start with my tutorial using Nextion displays with Arduino, which you can find in the displays section of these fora.

Simhub is a piece of software that takes telemetry data from various racing simulations (speed, RPM etc.) and streams it to a Nextion display. You can use it as a standalone feature on your racing rig or integrate the a display in your steering wheel (which is what I am trying to do right now).

I followed this YT tutorial: Beginners SimHub Nextion Dashboard Setup Guide! [STEP-BY-STEP] [SIM RACING HARDWARE] - YouTube

The TTL converter you see there has 5v and pins, that's how I got the idea of using a nano board instead.

I got things wired up as follows:

Red: to nano 5V pin
Black: to GND pin
Yellow: Nextion RX - to Nano TX
Blue: Nextion TX - to Nano RX

Nextion boots but no communication seems to take place between simhub and nextion allthough simhub shows that it is outputting the data.

Sorry, I’m not going to watch the tutorial. Does simhub run on a PC or a Nano? Obviously I know nothing about Simhub but if I am to offer any help please provide a schematic of how you have it wired up. Hand drawn and photographed is fine.

Also provide the code you have on the Nano, in code tags </> as per the forum instructions.

I think you are going to have to go back to basics and learn to drive a Nextion from an Arduino of some sort, one with at least one spare serial port is best, such as a mega.

At the moment you are providing far too little information for me to have a clue what you are doing.

PerryBebbington:
Note that I would expect a USB to serial converter to output RS232 voltage levels, which are +-12V (IIRC), certainly not the 0V to 5V (or 3V3) a Nextion needs.

It's TTL

bumperklever:
Yellow: Nextion RX - to Nano TX
Blue: Nextion TX - to Nano RX

Here's your problem. When you are using the Nano as a USB to TTL serial adapter, you actually need to make the connections RX-RX, TX-TX according to the pin labels printed on the Nano.

This seems completely wrong because we always need to make an RX-TX, TX-RX connection. The reason it's right is because those pins are labeled in relation to the ATmega328P microcontroller on the Nano. However, in this application you're not using the ATmega328P at all. Instead you're communicating directly from the computer through the CH340 USB to TTL serial adapter chip to the Nextion. The CH340 USB to TTL serial adapter chip is connected to the ATmega328P in an RX-TX, TX-RX configuration, so the pin marked "RX" on the Nano is actually connected to the TX pin of the CH340, and vice versa with the pin marked "TX".

Although it might not be necessary, I would also recommend you to connnect the RST pin on the nano to the GND pin. The reason is that if there is a sketch running on the Nano that is communicating via Serial, it will interfere with the communication between the computer and the Nextion display. By connecting the reset pin to ground, you hold the ATmega328P permanently in reset mode so it has no chance of interfering. If you go back to using your Nano for normal Arduino projects, remember to remove that connection so the ATmega328P starts running again.

It's TTL

Then I am even more confused. I expect a USB to serial adapter to be RS232 levels, certainly all the ones I've seen are. What am I missing?

Do I actually need to upload code to the Nano? I assumed it would work directly, just as it did in the video with the TTL adapter.

PerryBebbington:
Then I am even more confused. I expect a USB to serial adapter to be RS232 levels, certainly all the ones I’ve seen are. What am I missing?

They are very common and super cheap. Really a useful tool. Check it out:
https://www.ebay.com/sch/i.html?_from=R40&_nkw=usb+to+serial+adapter+ttl&_sacat=0&LH_TitleDesc=0&_osacat=0&_sop=15&rt=nc&LH_BIN=1&_blrs=recall_filtering

I always recommend people to get the ones with the standardized “FTDI header” pinout:

  • DTR or RTS
  • RX
  • TX
  • VCC
  • CTS
  • GND

That will allow you to plug the adapter right in to an Arduino Pro Mini, or many other boards that use this standard pinout. If you get an adapter with a non-standard pinout, you would need to use a mess of jumper wires to adapt it to the standard pinout. Some adapters don’t even break out the DTR or RTS pin, without which you will need to manually reset the microcontroller at just the right time on every upload.

I very much regret the ones I purchased that have a non-standard pinout.

bumperklever:
Do I actually need to upload code to the Nano?

No. As I said, you actually want to disable the the ATmega328P so it doesn't run any code.

bumperklever:
I assumed it would work directly, just as it did in the video with the TTL adapter.

That's correct.

Do I actually need to upload code to the Nano? I assumed it would work directly, just as it did in the video with the TTL adapter.

You probably don't need code now I understand what you have done. Follow Pert's advice.

Thank you Pert, I understand now. I would give you Karma but that doesn't seem possible on the mobile version. Instead I'll just tell you how lovely it is sitting by a pool with a beer in the south of France :slight_smile:

Sounds nice, enjoy!

pert:
It's TTL
Here's your problem. When you are using the Nano as a USB to TTL serial adapter, you actually need to make the connections RX-RX, TX-TX according to the pin labels printed on the Nano.

This seems completely wrong because we always need to make an RX-TX, TX-RX connection. The reason it's right is because those pins are labeled in relation to the ATmega328P microcontroller on the Nano. However, in this application you're not using the ATmega328P at all. Instead you're communicating directly from the computer through the CH340 USB to TTL serial adapter chip to the Nextion. The CH340 USB to TTL serial adapter chip is connected to the ATmega328P in an RX-TX, TX-RX configuration, so the pin marked "RX" on the Nano is actually connected to the TX pin of the CH340, and vice versa with the pin marked "TX".

Although it might not be necessary, I would also recommend you to connnect the RST pin on the nano to the GND pin. The reason is that if there is a sketch running on the Nano that is communicating via Serial, it will interfere with the communication between the computer and the Nextion display. By connecting the reset pin to ground, you hold the ATmega328P permanently in reset mode so it has no chance of interfering. If you go back to using your Nano for normal Arduino projects, remember to remove that connection so the ATmega328P starts running again.

And that solved it.....RX to RX and TX to TX made everything go up and running.
Thanks pert !

You're welcome. I'm glad to hear it's working now. Enjoy!
Per