CNC.js and UARTs

I was wondering if anyone has experimented with connecting the UART on the Raspberry PI directly into the UART on the Carbide Motion Board so CNC.js does not need to connect via the USB cable? My electronics enclosure is already getting rather full and trying to stuff another USB cable will likely block airflow.

Should work…that’s how those Raspberry Pi CNC hats/shields work. I’d assume you’ll need a logic level converter as the Pi is 3.3v and the atMega328 is 5v.
I’ve connected a cheap HC-06 bluetooth module to the SO3. There was a lot of lag, but that was the bluetooth.


@neilferreri I was hoping you would chime in. LOL. I saw your posts about CNC.js and about bluetooth and figured you were the man to ask.

I completely forgot about level shifting. Luckily I have some of these kicking around:

which can isolate the two boards and do level shifting.


I made a bunch of voltage divider PCBs for this kind of stuff.

Don’t know about that. I’m also the guy that unknowingly left that HC-06 connected to my machine for two weeks and was losing my mind on tracking down why it was stuttering. I’m also the guy that couldn’t figure out why my PC was restarting every time I paused the machine in CNCjs, until I remembered that one evening I was playing around with “EVENTS”. I can’t tell you how much work I lost because I kept forgetting to disable that.
shutdown.exe -r -t 00 is a bad choice for a CNCjs Event command.

Anyway, I think you’d just need to select the correct port on the Pi…nothing would need to be done on the C3D board.


You don’t actually need a voltage level shifter, the UARTs on the Raspberry Pi are already 3.3V.

(but the AtMega328 is 5V, and that link specifically warns against connecting 5V systems:

All UARTs on the Raspberry Pi are 3.3V only - damage will occur if they are connected to 5V systems. An adaptor can be used to connect to 5V systems. Alternatively, low-cost USB to 3.3V serial adaptors are available from various third parties.

so one does need an adapter)


Ahh, sorry, I assumed the protection was for the other direction.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.