Ardumower PCB: Unterschied zwischen den Versionen

Aus www.wiki.ardumower.de
Wechseln zu: Navigation, Suche
(Flashing the Arduino)
Zeile 1: Zeile 1:
This page describes how to assemble the Ardumower PCB.
+
This page describes how to assemble the Ardumower PCB, flash the Arduino and configure the robot mower.
 +
 
 +
The controller is built around a ready microcontroller board (Arduino Mega 2560 using 54 I/O pins).  
  
 
==Needed parts==
 
==Needed parts==
Zeile 5: Zeile 7:
 
===v0.9.3===
 
===v0.9.3===
 
If you know nothing about code, choose v0.9.3 and these parts:
 
If you know nothing about code, choose v0.9.3 and these parts:
...
+
 
 +
Main functions
 +
 
 +
    Arduino cable (female-female and male-female jumper cable)
 +
    1 x Arduino Mega 2560
 +
    1 x DC voltage step-down module (LM2596)
 +
    2 x L298N motor driver module
 +
    3 x current sensor module ACS712-5
 +
    1 x current sensor module ACS712-30
 +
    1 x mower motor driver circuit: MOSFET IRLIZ44N, Diode MBR1045, Schottky-Diode 10A, Resistors (10K, 180 Ohm)
 +
    Resistors (2 x 47K, 2 x 5K), Capacitors ( Fuse F20A250V
 +
    Piezo buzzer (0,1W), button, ON/OFF switch 10A
 +
 
 +
Perimeter sender (optional)
 +
 
 +
    1 x Arduino Nano
 +
    Coil 220µH, Elko 2,2µF/160V, Resistors (1 Ohm, 1K, 4,7K), Diode 1N4448
 +
    1 x DC voltage step-down module (LM2596)
 +
    1 x L298N motor driver module
 +
 
 +
Perimeter receiver (optional)
 +
 
 +
    1 x Arduino Nano
 +
    2 x Arduino Sound Sensor Module (must use LM386)
 +
    Capacitors (2 x 4,7nF, 2 x 100nF), Resistors (2 x 200k), 2 x Receiver coils 85mH
 +
 
 +
Additional module
 +
 
 +
    1 x HC-SR04 ultrasonic sensor module (optional)
 +
    1 x GY80 module (gyro, accel. compass) (optional)
 +
    1 x DS1307 realtime clock module (optional)
 +
    1 x Bluetooth module (for phone control)
  
 
===SVN version===
 
===SVN version===
Zeile 11: Zeile 44:
 
...
 
...
  
==PCB assembly==
+
 
 +
==Schematics==
 +
 
 
...
 
...
  
 +
 +
==PCB assembly==
 +
...
  
 
...add a high resolution picture of the assembled PCB here...
 
...add a high resolution picture of the assembled PCB here...
 +
 +
==Power supply==
 +
It is recommended to use a voltage step-down converter (e.g. module using LM2596) to generate the 5V voltage for the Arduino and all additional modules. 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!
 +
All components together (as shown in the schematics) need about 5W power.
 +
  
 
==Flashing the Arduino==
 
==Flashing the Arduino==
Zeile 26: Zeile 69:
  
 
==First-time calibration==
 
==First-time calibration==
...
+
Security note: For security reasons, always remove mower blades in your first tests!
  
==Schematics==
+
Initially, you should verify that the wheel motors are controlled correctly and in the right direction. The software offers a diagnostic mode. Open the serial console in the Arduino IDE (CTRL+SHIFT+M) and set the baudrate to 19200. The motor and sensor values should appear constantly:
...
+
 
 +
    20 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
 +
    21 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
 +
    22 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
 +
    23 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
 +
    24 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
 +
    ...
 +
 
 +
Now, press the key ‘t’ on the keyboard, and confirm using ENTER. The diagnostic mode should appear, and you can test your motors.
 +
 
 +
==Diagnostic==
 +
Each time a sensor triggers, its corresponding sensor counter increases. The sensor trigger counters as well as the current sensor values can be viewed on the serial console. The following values are shown for the trigger counters in the serial console:
 +
 
 +
1) Time of state machine's state (ms)
 +
2) loop()-counts per second
 +
3) choosen Verbose-Mode (0=counter readings/1=current values/2=current values)
 +
4) current state machine state (FORW, REV, ROLL etc.)
 +
5) drive home? (1/0)
 +
6) "spd" - Control/speed motors: left (PWM), right (PWM), mower (RPM)
 +
7) "sen" - Current limit exceeded counter motors: left, right, mower
 +
8) "bum" - bumper counter: left, right
 +
9) "son" - Ultrasonic-distance threshold exceeded (counter)
 +
10) "pit/roll" - Tilt (computed by acceleration sensor)
 +
11) "com" - compass course
 +
12) "per" - Perimeter loop detected: counter
 +
13) "bat" - Battery voltage
 +
14) "chg" - Charging current
 +
 
 +
Using the key 'v', you can toggle between summary of sensor (counters) and current sensor values.
 +
 
 +
Additionally, you can use pfodApp (Android) to plot the sensors (trigger counters and current values) over time:
 +
 
 +
