Documente Academic
Documente Profesional
Documente Cultură
Original release
Fixed bugs in original release
Added support for Uno/Nano by using SoftwareSerial library.
Added support for Roboclaw motor controller.
Added support for single MPU6050 board tilt and steer angle sens
or.
V2.1
v2.6
v3.0
Added "linvor" HC06 bluetooth module support -- this is required to use
Android application.
Added TC74 temperature sensor support. Fixed compilation error
when using POT_STEERING.
v3.1
Removed I component of PID coz it's set to zero anyway. Change analog p
in for POT_STEERING to A1 coz A3 is used for voltage sensor. Removed ENABLE_PIN
for
Roboclaw to free up port for Bluetooth module when used with UNO
. You can only use Bluetooth module and BTN7960 together if you have an Arduino
MEGA.
v3.2
v3.3
Changed LED pins when using BTN7960 or other PWM-PWM/PWM-DIR controllers
with an UNO board. See new schematic.
v3.4
Changed bluetooth module name to SEGWAY during calibration. Added MOTOR
_ENABLE_PIN to PWM-DIR controller.
v3.5
tion.
Fixed code that will sound the buzzer continuously at the end of calibra
v3.6
Saved and retrieved P and D values to/from EEPROM. Added tilt and steer
offset for remote control via bluetooth. Reduced refresh rate for SABERTOOTH_C
ONTROLLER.
v3.7
v3.8
Fixed "remote control" bug - local steering is now disabled only when Cl
oneConsole Android app is on "remote control" screen.
v3.9
Fixed integer conversion error when using POT_STEERING. Added Bluetooth
command to initiate calibration. During startup, P and D values are retrieved
from
EEPROM only if BLUETOOTH is enabled.
v4.0
Fixed a few bugs with communication interface to CloneConsole Android ap
p. Fixed intermittent "Error 11" on I2C bus.
Added new configuration parameters BOARD_OFFSET_DIVIDER and STEE
R_OFFSET_DIVIDER which specify CloneConsole remote control sensitivity.
v4.1
Fixed compile error when using Bluetooth with non-MEGA boards. Added MO
TOR_LR_RATIO (defined in Motors.h) to adjust power output between left and right
motors.
v4.2
Disabled alarm if voltage is below 5V (powered by USB). Added INVERT_ST
EERING option to swap left and right steering. Added FAN_PIN option to turn on
fan output
when temperature goes above TEMP_FAN_ON.
v4.3
Added support for PWM dual-channel motor shield from Elechouse - select
#define PWM_SHIELD_CONTROLLER in SegwayClone.h
v4.4
Changed to inverse PWM for PWM_SHIELD_CONTROLLER. Added LOCKED_BY_DEFAU
LT option - unlock using CloneConsole Android app.
v4.5
v4.6
Fixed FAN output bug. Added ROBOCLAW_ENCODER_CONTROLLER to support a Ro
boclaw with quadrature encoders.
v4.7
Fixed compile error and multiplied Pf & Df by 10 when using ROBOCLAW_ENC
ODER_CONTROLLER.
v4.8
S.
v4.9
v5.0
Added alarm for I2C error - long beep, short beep, long beep.
"Calibrate" via CloneConsole is now allowed regardless of motor
speed when using USB power only (must have voltage sensor).
Fixed compile error when using ROBOCLAW_CONTROLLER or SABERTOOTH
_CONTROLLER.
v5.1
v5.2
Bluetooth module is now supported with UNO + PWM controllers - connect b
luetooth HC-06 TX to pin 5 and RX to pin 6. You can't enable
VOLTAGE_LED with this configuration.
v5.3
Added support for RIDER_SENSOR. Define the RIDER_SENSOR digital input p
in, KP_OFF and KD_OFF for your controller in SegwayClone.h.
Define MOTOR_MAX_OFF for your controller in Motors.h.
v5.4
Added support for low power L298N motor controller - select #define L298
N_CONTROLLER in SegwayClone.h
Added option for INVERT_RIDER_SENSOR. This inverts the logic of
the RIDER_SENSOR pin.
v5.5
"
v5.6
Changed bluetooth baud rate to 19200 for non-Mega boards. Non-Mega users
must first switch to CALIBRATE_MODE to re-program the HC-06 module.
v5.7
v5.8
Added internal pull-up of RIDER_SENSOR pin. This has the effect of inver
ting the RIDER_SENSOR logic.
Sensor must now pull pin to GND if rider is ON and leave it open
or HIGH if rider is OFF.
Added internal pull-up of RX3 pin on MEGA board when using bluet
ooth module.
v5.9
Fixed MAX_MOTOR for Roboclaw with encoder. Added support for forward/ba
ckward tilt control by defining POT_TILT_PIN.
v6.0
v7.0
Single sensor to measure board tilt only. Use this if you want to use a
potentiometer as the steering sensor.
The I2C address for MPU6050 is 0x68 (AD0 low).
Single sensor to measure board tilt and steering angle. You should mount
the sensor on the steering shaft.
The I2C address for MPU6050 is 0x68 (AD0 low).
Dual sensor - one to measure board tilt and a second to measure steering
angle. One sensor is mounted on the
board, and another sensor is mounted in the steering shaft. The I2C a
ddress for MPU6050 is 0x68 (AD0 low)
for board tilt and 0x69 (AD0 high) for steering.
I am using two BTN7960 motor controllers, but the code should work with most mot
or controllers with dual PWM inputs.
If you are using an Arduino Mega:
Right motor PWM is output on digital pins 2 & 3. Swap the pins i
f the right motor is turning in the wrong direction.
Left motor PWM is output on digital pins 5 & 6. Swap the pins if
the left motor is turning in the wrong direction.
Motor enable (connect to both left and right) output is on digit
al pin 7.
else if you are using a UNO/Nano:
Right motor PWM is output on digital pins 9 & 10. Swap the pins
if the right motor is turning in the wrong direction.
Left motor PWM is output on digital pins 3 & 11. Swap the pins i
f the left motor is turning in the wrong direction.
Motor enable (connect to both left and right) output is on digit
al pin 7.
I have now added support for motor controllers with a single PWM and direction i
nputs.
If you are using an Arduino Mega:
Right motor PWM is output on digital pin 2
Right motor DIR is output on digital pin 3
Do not s
wap with PWM pin. Swap the right controller motor output pins if the right motor
is turning in the wrong direction.
Left motor PWM is output on digital pin 5
Left motor DIR is output on digital pin 6
Do not s
wap with PWM pin. Swap the left controller motor output pins if the left motor i
s turning in the wrong direction.
Motor enable (connect to both left and right) output is on digit
al pin 7.
else if you are using a UNO/Nano:
Right motor PWM is output on digital pin 9
Right motor DIR is output on digital pin 10
Do not s
wap with PWM pin. Swap the right controller motor output pins if the right motor
is turning in the wrong direction.
Left motor PWM is output on digital pin 3
Left motor DIR is output on digital pin 11
Do not s
wap with PWM pin. Swap the left controller motor output pins if the left motor i
s turning in the wrong direction.
Motor enable (connect to both left and right) output is on digit
al pin 7.
I have now added support for the Roboclaw motor controller. The Roboclaw must be
configured for Packet Serial mode, address 0x80,
and 38400 baud. There is no enable pin for the Roboclaw. Hence, you must have K
ILL button that connects S3 to ground, or even better, kills the battery.
To use Roboclaw with a Mega, connect S1 to pin 18 (TX1), and S2 to pin 19 (RX1).