#I want two RPi Picos to talk to each

1 messages · Page 1 of 1 (latest)

karmic creek
#

I have some RS-485 breakouts from SparkFun that use the SP3485 transceiver, not sure if that would be an avenue, or if I should do direct UART connections between the two Picos? I have not been able to locate any tutorials or code examples for CircuitPython for this.

#

Can it be done with busio.UART or is that just a software way of having two picos communicate?

#

I currently do not have a lot of money to spend on this project, so I am hoping I don't have to buy more feathers or wings or whatever to make this happen...

#

Goal is essentially: Pico 1 has 6 analog buttons. Whenever these buttons are on/off, it will send a signal to the secondary Pico that sits on a Waveshare Pico-Relay-B board, and it will in turn pull the specified relay low/high.

#

Any help appreciated!

#

Except, then I would have very limited GPIO, right?

#

Anyway. Hoping someone can provide some advice here. Thank you for your time.

lethal hollow
#

Can you say more about the data volumes and needed speeds, and the electrical environment (clean or noisy)?

#

UART is easy to test with different speeds and parameters, maybe different wiring.

karmic creek
#

Data volumes will be relatively low, I am mainly trying to control either relays or MOSFETs to switch higher current loads that are part of a vehicle 12V system.

#

The electrical environment will be relatively noisy, I assume, as part of the network will be present in the engine bay.

lethal hollow
lethal hollow
#

Just tested board.UART() (default 9600 baud) over approximately 40-50 feet of Cat5 cable (just b/c it was handy). Not a noisy environment, but this seems to work fine (short packets with CRC sent and checked). These alternatives are close to the ballpark, but again differential signaling (or at the very least, shielded cable) would really help in your environment. CAN is designed for this kind of thing.

karmic creek
#

Thank you, @lethal hollow! I think I'll get some CAN breakouts from Adafruit, then. Can I use regular cable/wire with CAN, or will it require shielded cable?

lethal hollow
#

For your distance of 10m in a noisy environment, I'm not sure. There is specifically-designed CAN bus cabling, but if you have some, I'd try regular Cat5-Cat6 Ethernet unshielded twisted pair first. L and H should be on the same twisted pair, and ground need to run through the cable too.

karmic creek
#

I think I have a length of industrial cat5 somewhere! I'll see if I can find it.

lethal hollow
#

some ethernet cables are shielded, you may get lucky