2 Micro's controlling eachother

Hello , completely newbie to the Arduino world here :slight_smile:

i'm in the process of building a guitar-amp and the idea came up use a Micro to control
the relays / analog switches that's controlling the signal paths

my question is: can i have 2 micro's controlling eachother (1 in the amp and 1 in a footcontroller)

so basicly i want them to work in paralell and responding to switches and showing
LED-status for the selected functions

Thanks a lot in advance

Magnus Söderman, Sweden

Yes, your idea is quite feasible.
Depending on the number of switches & lights in the foot controller, it may be simpler and more reliable to use one controller, wires and some simple ‘smarts’ to implement the remote switch contacts & LEDs.

thanks for the answer

what do you refer to as "smart" ?

i was thinking in the ways that the two micros could read and control
eachother over the serialport :). But thats not maybe possible ?

As i said , newbie on Arduino but not in electronics :slight_smile:

// Magnus

Yes, as above that’s certainly possible with two processors, but for a few switches and lights probably not necessary... remember you have to write two separate programs that cooperate, and save one conductor.

Without knowing more about your project, i’d probably look at shift-registers in the foot box, a shielded cable, and run it all across 3-wires (clk, din, dout) plus power/0V...

The Arduino Micro has the Serial communication independent of the usb. Connect rx to tx and tx to rx and connect the grounds of the two.

You can use Serial1 for the communication.

Note that standard TTL signals as used in Arduinos can overcome a limited distance. You can test the above on your desk. For the final product, you might need ttl-to-rs232 adapters.

Depending on the distance, for low speed links like these - you may look at simple current-loop comms - almost no parts required, low cost and may be used in sync or async comms applications.

Many thanks !

now it all makes sense :slight_smile:

time to dig in to world of programming and soldering iron :slight_smile:

// Magnus

Note that standard TTL signals as used in Arduinos can overcome a limited distance. You can test the above on your desk. For the final product, you might need ttl-to-rs232 adapters.

RS-485 (half-duplex) would seem to be more appropriate. :grinning:

What is there in that foot controller, really?

What is the distance between the foot controller and the main controller?

it's a little unclear at the time since i'm figuring out new functions of this overambitious project :slight_smile:

but i think there's gonna be 8 switches and 8 red/green led's and the same amount in the amp

did i say overambitious ? :grin:

That's not many for single switches and LEDs. Just a lot of wiring.

What is the distance between the two? That's very important as it determines what communication protocols are available, and that in turn tells whether you could do it with a single Arduino or not.

Toggle switches or momentary switches? Are the LEDs to follow the switch state or other function?

i know . but a want the amp and the fsw(footswitch) to work in paralell

i'm thinking of max 10 meters. although i have driven rs 232 over 50m of good microphone cable
and i want use standard XLR connectors

all switches would be momentary since i think it would be easier.
otherwise one of the units has priority over the other , and i trying to avoid that :slight_smile:

sorry, i forgot

yes, the led's are gonna show the switch state
for example . There's gonna be 4 channels and i want to jump between those with momentary
switch for each channel

XLR has only three wires, so you're going to need some kind of one-wire protocol to communicate the switch state back to your master.

A separate Arduino at the control board may be the best way here, due to the communication distance. It seems communication is one way: a switch is pressed, the LED is switched on and a message is sent to the master to deal with the switch press.

TTL Serial may work in this case. Just use only one of the two wires: Tx of the slave, just sending the data to its master. You'll definitely need a buffer to get the signal through the wire, and maybe a Schmitt trigger on the other side to clean it up before presenting it to the master's Rx.

the connector is not a problem since XLR is available up to 7 pins

another way is to use cat5 cable and ethercon connectors, since
you can get a cat5 cable almost anywhere :slight_smile:

RS-485 (half-duplex) would seem to be more appropriate. :grinning:

+100 for what he said. RS232, even using modern MAX232 transceivers is baud rate and distance limited compared with RS485. Fewer components, cheaper, easier to interface transceiver chips with 20 to 100 times the performance in speed and distance, that’s the difference between the two standards.

The only valid reason to use RS232 in today’s world is when you must interface to an antique piece of equipment and that’s the only available electrical interface. Building something today where you control both ends of the wire with RS232 is like reinventing a steam driven automobile.