Control and evaluate serial-exposed Cerea features comfortably with an Arduino based touchscreen remote control. To see it in action have a look here (German)!
Currently supported features
-
Setting MARC, A, B, right, left, AUTO via touchscreen (command: @CEREA)
-
Reading @SDOSE command to control a relay (RELAY_PIN_1/2; default: pins 49/53) depending on first boom box section and GPS speed. Can be enabled/disabled via touchscreen (enabled when "Aktiv" and "Streu" buttons are active).
-
Control relays also manually via touchscreen ("Streu" button).
-
Reading @STATUSAM if available to sync UI
-
Showing current boombox states (rectangles at top of display: grey = unused, red = not active, green = active)
-
BETA: Control different boomboxes (1-10) via the @BOOMBOX command (Page 2: 1 - 10; note that page changing could lead to missed status data from Cerea, so the GUI might be not in sync with Cerea for some moments)
-
Vibrate on touch; output on adjustable pin (VIBRATION_MOTOR_PIN; default: built-in LED pin of board, which is pin 13 on the MEGA) and with adjustable vibration time (VIBRATION_TIME_MS; default: 200 ms)
Necessary Hardware
- Arduino MEGA 2560
- 3.5" TFT/touchscreen shield (480x320; 16 bit colors) supported by the Adafruit TFTLCD and Touchscreen library (tested: Kuman version with ILI9486; more can be added)
- If USB serial connection is used: capacitor (>22 µF)
- Optional: vibration motor (e.g. seeed Groove VM)
- Optional: relay(s) (e.g. seeed Groove 2CH Relay)
Important if a USB serial connection is used: Per default the Arduino resets completely as soon as a serial connection is opened. For some reason in case of the Cerea output the board thinks it is flashed and thus freezes. To avoid this the auto reset must be disabled via a capacitor (>22 µF) between the reset and ground pin.
Riku from the German Cerea forum built an excellent housing for the Arduino and was nice enough to provide all necessary resources (German). Have look at the basics here and the extension here. PLEASE NOTE: This housing is only compatible with releases before 0.2.2, as it does not account for the button shift introduced by the boombox state indicators. Please use Release 0.2.1 if you intend to use the housing.
Dependencies
To use this sketch the following libraries must be downloaded and imported to the Arduino IDE. Either download them directly with the provided links and import them ("Sketch"->"Add .ZIP Library") or search them in the Arduino IDE Library Manager ("Tools"->"Library Manager"). It is recommended to keep the libraries up to date!
- Adafruit GFX Library <-- important: use version 1.5.3
- Adafruit TFT-LCD Library
- Adafruit Touchscreen Library
- MCUFRIEND_kbv Library
Cerea is an agricultural GPS auto-steer system for Windows, developed by a Spain-based company called SOLUCIONES TECNOLOGICAS CEREA.
It uses serial communication to exchange command sequences, which allow to remote control the system from any device with a serial interface. The following commands were reverse engineered, so no guarantee!
General information:
- "1" represents on/true
- "0" represents off/false
- every command is followed by a CR-LF (
\r\n
)
Commands seem to arrive in 0.5 second cycles (confirmation needed).
Cerea command | Controls | Description | Example |
---|---|---|---|
@STATUSAM;A;M;END | A: AUTO [1/0] M: MARC [1/0] |
Current state of MARC and AUTO. | "@STATUSAM;1;1;END\r\n" (AUTO and MARC active) |
@CEREA;VGPS;-1; S0;S1;...;S9;END |
VGPS: GPS speed in km/h [float] -1: reserved S0‑9: boom sections [1/0] |
Current GPS speed and boom box section states (left to right). Number of transmitted sections matches Cerea settings (max. 10). |
"@CEREA;5.0;-1;1;END\r\n" (GPS speed 5.0 km/h; section 1 active) |
@HIDRAU;F;END | F: Flag [1/0] | If section was already taken care of info is sent. | "@HIDRAU;1;END\r\n" (Section already taken care of) |
Cerea command | Controls | Description | Example |
---|---|---|---|
@SDOSE;M;C;U;U; AP;BP;A;L;R;TL;TR;END |
M: MARC [1/0] C: CONTOUR [1/0] U: UNKNOWN [1/0] AP: A point [1/0] BP: B point [1/0] A: AUTO [1/0] L: LEFT [1/0] R: RIGHT [1/0] TL: TURN LEFT [1/0] TR: TURN RIGHT [1/0] |
Controls Cerea. | "@SDOSE;1;0;0;0; \ 0;0;1;0;0;0;0;END\r\n" (activate MARC and AUTO) |
@MARC | - | Activates MARC. | "@MARC\r\n" (activate MARC) |
@AUTO | - | Activates AUTO. | "@AUTO\r\n" (activate MARC) |
@BOOMBOX; S0;S1;...;S9;END |
S0‑9: boom sections [1/0] | Set boom box section states (left to right). The state of all 10 sections must be transmitted. |
"@BOOMBOX; \ 0;0;0;0;0;0;0;0;0;0;\r\n" (deactivate all sections) |
@PRESION;P;END | P: pressure [float] | Set pressure in ? (confirmation needed). |
"@PRESION;1.0;END\r\n" (set pressure to 1.0) |
@CAUDAL;F;END | F: flow [float] | Set flow in L/min (confirmation needed). |
"@CAUDAL;1.0;END\r\n" (set flow to 1.0) |
@APLICADO;A;END | A: applied flow [float] | Set applied flow in L/ha (confirmation needed). |
"@APLICADO;1.0;END\r\n" (set applied flow to 1.0) |
If this project / information helps you, you can support me by attributing to a "Maß" beer for me here :)