Perimeter wire: Unterschied zwischen den Versionen

Aus www.wiki.ardumower.de
Wechseln zu: Navigation, Suche
(Abstract)
(Sender)
Zeile 13: Zeile 13:
  
 
===Sender===
 
===Sender===
...
+
You can use the sender of a commercial lawn robot (the sender shown here is compatible with Tianchen or Rotenbach robot mowers), or you build one yourself.
 +
 
 +
So, here's the sender:
 +
 
 +
An Arduino (e.g. Nano) generates a square signal that is used to switch the direction of a motor driver (L298N) at 7.8 Khz. Thereby, the motor driver will switch the output between VCC and GND. A resonator circuit amplifies the signal spikes as it's dimensioned so that its resonation frequency is the same as the switching frequency (7.8 Khz). That way, the motor drive only needs to be operated at 5V (instead of 12V). The power supply should be able to supply 2W (400mA at 5V). One part of the signal is captured by the Arduino (ADC) through a diode and a voltage divider. This allows to detect if the perimeter loop is connected or not. A 150 mA current will flow through in the perimeter wire (wire cross section 2-3 mm^2) - the wire should not be longer than 500m.
 +
 
 +
<gallery>
 +
File: Arduino_perimeter_sender.png ‎
 +
</gallery>
 +
 
 +
Because it's sometimes difficult to find a specific coil, here are possible combinations (coil / capacitor) you can use (all will have a resonation frequency of 7.8 Khz):
 +
*Combination 1: Coil: 160µH, Capacitor: 3,3µF/50V  (tested)
 +
*Combination 2: Coil 33mH, Capacitor: 12nF (not tested)
 +
 
 +
====Power supply====
 +
It is recommended to use a voltage step-down converter (e.g. module using LM2596) to generate the 5V voltage. Before connecting, set the voltage of the converter to 5V. Warning : never connect more than 5V on the Arduino 5V pins, or you will damage the Arduino. Therefore, always measure the 5V voltage before connecting it to the Arduino 5V pin!
 +
 
 +
====Functional test====
 +
1. After uploading the code and connecting the perimeter wire, the Arduino LED should be ON. Now remove the perimeter wire -  the Arduino LED should go OFF.
 +
2. If that doesn't work: Using a voltmeter, measure once at Arduino pin D9 and once at motor driver output pin (OUT_1) against ground - both should have a DC voltage of 2.5 Volt.
 +
3. If you have an oscilloscope, replace the perimeter wire by the oscilloscope. The measured signal look like below:
 +
 
 +
The output signal shows a higher amplitude (high spikes) as the input signal:
 +
 
 +
<gallery>
 +
File: Perimetersignal.jpg|signal on the sender output
 +
File: Ardumower_perimeter_sender_schematics.png|resonator circuit basic principle
 +
File: Arduino_perimeter_sender_photo.jpg
 +
</gallery>
 +
 
 +
For a simple receiver test, you can simply connect the receiver coil to an oscilloscope. The measured oscilloscope signal should look like below:
 +
 
 +
This signal can be detected easily with a coil:
 +
 
 +
<gallery>
 +
File: Coilsignal.jpg|coil signal at receiver coil
 +
File: Fft.jpg|signal in frequency spectrum, superposed by motor noise
 +
File: Ardumower_perimeter_spectrum_plot.jpg| frequency spectrum via pfodApp
 +
</gallery>
  
 
===Receiver===
 
===Receiver===

Version vom 12. September 2014, 12:16 Uhr

Abstract

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 (a lawn sensor might be an alternative).

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 (or two) receiver coils. The closer the distance between coil and perimeter loop, the higher the signal. 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. So, there are two basic principles to detect the perimeter loop. We have implemented both methods (perimeter v1 and v2) which are described below.

Perimeter v1

Sender

You can use the sender of a commercial lawn robot (the sender shown here is compatible with Tianchen or Rotenbach robot mowers), or you build one yourself.

So, here's the sender:

An Arduino (e.g. Nano) generates a square signal that is used to switch the direction of a motor driver (L298N) at 7.8 Khz. Thereby, the motor driver will switch the output between VCC and GND. A resonator circuit amplifies the signal spikes as it's dimensioned so that its resonation frequency is the same as the switching frequency (7.8 Khz). That way, the motor drive only needs to be operated at 5V (instead of 12V). The power supply should be able to supply 2W (400mA at 5V). One part of the signal is captured by the Arduino (ADC) through a diode and a voltage divider. This allows to detect if the perimeter loop is connected or not. A 150 mA current will flow through in the perimeter wire (wire cross section 2-3 mm^2) - the wire should not be longer than 500m.

Because it's sometimes difficult to find a specific coil, here are possible combinations (coil / capacitor) you can use (all will have a resonation frequency of 7.8 Khz):

  • Combination 1: Coil: 160µH, Capacitor: 3,3µF/50V (tested)
  • Combination 2: Coil 33mH, Capacitor: 12nF (not tested)

Power supply

It is recommended to use a voltage step-down converter (e.g. module using LM2596) to generate the 5V voltage. Before connecting, set the voltage of the converter to 5V. Warning : never connect more than 5V on the Arduino 5V pins, or you will damage the Arduino. Therefore, always measure the 5V voltage before connecting it to the Arduino 5V pin!

Functional test

1. After uploading the code and connecting the perimeter wire, the Arduino LED should be ON. Now remove the perimeter wire - the Arduino LED should go OFF. 2. If that doesn't work: Using a voltmeter, measure once at Arduino pin D9 and once at motor driver output pin (OUT_1) against ground - both should have a DC voltage of 2.5 Volt. 3. If you have an oscilloscope, replace the perimeter wire by the oscilloscope. The measured signal look like below:

The output signal shows a higher amplitude (high spikes) as the input signal:

For a simple receiver test, you can simply connect the receiver coil to an oscilloscope. The measured oscilloscope signal should look like below:

This signal can be detected easily with a coil:

Receiver

...


Perimeter v2

Sender

...

Receiver

...