Electronic – Cheapest way to wirelessly synchronize two MCUs

microcontrollerRFwireless

I have two battery powered MCUs about 30cm apart, one will be the master, and one the slave. Each MCU has several LEDs connected which flash in a sequence.

All I want to do is synchronize the two MCUs so that the sequences don't drift out of phase.

Is there some super easy way to send a simple RF pulse from one MCU to the other?

Added:

  • The sequence lasts for approx 1 second, and repeats forever.
  • If the slave misses some sync pulses, it's not the end of the world, because it would take many cycles to drift noticeably out of phase.
  • For personal / religious / aesthetic reasons which I am not allowed to discuss, I do not wish to use IR, capacitive, acoustic means to transmit this pulse.
  • The range is very short, less than 30cm.
  • The signal will need to travel through open air. No concrete or metal in the way.
  • RF-like inductive coupling would be OK too.
  • Since the signal consists of only a single pulse, I imagine there must be a smaller, cheaper solution than those involving packet transmission (Xbee, etc.)
  • Ideally the solution would consist of some kind of PCB trace antenna, and a simple oscillator for the transmitter, and simple circuit (demodulator?) to detect the pulse at the receiver.

Best Answer

The application SOUNDS so trivially simple that, if it isn't, there is no way to know due to the "death by 1,000 blows" approach to defining the problem. At 30 cm the way to use RF is to use RF. Any RF equipment that I have ever met would work over that range in free air in the absence of metal. You can buy transceivers and transmitter / receiver pairs. With the stated specs, if it transmits and receives RF it will be suitable. If any RF data transfer solution does not work in this context then it is because the spec is inadequate. Simple RF solutions usually have minimal latency once the data stream is synchronised. All that is required is Sync_phase - delay_until - sync_now. QED. Repeat as needed. Processor helps BUT a cheap no processor solution is easy.

More complex RF systems such as Bluetooth will also work but may have variable latency. This can be overcome by some interactive communications that establishes link parameters OR designed around known performance. BUT simple cheap off the shelf one way RF modules will work well enough. "ASK" transmission is probably fine and gives you something to search for.

This $5 receiver {315 MHz version} or 434 MHz version

enter image description here

plus this $4 transmitter or its up frequency cousin

enter image description here

will together give you a $9 solution if you are happy to talk one way.
Double that for 2 way.

Or

Two of these $7 transceivers - 434 MHz will give you a bidirectional $14 solution. ~ 16mm x 16mm x 4.2mm.
That size is known OK as the spec did not specifiy otherwise when all details were provided.
That cost is known OK as the spec did not specifiy otherwise when all details were provided.

enter image description here

Datasheet
Programming guide
eXCELLENT APPLICATION GUIDE
mORE OF THE SAME - MANUFACTURERS HOME PAGE {PROBABLY}
rfm12 LIBRARY


Two of these give you a WiFi link - over over over kill.


  • BUT

In the absence of any real clues as to why the following are not suitable, the following may be suitable:

  • IR may work well and easily and cheaply.
    Unless you are an IR expert, your reasons for excluding it may well be unsound.
    With what you have told us so far, IR would be the candidate solution of choice.
    Low cost, easy, low power. ie
    Better, cheaper, faster - choose any three!
    Tell us what you want and we'll tell you what you need :-)

  • Electromagnetic "RF LIKE" "near field" coupling may or may not suit better than RF. .

  • Optical

  • Acoustic

  • Capacitive

  • ... GSM ... Iridium ... Inmarsat ... [just joking] :-) .

Pleased explain clearly & completely the environment and relevant constraints. eg:
Potted in concrete, welded in a mumetal drum at the bottom of a shallow shark pond ... :-).
Indoors, outdoors, ... .

There are many "obvious" solutions that may or may be suitable BUT as you do not explain your real need nobody can tell*.

Again: Tell us what you want and we'll tell you what you need :-)

IR sounds good to me, so far.