==Starting the mower==
 +
 
 +
To start the mower, you need to add a button and a buzzer:
 +
 
 +
pinButton —o Button o— GND (button for ON/OFF)
 +
 
 +
pinBuzzer —o Buzzer o— GND (Piezo buzzer)
 +
 
 +
Now, press the button as long as you hear the beeps:
 +
 
 +
Mode (press button for x beeps):
 +
1 beeps : Normal mowing (using blade modulation if available)
 +
2 beeps : Normal mowing (without blade modulation)
 +
3 beeps : Drive by model remote control (RC)
 +
4 beeps : Drive without mowing
 +
5 beeps : Find perimeter and track it

Version vom 12. September 2014, 15:17 Uhr

This page describes how to assemble the Ardumower PCB, flash the Arduino and configure the robot mower.

The controller is built around a ready microcontroller board (Arduino Mega 2560 using 54 I/O pins).

Needed parts

v0.9.3

If you know nothing about code, choose v0.9.3 and these parts:

Main functions
   Arduino cable (female-female and male-female jumper cable)
   1 x Arduino Mega 2560
   1 x DC voltage step-down module (LM2596)
   2 x L298N motor driver module
   3 x current sensor module ACS712-5
   1 x current sensor module ACS712-30
   1 x mower motor driver circuit: MOSFET IRLIZ44N, Diode MBR1045, Schottky-Diode 10A, Resistors (10K, 180 Ohm)
   Resistors (2 x 47K, 2 x 5K), Capacitors ( Fuse F20A250V
   Piezo buzzer (0,1W), button, ON/OFF switch 10A
Perimeter sender (optional)
   1 x Arduino Nano
   Coil 220µH, Elko 2,2µF/160V, Resistors (1 Ohm, 1K, 4,7K), Diode 1N4448
   1 x DC voltage step-down module (LM2596)
   1 x L298N motor driver module
Perimeter receiver (optional)
   1 x Arduino Nano
   2 x Arduino Sound Sensor Module (must use LM386)
   Capacitors (2 x 4,7nF, 2 x 100nF), Resistors (2 x 200k), 2 x Receiver coils 85mH
Additional module
   1 x HC-SR04 ultrasonic sensor module (optional)
   1 x GY80 module (gyro, accel. compass) (optional)
   1 x DS1307 realtime clock module (optional)
   1 x Bluetooth module (for phone control)

SVN version

If you want to be ready for the future, choose SVN and these parts: ...


Schematics

...


PCB assembly

...

...add a high resolution picture of the assembled PCB here...

Power supply

It is recommended to use a voltage step-down converter (e.g. module using LM2596) to generate the 5V voltage for the Arduino and all additional modules. 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! All components together (as shown in the schematics) need about 5W power.


Flashing the Arduino

Arduino Version

It is verry Importent that you use the Arduino Version 1.5.6-r2 or above AND select the right Board.

...

First-time calibration

Security note: For security reasons, always remove mower blades in your first tests!

Initially, you should verify that the wheel motors are controlled correctly and in the right direction. The software offers a diagnostic mode. Open the serial console in the Arduino IDE (CTRL+SHIFT+M) and set the baudrate to 19200. The motor and sensor values should appear constantly:

   20 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
   21 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
   22 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
   23 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
   24 OFF  spd    0    0    0 sen    0    0    0 bum    0    0 son...
   ...

Now, press the key ‘t’ on the keyboard, and confirm using ENTER. The diagnostic mode should appear, and you can test your motors.

Diagnostic

Each time a sensor triggers, its corresponding sensor counter increases. The sensor trigger counters as well as the current sensor values can be viewed on the serial console. The following values are shown for the trigger counters in the serial console:

1) Time of state machine's state (ms)
2) loop()-counts per second
3) choosen Verbose-Mode (0=counter readings/1=current values/2=current values)
4) current state machine state (FORW, REV, ROLL etc.)
5) drive home? (1/0)
6) "spd" - Control/speed motors: left (PWM), right (PWM), mower (RPM)
7) "sen" - Current limit exceeded counter motors: left, right, mower 
8) "bum" - bumper counter: left, right
9) "son" - Ultrasonic-distance threshold exceeded (counter)
10) "pit/roll" - Tilt (computed by acceleration sensor)
11) "com" - compass course
12) "per" - Perimeter loop detected: counter
13) "bat" - Battery voltage
14) "chg" - Charging current 

Using the key 'v', you can toggle between summary of sensor (counters) and current sensor values.

Additionally, you can use pfodApp (Android) to plot the sensors (trigger counters and current values) over time:

Starting the mower

To start the mower, you need to add a button and a buzzer:

pinButton —o Button o— GND (button for ON/OFF)

pinBuzzer —o Buzzer o— GND (Piezo buzzer)

Now, press the button as long as you hear the beeps:

Mode (press button for x beeps):

1 beeps : Normal mowing (using blade modulation if available)
2 beeps : Normal mowing (without blade modulation)
3 beeps : Drive by model remote control (RC)
4 beeps : Drive without mowing
5 beeps : Find perimeter and track it