This is as close to plug and play for your robot as you can get with the Neato XV Lidar. This interface board connects directly to the Neato XV Lidar and controls the rotation speed through Pulse Width Modulation (PWM).
The XV Lidar Controller receives the serial data from the XV Lidar looking for the RPM data embedded in the stream and uses a PID controller to regulate the speed to 300 RPMs. The data received from the Lidar is relayed to the USB connection for some upstream host device (PC, BeagleBone, Raspberry Pi, etc.) to process the data.
- Neato XV Lidar – Available on eBay
- XV Lidar Controller Board with Teensy 2.0
- Firmware https://github.com/getSurreal/XV_Lidar_Controller
- Arduino IDE (v1.0.5 tested. Newer or older may work)
- Teensyduino – Software add-on to run Arduino sketches on the Teensy (v1.19 tested. Newer or older may work) http://www.pjrc.com/teensy/teensyduino.html
- Copy the included libraries to the Arduino libraries directory
Connect to the Teensy USB port at 115200 baud. When sending commands, use the “newline” character sequence to signify the end of a command. Before sending most commands it’s helpful to stop the streaming of serial data with RelayOff.
Commands are case sensitive.
- Help – Returns list of available commands
- GetConfig – Shows the current running config (could be different than stored settings (EEPROM) if you made changes without saving)
- SaveConfig – Save config changes (EEPROM)
- ResetConfig – Restore the original configuration settings
- MotorOff – Stops spinning the Lidar
- MotorOn – Starts spinning the Lidar
- RelayOff – Stop sending data through the USB connection
- RelayOn – Send data through the USB connection
- SetRPM – Set the desired rotation speed of the laser (300RPM recomended)
- SetKp – Advanced use only if you want to change the PID constants
- SetKi – Advanced use only if you want to change the PID constants
- SetKd – Advanced use only if you want to change the PID constants
- SetSampleTime – Set the frequency the PID is calculated
- ShowRPM – Used for debugging RPM
- HideRPM – Turn off RPM debugging