This is a video of my DIY Lidar robot. Here it is using a spinning laser distance sensor (Xiaomi robot vacuum spare part) to drive around and avoid obstacles. The sensor is connected to a Raspberry Pi running a Python script that is the main behavior program. There is no mapping going on, the robot is just going forward and turning away from things that are to close. The Raspberry Pi then sends serial data to an Arduino that controls stepper motors driving the robot.
The Teensy 3.2 is running PID speed control for the DC motor that spins the sensor. It is also reading the binary sensor data and sends it in easy to understand ASCII-messages over serial to the Raspberry Pi. The sensor spins at 5 revolutions per second and makes a distance measurement for every degree. Resulting in 360*5 = 1800 measurements per second. The accuracy is within a few centimeters. This sensor trigonometry to measure distance, in that way it is not a real Lidar sensor.
I have re-built my old balancing robot using a single Arduino Mega instead of my previous solution using three different Arduinos. A better more optimized solution. Schematic and source code is available on the robot page here: http://axelsdiy.brinkeby.se/?page_id=1845
Here is a video of me assembling the main electronics board used in my Bush Beast 3 RC airplane.
A Teensy microcontroller is used to read a decode an S-bus signal from the receiver and make all the servo signals. It manages servo mixing and gyro stabilization, as well as controlling LED lights on the plane.
More info about this, including schematics and code can be found on the Bush Beast 3 page here: Bush Beast 3 page
I got myself two new airplanes this summer at an RC plane auction that was organized at my local RC flying club FK Gamen.
The first one is a J3 Cub ARF model by Thunder Tiger with a wingspan of about 2.2 meters. The model came with a 4-stroke nitro engine that I have replaced with an electric power system. I will make a new landing gear with suspension and fix the motor cowling. I will probably add some kind of gyro stabilization also, this plane is surprisingly unstable in windy conditions.
The second plane is a Flair Magnatilla. The wingspan is about 1.6 meters. This is my first airplane with a nitro engine. A 4-stroke Saito. I will probably add a steerable tailwheel and make a few other adjustments over the winter.
Bush Beast 3 is an RC bush plane that I have designed and built during this winter. The plane is built using balsa wood and covered with Oracover. The design of this airplane a combination of Trent Palmer’s Kitfox, the Pilatus Porter, and various Cub planes.
I have made a custom electronics system on this plane. A Teensy 3.2 microcontroller reads the S-bus signal from the RC receiver and controls all the servos, it also applies 3 axis gyro stabilization and manages all servo mixing and a custom lighting system. More about that in a future video.
I fly my RC Airplanes and quadcopters on LiPo batteries like most other people. But LiPo batteries have several disadvantages. The biggest problem is that their life is pretty short. They usually don’t last more than 100 cycles. Therefore I wanted to explore the possibility of using 18650 cells to power my RC models instead. I while ago I got myself a cheap battery spot welder from China and a couple of genuine LG HG2 cells.
This is the first self-balancing robot that I built that actually worked well. More info about it here. My absolute first self-balancing robot was the “Equaipose bot”, link the page about it here.
This video has gained some attention on youtube, and I think that is why I get at least one email every other week from people asking about the code and schematics for this robot. I have not shared the code of any details about this robot since it is very poorly made and coded. The robot uses multiple Arduinos just to keep the balance and drive the motors, later I also added another Arduino to manage the Ultrasonic sensors and some other stuff. There was also a Raspberry Pi that I planned to use for computer vision experiments, I never came around to doing that using this robot.
Now when I know a lot more about self-balancing robots, and Arduino programming and DIY robots in general, I decided to make a new version of this robot. I new complete rebuild of it. My intention is to make the robot less complicated and also better. I stripped down almost everything in the robot and started over. Still using the same old wooden chassis. The new version is based on a single Arduino MEGA R3 controlling everything in the robot. It reads the MPU6050 IMU, makes all the filtering and balancing calculations, and drives the motors using hardware timers for maximum precision. The new code for this robot is heavily based on the code for my “mini balancing robot”, with some improvements, more info about that robot here. I still use the same old stepper motors, model airplane wheels, and “Big Easy Driver” -stepper motor driver boards. The Arduino MEGA also controls and reads four HC-SR04 ultrasonic sensors using Interrupts. Those sensors are used for obstacle avoidance.
The new version of the robot works now. It balances and drives around avoiding obstacles, but I still have a few things to fix with the code. I want to add a pushbutton for control and a buzzer for feedback, I should also add battery measuring and implement a low voltage cut off to prevent damage to the battery.
I hope to release I video of the robot together with the code and schematic in a couple of weeks.
The servo seen in the pictures is not and will not be implemented in the first version of the code, but the intention is that the servo should be used to make it possible for the robot to raise itself up and start balancing on its own. Maybe I will also ad some sort of remote control since it is a frequently requested feature, But that will be in a later version.
It has been some time since a worked on this robot. This is a video of me building and installing the main PCB on the robot. The video was actually recorded several months ago, but now I recently found the inspiration to continue to work on this project.
The main board has an Arduino Due that controls the two stepper motors that drive the wheels. The PCB also has a lot of other features including servo outputs/inputs, MOSFET outputs, bumper sensor inputs, 6 DOF IMU (gyro and accelerometer), a few buttons and LEDs, and a couple of other things. In the video, I connect an RC receiver the servo inputs on the board and drive the robot abound using remote control.
The future plans for this robot are to implement a serial interface in the Arduino Due, and then connect it the Rasberry Pi. That way the Rasberry Pi will be able the drive the stepper motors and also read data from the IMU and other sensors. Then I can make a python script or something running on the Pi that gives the robot some interesting behaviors.
I also plan a replacing the Time Of Flight LIDAR sensor mounted on the stepper motor seen in the video with a rotating Laser sensor instead. The problem with the Time Of Flight sensor is that it has a very limited range and sampling time. I recently found out about the rotating Laser Distance Sensor (LDS) used on Xiaomi robot vacuum cleaner robots. It is available for cheap as a replacement part the vacuum robots. There is also an open source project to control the spinning of the sensor an read data from it, which should make it relatively easy to connect to the Rasberry Pi in my robot.