Ardumower PCB: Unterschied zwischen den Versionen
Markus (Diskussion | Beiträge) (→Needed modules) |
Markus (Diskussion | Beiträge) (→Needed modules) |
||
Zeile 17: | Zeile 17: | ||
All modules can be purchased as complete kits via the [https://www.marotronics.de/index.php?k=7 shop] [[File: shopping.png|link=https://www.marotronics.de/index.php?k=7]] . | All modules can be purchased as complete kits via the [https://www.marotronics.de/index.php?k=7 shop] [[File: shopping.png|link=https://www.marotronics.de/index.php?k=7]] . | ||
− | |||
+ | What is needed for the development of Ardumowers. | ||
− | + | *[https://www.marotronics.de/Ardumower-Board-12-Prototyp-mit-Chassis-und-Motoren The Ardumower chassis including motors and motherboard] | |
− | * | + | *Important modules to choose:: |
− | + | ||
− | + | ||
**Zubehör Set (Widerstände, Stiftleisten etc.) | **Zubehör Set (Widerstände, Stiftleisten etc.) | ||
**2 x Protector Board | **2 x Protector Board | ||
Zeile 36: | Zeile 34: | ||
− | * | + | *Optional modules:: |
**Zubehör Set Ladeschaltung (Blei Akkus) | **Zubehör Set Ladeschaltung (Blei Akkus) | ||
**WIFI Wlan Modul ESP8266 ESP01 | **WIFI Wlan Modul ESP8266 ESP01 | ||
Zeile 53: | Zeile 51: | ||
*1 x [https://www.marotronics.de/Perimeter-Sender-Board-Prototyp-mit-Platinen-Zubehoer Perimeter Sender Board (Prototyp) mit Platinen Zubehör] | *1 x [https://www.marotronics.de/Perimeter-Sender-Board-Prototyp-mit-Platinen-Zubehoer Perimeter Sender Board (Prototyp) mit Platinen Zubehör] | ||
− | * | + | *Important modules to choose:: |
**1x Dual MC33926 Motor Driver Carrier | **1x Dual MC33926 Motor Driver Carrier | ||
**1x INA169 Analog DC Current Sensor Breakout - 60V 2,5A / 5A Marotronics | **1x INA169 Analog DC Current Sensor Breakout - 60V 2,5A / 5A Marotronics | ||
Zeile 59: | Zeile 57: | ||
**1 x Nano V3.0 ATmega328-AU Arduino kompatibel Mikrocontroller Board | **1 x Nano V3.0 ATmega328-AU Arduino kompatibel Mikrocontroller Board | ||
− | * | + | *Optional modules:: |
**Gehäuse inklusive 5 passender Schrauben für das PCB | **Gehäuse inklusive 5 passender Schrauben für das PCB | ||
**Anschlussklemmen max.3 (2xSchleife, 1xLadeanschluss) | **Anschlussklemmen max.3 (2xSchleife, 1xLadeanschluss) | ||
Zeile 65: | Zeile 63: | ||
− | * | + | *Additional accessories depending on needs: |
**[https://www.marotronics.de/25-Rasennaegel-Heringe-fuer-Rasenroboter-zB-Robomow-STAFFELPREISE Rasennägel/Heringe] | **[https://www.marotronics.de/25-Rasennaegel-Heringe-fuer-Rasenroboter-zB-Robomow-STAFFELPREISE Rasennägel/Heringe] | ||
Zeile 71: | Zeile 69: | ||
− | * | + | * A charging station is in development and will follow soon. |
=PCB= | =PCB= |
Version vom 2. November 2015, 11:04 Uhr
Inhaltsverzeichnis
Abstract
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 modules
All modules can be purchased as complete kits via the shop .
What is needed for the development of Ardumowers.
- Important modules to choose::
- Zubehör Set (Widerstände, Stiftleisten etc.)
- 2 x Protector Board
- 1 x Mega Board 2560 R3
- 1 x INA169 Strom Sensor Board
- 2 x Dual Treiber MC33926
- 3 x DC-DC LM2596 Step-Down Regler
- 1 x Wireless Bluetooth Modul HC-05
- 1 x Real Time Clock I2C DS1307
- 1 x 24 VoltLadegerät für den Ardumower Akku
- Optional modules::
- Zubehör Set Ladeschaltung (Blei Akkus)
- WIFI Wlan Modul ESP8266 ESP01
- Ultraschallsensoren HC-SR04 (bis zu 3 Stück werden unterstützt)
- Regensensor
- GPS Modul GY-GPS6MV2
- GYRO-80
- 1 x Perimeter Sender Board (Prototyp) mit Platinen Zubehör
- Important modules to choose::
- 1x Dual MC33926 Motor Driver Carrier
- 1x INA169 Analog DC Current Sensor Breakout - 60V 2,5A / 5A Marotronics
- 1 x DC-DC Spannungsregler LM2596 Step-Down Regler einstellbar
- 1 x Nano V3.0 ATmega328-AU Arduino kompatibel Mikrocontroller Board
- Optional modules::
- Gehäuse inklusive 5 passender Schrauben für das PCB
- Anschlussklemmen max.3 (2xSchleife, 1xLadeanschluss)
- Einbaubuchse für Gehäuse 2,5
- Additional accessories depending on needs:
- A charging station is in development and will follow soon.
PCB
The printed circuit board (PCB) connects all electronic modules. The PCB is made with the following design parameters:
- PCB dimensions 241x114mm
- All modules (motor driver, Bluetooth, etc.) can be soldered (or plugged) on the PCB (modules are available in the Ardumower shop)
- Uses the Arduino Mega 2560
- Optional: can use Arduino Due via additional adapter PCB
- Optional: integrated charging circuit (current limiting)
- All connections are available on connectors as well as +5V and GND
- Max. trace current (for motors): 8A
PCB versions
Robot PCB v0.5 (initial prototype)
Robot PCB v1.2 (minor layout changes)
- Schematics
- Photos
- Build instructions
- Build instructions (English translation)
- WorkaRound20150527
- WorkaRound20150530
- Motor-decrease noise REV20150531, (English comments)
- Protector board
Robot PCB v1.3 (in development)
- simplified design (Due adapter will be externally)
- motor driver protection
- battery-off circuit, safety-button
- sets 'reference-design' and required modules: 3x DC/DC, RTC, IMU
NOTE: The schematics and PCB files were created with KiCad. They can be downloaded from github and can be edited by open source KiCAD software (Download here or here).
PCB jumpers
Feature used | YES | NO | Comment |
---|---|---|---|
Integrated charging control via adjustable
voltage regulator (LM350T) with potentiometer for adjustable charging voltage (recommended: NO) |
D7: DIODE
D3: DIODE C1, C4, U4, RV1: used |
D7: SHORT-CIRCUIT
D3: SHORT-CIRCUIT C1, C4, U4, RV1: not used |
Do not use if using external battery charger |
External power while charging (recommended: NO) | JP6: CLOSE
JP7: OPEN D4: DIODE C5: not used |
JP6: OPEN
JP7: CLOSE D4: SHORT-CIRCUIT C5: used |
Use to power your PCB from externally (disconnect battery from PCB) while charging |
Arduino controlled charge relay (recommended: YES) | JP4: CLOSE
JP5: OPEN |
JP4: OPEN
JP5: CLOSE |
Use for Arduino controlled charge relay (not automatic charging) |
Arduino Due (3.3V I/O) | LP0, ..., LP15: OPEN | LP0, ..., LP15: CLOSE | Do not use if using Arduino Mega |
Bluetooth VCC=3.3V | JP8: OPEN
JP9: CLOSE |
JP8: CLOSE
JP9: OPEN |
Many latest modules use 3.3V |
Bluetooth programming mode | JP2: CLOSE | JP2: OPEN | Use for reprogramming baud rate etc. |
PCB modules
Module | Feature | Pinout | Optional | Comment |
---|---|---|---|---|
U1 | DC/DC converter (10V) | GND, Vout, Vin, GND | No | |
U2 | Bluetooth (HC-05) | VCC, GND, TXD, RXD, Key, LED | Yes | |
U3 | Current sensor (charging) | VCC, GND, OUT, IP+, IP-5 | Yes | |
U4 | Charge control (LM350T) | AJD, OUT, IN | Yes | |
U5 | Current sensor (charging) | VCC, GND, OUT, IP+, IP-5 | Yes | |
U6 | DC/DC converter (3.3V) | GND, Vout, Vin, GND | No | |
U7 | DC/DC converter (5V) | GND, Vout, Vin, GND | No | |
U8 | Realtime clock (DS1307) | Batt, GND, VCC, SDA, SCL, DS, SQ | Yes | |
U9 | Wifi (ESP8266) | TX, CH_PD, Reset, VCC, GND, GP_IO2, GP_IO0, RX | Yes | |
U10 | Level shifter 5V->3V (Arduino Due) | Yes | ||
U11 | Wifi (ESP8266) | TX, CH_PD, Reset, VCC, GND, GP_IO2, GP_IO0, RX | Yes | alternative mount position |
PCB connectors
Connector | Feature | Pinout | Optional | Comment |
---|---|---|---|---|
P1 | Sonar center (HC SR-04) | 5V, GND, Trigger, Echo | Yes | |
P2 | Sonar right (HC SR-04) | 5V, GND, Trigger, Echo | Yes | |
P3 | Sonar left (HC SR-04) | 5V, GND, Trigger, Echo | Yes | |
P4 | reserved | Yes | ||
P5 | IMU (gyro,acceleration,compass) (GY-80) | Yes | ||
P6 | Lawn sensor | Yes | ||
P7 | Status LEDs | Yes | ||
P8 | Odometry right | Yes | ||
P9 | Odometry left | Yes | ||
P10 | GPS (GY-NEO6MV2) | Yes | ||
P11 | Bumper | GND, GND, right, left | Yes | |
P12 | Perimeter coil (center or left) | 5V, GND, perimeter | Yes | |
P13 | R/C remote control | 5V, GND, mow, steer, speed, switch | Yes | |
P14 | Measurement points | 5V, GND, (Depending on JP15: 3.3V, 5V or Arduino 3.3V) | Yes | |
P15 | Wheel motor left | M1OUT1, M1OUT2 | No | |
P16 | Optional motor driver input | Yes | Do not connect | |
P17 | Optional motor driver input | Yes | Do not connect | |
P18 | Wheel motor right | M2OUT1, M2OUT2 | No | |
P19 | Tilt sensor | 5V, GND, tilt | Yes | |
P20 | Button (Start/Stop) | No | ||
P21 | Drop sensor right | Yes | ||
P22 | Reserved | Yes | ||
P23 | Reserved | Yes | ||
P24 | Reserved | Yes | ||
P25 | Reserved | Yes | ||
P26 | Reserved | Yes | ||
P27 | Reserved | Yes | ||
P28 | Reserved | Yes | ||
P29 | Reserved | Yes | ||
P30 | Perimeter coil right | Yes | ||
P31 | Drop sensor left | Yes | ||
P32 | GND | Yes | ||
P33 | 5V | Yes | ||
P34 | 3.3V | Yes | ||
P35 | Mower motor RPM | Yes | ||
P36 | Reserved | Yes | ||
P37 | Mower motor | No | ||
P38 | Reserved | Yes | ||
P39 | Reserved | Yes | ||
P40 | User switches | Yes | ||
P41 | Rain sensor | Yes | ||
P42 | Charging pins | Yes | ||
P43 | Battery (24V) | No | ||
P44 | Wifi module (ESP8266) | Yes | ||
P45 | Reserved | Yes | ||
P46 | Reserved | Yes |
Power supply
Please also read the section 'Voltages' under Motor driver for more information on motor voltages.
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.
Download and flash Arduino code
NOTE: If you have never worked with Arduino before, read our 'Arduino first steps' introduction.
You have two options:
- Download github code (recommended) OR
- Download v0.9.3 code (old, not recommended)
Finally, download and start 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 (Mega 2560 or Due).
Note: Always verify that the pin configuration in your Arduino code (config.h/mower.cpp) matches your actual circuit!
First-time calibration
Wheel motors
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.
ADC calibration
Run the ADC calibration once (either via serial console with command 'd' or "pfodApp->ADC Calibration"), so that the received signal is symmetric around zero.
Diagnostics/troubleshooting
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:
- Time of state machine's state (ms)
- loop()-counts per second
- choosen Verbose-Mode (0=counter readings/1=current values/2=current values)
- current state machine state (FORW, REV, ROLL etc.)
- drive home? (1/0)
- "spd" - Control/speed motors: left (PWM), right (PWM), mower (RPM)
- "sen" - Current limit exceeded counter motors: left, right, mower
- "bum" - bumper counter: left, right
- "son" - Ultrasonic-distance threshold exceeded (counter)
- "pit/roll" - Tilt (computed by acceleration sensor)
- "com" - compass course
- "per" - Perimeter loop detected: counter
- "bat" - Battery voltage
- "chg" - Charging current
Using the key 'v', you can toggle between sensor trigger counters and current sensor values.
Additionally, you can use pfodApp (Android) to plot the sensors (trigger counters and current values) over time. This allows you to wirelessly monitor your robot mower for error diagnostics. It is highly recommended.
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
Error counter / error beeps
If there's a communication problem or another serious problem, the error counter increases. The error counter can be monitored via pfodApp. Additionally, the robot mower will beep when started.
See section Troubleshooting for details on all errors.
I2C bus / error beeps
Several components (Arduino Nano, RTC, IMU, etc.) are communicating via the I2C bus (SDA/SCL wires). These wires should be very short (maybe even twisted) and they should be far away from DC converter and motor drivers. If there's a communication problem, the error counter will increase and robot will beep when started. The error counter can be monitored via pfodApp.
Settings
The robot uses settings that you can adjust for your own robot and environment (via pfodApp or directly in the code). The default settings (factory settings) are stored in the config file 'mower.cpp'.
The settings can be adjusted via Android phone (pfodApp).
Important: If you uploaded a new version into your robot, reset all settings via pfodApp once (Settings->Factory reset). This will delete all existing settings. Old settings can produce malfunction if the internal settings format has changed.