The Donkey Bounce Car is the Donkey Car + super fancy extra hardware and software.
The second version of the Donkey Bounce Shield, uses a CPLD to accuratelly measure Servo signals from the Remote Control (RC). It creates PWM signals that drive both steering and throttle and by default it mirrors the signals of the RC. Alternatively, Arduino's serial port can override RC settings and drive the car. It also now supports various types of GPSs and both 6-axis and 9-axis absolute position sensors.
- You can find the PCB here.
- You can find the CPLD design and JTAG files here.
- You can find the latest Arduino Sketch here.
- You can find the updated ServoTimer1 library here.
The schematic
or -
The Shield
As soon as I started using the first version of the Donkey Bounce Shield, several limitations became aparent:
- Servo pulse width measurements were highly inaccurate. Even after using interrupts and other techniques the accuracy was bad.
- I would have to manually unplug the Remote Control signals in order to create control signals from Arduino.
- When, after several modifications I was able to have arduino as man-in-the-middle, between the RC and the motors, Donkey Car was making flaky small moves as inaccurate measurements where propagated to the PWM controller.
The reason for inaccurate measurements was the sensitivity on interrupts. More specifically the cli
command stops interrupts and it's used very often. For example, it's used by the micros()
Arduino command and it's also very heavily used by the SoftwareSerial module. We need that module in order to read GPS signals.
Bottom line; In order to accurately read PWM signals you need to measure latencies with microsecond-level precision and an Arduino can't do that when it's as busy as it is in our case. I offloaded this work to custom hardware and more specifically an XC2C64A Xilinx CPLD.
- Use the Matrix Glitcher as a Coolrunner II XC2C64A development board
- XC2C64A CoolRunner-II CPLD Datasheet
- Datasheet of GPS smart antenna module, LS20030~3
- FGPMMOPA6H GPS Standalone Module Data Sheet
- Adafruit Ultimate GPS v3 Schematic
- Dangerous Prototypes XC2C64A cpld breakout Schematic
- TC1014/TC1015/TC1185 Voltage Regulators
- Logic Level Bidirectional Adaptor Schematic
- 5V Tolerance Techniques for CoolRunner-II Devices
- BSS138 N-Channel Logic Level Enhancement Mode Field Effect Transistor
- Adafruit BNO055 Absolute Orientation Sensor
A shield that adds a GPS, a gyro, PWM monitors and a distance sensor
The schematic
The Shield
You can find details about the PCB here.
ssh pi@192.168.1.124
If it's on Ellipsis Jetpack 15BF
:
ssh pi@192.168.1.11
Wifi notes: Setting WiFi up via the command line https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
Ellipsis Jetpack 15BF
$ python a.py
This was a good attempt - but didn't work:
./usbrawserial /dev/ttyACM0
Ref:
$ cd ~/mycar/
$ python manage.py drive
http://192.168.1.124:8887 http://192.168.1.11:8887
- Pulse Width Modulation
- Arduino Uno SMD
- SPI library
- Three Ways To Read A PWM Signal With Arduino
- MPU-6000 and MPU-6050 Register Map and Descriptions
- MPU-6000 and MPU-6050 Product Specification
- MPU-6050 Accelerometer + Gyro
- USB-ISS Multifunction USB Communications Module - I2C Mode
- USB-ISS Multifunction USB Communications Module - I/O Mode
- How to use the accelerometer- gyroscope GY-521
- SparkFun FTDI Basic Breakout - 3.3V
- pyserial/serial/serialposix.py
- Make Raspberry Pi and Arduino Work as One Team
- Interface a Raspberry Pi with an Arduino so the two boards can communicate with one another
- TinyGPSPlus/examples/DeviceExample/DeviceExample.ino
- LS20031 5Hz (66 Channel) GPS Receiver Hookup Guide