Perimeter sender (English)

Wechseln zu: Navigation, Suche


This is the new version of the perimeter sender and receiver (that can be purchased via the shop Shopping.png).

A perimeter wire (or buried wire fence, BWF) is like a 'virtual fence': it stopps the robot when it reaches its boundaries. A perimeter is not always necessary for all surroundings.

Principle idea: You will install a perimeter loop (a wire) in your garden through which a signal is sent and this signal is detected by the robot. So, you'll need: a sender (to transmit the on the wire) and a receiver (to detect the signal in the robot).

How is the signal detected? The signal is detected by one receiver coils. The closer the distance between coil and perimeter loop, the higher the signal strength. Also, something interesting happens when the robot crosses the perimeter loop: the signal changes its polarity, that means positive and negative voltages reverse each other.

Charging station

By the help of the perimeter wire loop, the robot finds its charging station where it can be charged again. So, it drives along the perimeter wire (in clock-wise direction) until it detects a charging voltage at its charging pins. There the robot stops and recharges its battery. Due to the standby/charging current, the perimeter sender can detect if the robot is in the charging station and can then switch off the perimeter sender.

Here you can see the charging via charging station:

Ardumower charging overview.jpg

Required parts for a perimeter loop

A perimeter loop is optional but recommended.


The perimeter sender outputs a digital code sequence (a 'pseudo-noise' code), and the receiver will detect that code using a software-based digital matched filter. Depending on wheter the match result peak is positive or negative, the robot is inside or outside of the perimeter wire.

Sender principle:

  1. Sender PCB generates an output signal using an Arduino Nano (about 3 Khz)
  2. The generated signal is amplified using a motor driver (MC33926), the motor driver output is connected to the perimeter wire (instead of a motor)

Receiver principle:

  1. A coil receives the signal
  2. The signal is amplified using an operational amplifier (LM386)
  3. The Arduino Mega samples the signal using its analog-to-digital converter (ADC) at 9615 Hz
  4. The digital signal is filtered using a digital filter (matched filter algorithmn)
  5. The matched filter output is evaluated (for perimeter inside/ouside detection, tracking etc.)

The images below explain why the polarity of the received coil signal changes between inside and outside of the perimeter wire. The image shows the direction of the electric flux lines sent out from the perimeter wire and how they hit the coil for both inside and outside position.

For a better understanding of the perimeter filter, see the Matched filter simulation. For more details about the filter, also see the Matched filter video. Using a simple symmetric signal (which looks equal on positive and negative side of the zero point), you cannot differentiate between an 'inside perimeter' and 'outside perimeter' signal. When the mower is traversing the perimeter loop, the signal polarity changes (positive becomes negative and negative becomes positive). We want to detect this polarity change of the signal. Using an unsymmetrical signal, you can do this. You can see the difference in the simulator. The default signal (slider 'example signal') is a symmetric signal - press the 'Invert' button to invert the signal (change its polarity). In the correlation result (graph 'Matched filter') the polarity can not be detected. Now use an asymmetrical signal ('pseudonoise5_pw'). Press again 'Invert' to change signal polarity. Now you can see polarity of the signal in the filter output (graph 'Matched filter'). It's the sign of the peak (positive or negative sign).


Note for Marotronics INA169: Short pads for 5A operation

Ardumower perimeter overview.jpg

We use a motor driver as output amplifier and an Arduino Nano to generate the signal. The motor driver is driven by 3.2 Khz (two pulse widths 4808 Hz and 2404 Hz). We use a motor driver with integrated current limiting and thermal switch-off (e.g. MC33926).

Warning.png The perimeter wire length should be in the range 20m - 450m and must be at least 5 Ohm and not more than 12 Ohm. The maximum perimeter area is 1000 m2.

MC33926 wiring: The perimeter wire is connected between MC33926 M1OUT1 and M1OUT2.

Download and flash Arduino code

NOTE: If you have never worked with Arduino before, read our 'Arduino first steps' introduction (it also contains useful information if your Arduino will not flash).

  1. Download an Ardumower Release at Github - You will find the sender code in the folder 'sender' of the downloaded release
  2. Download the Arduino IDE to flash the code to your Arduino

Arduino Version: It is very Importent that you use the Arduino IDE version 1.6.3 or above AND select the right Board (Nano).

Sender power control

Warning.png The perimeter wire resistance (R) must be at least 5 Ohm and not more than 12 Ohm. Ideally, a 12 ohms (50W) power resistor is placed in series with the perimeter wire, so you get a total resistance of the perimeter wire at 12-15 ohms.

