From 7b01e482afa2aea9a9ea357b68994574edad661b Mon Sep 17 00:00:00 2001 From: Candas1 Date: Sun, 25 Oct 2020 13:53:08 +0100 Subject: [PATCH] Created ADC Control (markdown) --- ADC-Control.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ADC-Control.md diff --git a/ADC-Control.md b/ADC-Control.md new file mode 100644 index 0000000..318a7bf --- /dev/null +++ b/ADC-Control.md @@ -0,0 +1,44 @@ +# Wiring: +* Use blue cable for steering and green cable for speed +* Use 3.3v from programming port or a voltage regulator +* If you don’t need steering, connect blue cable to ground, and set **STEERING_COEFFICIENT** to 0 in config.h +* 100k Pull down resistors connected to ground are recommended to prevent issues when inputs are floating (wire is cut or disconnected) + +⚠ don’t use red wire it delivers 15v + + +# Configuration: +* If you use a joystick as input, enable **ADC1_MID_POT** and **ADC1_MID_POT** in config.h + +# Manual Calibration: +* Connect FTDI to right sensor cable to read USART DEBUG values +* Turn the potis to minimum position, write value 1: to **ADC1_MIN** and value 2: to **ADC2_MIN** in config.h +* Turn the potis to maximum position, write value 1: to **ADC1_MAX** and value 2: to **ADC2_MAX** in config.h +* For middle resting potis, let the potis in the middle resting position, write value 1: to **ADC1_MID** and value 2: to **ADC2_MID** + +Config.h values will be ignored if you have already used the auto-calibration procedure below. + +# Auto-calibration: +Auto-calibration finds the minimum, middle and maximum values for ADC inputs. +* press the power button for more than 5 sec and release after the beep sound +* move the potentiometers freely to the min and max limits repeatedly +* release potentiometers to the resting position +* press the power button to confirm or wait for the 20 sec timeout + +The limits will be stored in flash memory and will be erased only if you fully delete memory before flashing.
+An alternative to bypass those limits is to change **FLASH_WRITE_KEY** in config.h to a value different than 0x1234. + +⚠ Auto-calibration only works if both ADC are connected/used. + + +# Extra Features +## Setup current and speed limit: +* press the power button for more than 5 sec and immediately after the beep sound press one more time shortly +* move and hold the pots to a desired limit position for Current and Speed +* press the power button to confirm or wait for the 10 sec timeout + +## Support of extra buttons: +Uncomment #define **SUPPORT_BUTTONS_RIGHT** to use right sensor board cable for button inputs. Disable DEBUG_SERIAL_USART3! +Variables button1 and button2 can be later used to implement different behavior + +