Newish person here. Have done a few smaller projects, looking at something a bit bigger and need direction on where to start.
I'm building a guitar effects pedal board that I want to be able to remotely toggle with a board by me. The master would be the board by me. I would press one switch, and that would toggle a bunch of things on the pedal board.
I intend on having all of the logic of what gets flipped when I press a certain button to be on the board by me. I press a button, the master sends commands to the slave "toggle relays 1, 4, 5, and 6" or whatever gets decided.
Most of the time, I would be doing this over about 10 feet, but there would be situations where 50-100' would be more appropriate.
The question - what communications protocol should I use, and what type of cable should I use? It would be ideal if I could use an ethernet cable or a microphone cable (2 conductor plus a ground and a shield) as those are laying around everywhere. What terminals on the Mega do I use? I know the Mega has serial 1, 2, and 3, not sure what else.
I say 2-3 arduinos in the title because there's a chance that I could end up with a second slave board in the future, but one thing at a time for now...
Thanks!
-
this might help ... youtu.be/caMit7nzJsM?si=SyBdavyQN3niKYqHjsotola– jsotola10/23/2024 18:05:33Commented Oct 23, 2024 at 18:05
1 Answer 1
There are probably quite a few options. For the hardware layer, my first choice would be to try RS-485. This is typically carried by a twisted pair of copper wires, like one of the four pairs of an Ethernet cable. You may also try a microphone cable (is that twisted pair?). This tends to be reasonably robust against environmental noise, and is supposed to work at distances up to 1,200 m.
For using RS-485 with an Arduino Mega, you will have to find a suitable transceiver shield. You need one serial port for sending and receiving the data, and a digital output for switching the transceiver between transmit mode and receive mode.
At the software level, if you have just one master device and one slave device, the only difficulty is that you have to know when to switch between transmit mode and receive mode. If you have more than one slave device on the same link, then you will have to designs some kind of addressing scheme that lets each slave device know when the master is talking to it.
-
2You can connect two devices using RS-485 using modest inexpensive hardware as I describe here.10/24/2024 06:47:07Commented Oct 24, 2024 at 6:47