To change the power (current/voltage) of the sender, proceed like this:

The motor driver output voltage can be changed between 6.5-12V via the potentiometer on the DC/DC converter. Adjust the potentiometer so that not more than 1 Ampere current flows.


Your perimeter wire resistance (R): 12 Ohm
Your adjusted voltage at the DC/DC converter: 8 Volt

The consumed current and power is then:

Current: I = U / R = 8 Volt / 12 Ohm => 0.7 Ampere
Power:  P = U * I = 8 Volt * 0.7 Ampere => 5.6 Watt

Power resistor: If your perimeter wire resistance (R) is below 5 Ohms, you will not be able to further reduce voltage below 6.5v (otherwise the motor driver will not work properly). Then you have to increase the perimeter wire resistance (R) by using a power resistor in series with your perimeter wire. Important: your power resistor must be suitable for the power! In the example above usng a 12 Ohm power resistor, it should be a 10 Watt type.

Sender automatic standby

The sender can be switched off during the time the robot is in the charging station. To detect the robot, a current sensor (INA169, 5A) is connected between the charger and the charging pins.

Sender diagnostics

The perimeter sender status is indicated by the sender LED (Arduino Nano LED):

  • ON: perimeter wire loop is closed and working
  • OFF: perimeter wire loop is opened and not working
  • blinking: robot is charging and perimeter will be switched OFF (energy saving)

To find errors (or to better understand the sender), open the serial console via Arduino IDE (CTRL+SHIFT+M) at 19200 baud. Now you can see the possible states (robot in charging station, robot outside charging station etc.):


Perimeter v2 receiver circuit.png

For receiving the signal, we use a coil (100 mH or 150 mH) in upright position (centered at front in robot) connected to an LM386 operational amplifier (to amplify the received signal). When using the LM386 module, capacitor C3 on the LM386 module should be bypassed (which is needed so that the LM386 generates a signal between 0..5V and not the default range -5V..+5V). The LM386 output pin should be connected to an analog Arduino pin ('pinPerimeterLeft').

You can get the receiver kit in the shop

NOTE: It's recommended to directly mount the coil on the amplifier module. This ensures the 'small signal' of the coil is not distorted by other components (motors, DC/DC converters etc.).

Note: Leave out capacitor 4.7nF in latest software versions ('using differential signal').

Coil/amplifier-to-motor distances

Ensure all minimum distances to the following components:

* Coil to gear motor: > 15cm
* Coil to mower motor: > 10cm 
* Coil to DC/DC converter: > 10cm

Signal measurements

The sender / coil / LM386 amplifier outputs should look like this: (for more details about the signal, see section signal above)

Broken perimeter wire

Once in a while your perimeter wire may get broken, and your perimeter loop resistance will probably increase to a few Megaohms (MOhm). If that is the case, you can find the location of the break like this:

  1. Using a metal plate, plug one wire of the perimeter sender output into earth ground (the other wire of the sender output is still connected to the perimeter wire)
  2. Optional: increase your sender output voltage to 20 Volts (NOTE: the MC33926 driver can NOT operate higher than 28v, and your sender Arduino Nano may not operate higher than 20v)
  3. Method 1 (using two LM386 amplifiers and earphone): Connect 1st LM386 amplifier (NOTE: do NOT remove capacitor C3!) signal output to a 2nd LM386 input. Connect 2nd LM386 output to an earphone.
  4. Method 2 (using one LM386 amplifier and a PC): Connect the LM386 amplifier (NOTE: do NOT remove capacitor C3!) signal output (signal and GND) to your PC's microphone input, launch the web oscilloscope, and switch into frequency view (choose visualization 'frequency spectrum')
  5. Turn on the perimeter sender - while traversing the perimeter wire, you will notice a peak frequency of 3.2 Khz in the Web oscilloscope
  6. Now start at the side of the perimeter wire (the side that is still connected to the perimeter wire), and walk along the perimeter wire - the peak frequency of 3.2 Khz should always be there (and hearable)
  7. At the location where the wire is broken, the 3.2 Khz frequency is gone (and no longer hearable)! Demonstration video


  1. Perimeter2 demo
  2. 120m perimeter wire test
  3. Perimeter wire and matched filter theory (German)
  4. Sender PCB
  5. Perimeter stop test
  6. Perimeter tracking test
  7. Finding and tracking test L50
  8. Finding and tracking test Rotenbach
  9. Magnetic field demonstration video

Further links

  1. Another idea for navigation are infrared landmarks
  2. More details about the matched filter
  3. Sound card oscilloscope including matched filter