Raspberry pi and arduino USB communication

Hi. Any ideas how to avoid the external USB cable between the Arduino and the Raspberry pi? I am thinking to de-solder the USB connectors and resolder them together. Will this approach work? Any other solution in mind without going to the Sangaboard?

Thanks

As you note, the Sangaboard V0.4 works as a hat, but is not available yet.

On Arduino the serial Tx Rx are available on the pins as well as on USB. I don’t know whether the Pi also routes its serial-over-usb to the GPIO pins in parallel by default. There is also the problem that the pi is 3.3V and a nano is 5V.

I think rather than desoldering any connectors a ‘solid cable’ might be safer. A usb plug into the Pi socket and one in the nano socket, with no backshell on either and stiff wires joining them.

I saw that the Sangaboard V0.4 is out there. But I wouldn’t know how to solder the components to the board. Most likely I will blow out my house attempting to do that. :exploding_head:
I have it connected using the USB cable. I was thinking to connect it internally instead of this ugly blue cable sticking out :face_vomiting:

I was thinking of something like the back-to-back HDMI connector they use on the Waveshare displays

One option would be to use a Bluetooth dongle on the Arduino. This would require software changes for the Arduino and the Pi. Modern Pi’s come with Bluetooth as standard.

I’ve a few other projects in the queue but I’m considering designing a PCB to use with an Arduino Nano, the driver chips and an experimental area for modifications. I’m interested in using one of the RGBWW LEDs as a light source instead of the standard white LEDs . This will require a separate processor and I’m looking at the Rpi Pico or the Seed Studio XAIO. The objective is to make a “tuneable” colour light source as well as the standard white illumination.

Stay safe,

Steve

Bluetooth is an interesting option - we’ve avoided it so far mostly because it’s another step to go wrong when people are building them, but you’re right that it ought to work. It also makes a lot of sense if you use an ESP32 board with onboard bluetooth.

Sangaboard v4 is a hat with 3.3v communication, so once it’s working I suspect some group buys of this will be very helpful. If we can get a CE mark, OFI or Kitspace will definitely try to sell these in the UK, and we’ll do our best to figure out something for other markets if we can - but CE marking will likely take a little while after we have our first batch of working boards… It’s all surface-mount components, so I don’t recommend trying to solder it yourself! Once we have specced it out with a board house, though, I’ll let you know so you can order some even if we aren’t yet set up to sell them.

Given that the two USB ports in question are not on the same side of the microscope, the “rigid cables” probably don’t work. Perhaps a compromise would be right-angled connectors, and then you can run the wire through the Sangaboard “bucket” which wouldn’t be perfect but ought to be neater than your current solution. I’ve not double checked that link, but it gives an idea of what I mean.

@r.w.bowman is it the Raspberry PI UART on pins 13/14 that is used for the Sangaboard V0.4 as a Hat? If that is enabled in the OFM software then using a level shifter to link those to the Nano Tx0/Rx0 would be a relatively simple way to keep all the wires inside the box? (or use a 3.3V Arduino compatible. I am sure I have seen them in Nano format)

I think so but I would want to check with @kaspar or Valerian. The nano’s IO pins run at 5v by default, Valerian and Kaspar have configured the microcontroller on the Sangaboard v4 to run at 3.3v so we don’t need level shifters. In principle, if you added level shifters then you could wire internally from Pi → shifter → nano; I don’t know if that would need any firmware tweaks, but if it did I suspect they would be manageable (though we don’t currently have the hardware to test them out). I know there are precompiler directives in there that tweak things between building for a Nano and building for the microcontroller we use for the Sangaboard, but I can’t remember what the differences are.

Yep, should be possible to use the hardware UART instead of USB since we are on 3.3 volt now. I believe this was part of the reasoning to move to a PiHat design.

I was asking for simpler solution. Nanos and Raspberry Pis are ubiquitous. Just connect the Arduino nano form the backside of the RPi by removing the USB cover. I think is just 4 or 5 cables.
[https://cdn-learn.adafruit.com/assets/assets/000/020/775/original/raspberry_pi_usb-grapple.jpg?1414715772

https://cdn-learn.adafruit.com/assets/assets/000/020/775/original/raspberry_pi_usb-grapple.jpg?1414715772

That scares me much more than a level shifter to be honest! I guess it ought to work, but ripping apart a PCB with a computer on it feels a bit risky…

One of these would work: Bi-Directional Logic Level Converter

It would be much less scary than ripping the Pi apart. I need to try it.