Issue communicating over serial with Arduino

Hello,
Hopefully this is ok to post here... I currently have node red running on a RPI 3B+ installed using the 'Venus OS Large image' from Victron (Camper van electrics). I want to be able to use an Arduino to do some water valve controlling and it needs to know the status of the water tanks from the rpi.

For some testing I am trying to send simple serial strings from the Arduino Uno to the rpi but it only receives some messages and the rest is full of symbols. there should be a message every 2.5 seconds saying "Data: " with a random number afterwards but it doesn't seem to work. My baud rates are the same at 9600.
Any help is appreciated!

How did you connect the Arduino to your pi?
Over usb or some jumper wires to TXD0/RXD0.
For the last one keep in mind that most Arduino's are 5V and the raspberry 3.3V.
Also for connection with the jumpers, have a look at this

Thank you for the reply.
Originally I tried using the serial pins using a logic converter for the voltage difference. I managed to get a handfull of messages sent through from the pi to the arduino using software serial (I wasn’t sure how else I could see the arduino serial monitor while using the serial pins). But then it stopped and I never got it working again.

I then switched to using the USB directly from arduino to raspberry pi and this is where I am now.

Interestingly I did read somewhere else about the Bluetooth interfering with the rpi serial but I couldn’t cd into the \boot folder… it didn’t seem to exist but it was late into the evening by that point. I’ll have a read of that article and give it a go.
Thanks again

Hello, unfortunately I've had no luck. editing the boot doesn't seem to make a difference. the boot file already had the code from the link you sent through... for now I have been using the usb on the pi for the Arduino which seems to be port ACM0 which shouldn't be affected by the onboard bluetooth. If you have any more ideas id be happy to try them. Ive added some images below that show my basic setup.
Cheers


In your previous post you mentioned that the Arduino is connect over USB to the pi, ttyACM0 is not an usb serial interface that you selected in the serial port node.
Usb interface should look like ttyUSB0
Use the magnification glass in the node to find the correct port.

That is interesting. When I plug it in via usb the I get ACM0, AMA0 and s0. Then when I go via the GPIO ACM0 disappears and the other 2 remain. USB does not show up in any case. I don’t understand why it occasionally receives the message… unless VenusOS is taking the USB or something?

I believe after a lot of google searching late into the night I have found my answer and it now (so far) is working. It is because the boot software (VenusOS) firstly uses the USB ports as a console interface so it dumps all its logs into there, confusing things. Then it only 'recognises' a set few USB types which are manually set in some configs deep in the OS. I have done a short write up here on the Victron / VenusOS forum with my findings. Thanks @edje11 for your help. it made me delve deeper into the usb itself not working rather than the serial interface which helped me find a GitHub post which fixed it.
Thanks again!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.