VL53L0X is I2C infrared laser-like distance sensor which can measure distance with accuracy of 1 mm and maximum distance of 200 cm in long range mode, the basic mode provides 120 cm range which is good for many applications. One disadvantage is that you cannot change I2C address permanently. You have to shut down other sensors on the line and then set I2C address of the sensor. Address resets when the sensor losts power.
Nokia 5110 SPI display or OLED I2C. 5110 is low power, readable on direct sun, has optional backlight but the pixels are rectangular not squares, so circle looks like ellipse. The OLED one is no so power efficient but easy to connect and has variable colors (blue and white) and size (0.9 and 1.3 inch). I like the 1.3″ inch version.
Bosch BME280. It measures temperature, humidity, pressure (and above sea level from pressure). It uses I2C interface and supports low power modes. For the precise contactless temperature measurements I choose Melexis MLX90614. This I2C sensor has several versions (voltage, field of view, accuracy). I like the DCI version which is 3 volt with 3 degrees FOV and almost medical precision.
If I want to get just Yaw/Pitch/Roll in degrees then I use GY-25. The board itself has MCU and sensor. The MCU communicates via I2C with sensor and over Serial to you. But if I want more data I use MPU-9250. It is I2C sensor with accelerometer, gyro, compass, so 9 axis in total. It also provides temperature as bonus.
Lidar is distance sensing device which outputs data describing distance. It uses light, that’s why it’s called li-dar (dar is from radar which use sound). It fire an IR ray in the specific angle and detect strength of IR ray coming back to the receiver part. I was using Sharp IR distance measuring sensor which is not precise but It’s easy to use and cheap. Then I found VL53L0X sensor. It’s based on Class 1 IR Laser, so the ray is more like line and It can provide data via I2C interface to your MCU. This sensor can be turned 360° over and over and sensing environment around. I wanna to build such Lidar sensor. The first thing you will need is something that allows you to turn cables many times without tangling. That is called SlipRing. You can find it on AliExpress, it’s not thing for few cents…
The next is sensor, which can provide very fast measurements. Let’s say we want make a whole turn once a second and measure every 10°. That’s 36 measurements in 1000 millisecond, so ~28ms for measurement and sending data to out MCU! The fastest mode of VL53L0X takes ~20ms, so if we add some time for sending to MCU, it could be possible. I will talk about combinating more sensors to achieve speed in the next article.
After long time of problem solving I can finally run E-ink display on my RedBearLab BLE v2. I got some problems to run it with hardware SPI, so I had to use different pins and custom shiftOut function for data proper transfer. The final design doesn’t look like an Apple Watch or nice Samsung Watch but I hope it will be functional.
The every part which will be used:
3D printed case in black PLA
RedBearLab Nano v2
Pushbutton 6×6 mm
LiPo 301530 100mAh battery
TP4056 LiPo charger
uUSB connector (i hope there will be enough space for this)
Some hot glue, wires and resistors for voltage division and measuring
Stand By mode should refresh time every 10th minute, not every 10 minutes! When I will receive some message, it will display a logo of the app, sender or title and the content. I will play with this when it will be finished hardwarely.
I expect one week of usage.
I consider to make custom pcb with all the parts soldered on the only one board, so there will be more space for battery and it will be thinner and nicer.
I made some progress last nights while staying awake until 3-4 AM. I have tried NRF24L01 modules but without success. I have to order new ones, I have’t got any spares. They were working fine last year, I don’t know what happened. So, I decided to add Bluetooth Module (HC-06).
First of all, I was looking for Android App which will be the best for my purpose. Simple app which will be sending data to the car continuously! I didn’t find such an app for controlling car. I found some, but they were horrible, but good for testing. The app I downloaded has joystick and buttons like gamepad. The problem was in joystick. It was just like 8 buttons and the direction you moved with joystick the specific button was sent to the car ONCE. When I released the joystick some another character was sent to the car but also ONCE. That was problem. Why? Because when I lost connection between smartphone and HC-06 the car will still going in the last known direction and car easily run away and be damaged. And so it happened. It fell off the broke rear bumper. Glue, easy fix.
When the car was finished and working I started programming custom Android application. I wanted keep it simple. I added status bar with connect switch, voltage and device name and coefficients. Below the status bar were placed custom made „Analog Sticks“, one vertical, one horizontal giving me a range of -1.0 to +1.0 for better calculations. I will talk about the app itself in the part #3.
Besides Smartwatch Journey and Quadruped Project there are several projects waiting to be finished.
I built FPV (First Person View) RC car controlled by Arduino last summer. It was easy to build but the main chassis wasn’t looking so good. So, I decided to rebuild it.
The main parts of the car was: chassis with steering and motor included from construction kit rc truck, 2 x 18650 old batteries, Arduino Pro Micro/Mini, nRF24L01 with attachable antena, TB6612FNG as motor driver. I added 1000TVL FPV camera and transmitter Eachine TS832 later. The controlls was just 4 buttons (FWD / REV, LEFT / RIGHT) and FPV receiver RC832 from Eachine as well. There was also some regulator which will be mentioned later. Voltage divider to measure voltage with Arduino.
Reasons why I wanted to rebuild it:
There wasn’t any space to put batteries inside chassis, the only way was to use 4xAA batteries insertable to the bottom part, but that’s too weak and slow for me cuz 4xAA can provide olny 4.8V – 6V due to type. The batteries was placed on the top of chassis making bad behavior of the car.
Power management wasn’t solved very good. As I accelerated the car the FPV transmitter shuted down and didn’t have enought power. I had to use another 600mA battery but it was drained in 15 minutes.
What I made new or added:
Old steering was replaced by servo motor steering with L7806CV voltage regulator to make suitable 6 volts.
Front suspension is wider by 5 mm. (80 mm front and rear now)
New main-board including NRF24L01 with L1117 3.3V regulator, Arduino Pro Micro 5V, TB6612FNG, big 1000uF capacitor for voltage spikes, buzzer for signalization low voltage or debug, 10k/4k7 voltage regulator was the same as before.
burned finfer by soldering iron :/, it survived (weird smell of human meat)
What I will make or add later
FPV camera on Yaw or Pitch servo
Spoiler on servo. Rly? Useless…. Maybe.
Better controller! with display or buzzer to know battery voltage of the car or the controller itselft.
I am almost done with my quadruped project. It’s spider-styled robot with 4 legs and 12 servos. I use RDS3115MG servos for this project, because they are very powerful and have nice mounting with fake dual shaft. They aren’t so expensive, $10 each.
I got 13 servos before assembling. I thought 1 spare servo is enough but 2 servos had burnt. The voltage was correct. Every servo has the same power suply, but only two burnt. The interesting thing is that when power was going to the servo nothing happens as expected. But when the pulse was applied to them, they started to smoke and one chip was going to be red.
As usual, I am waiting for another servo, my AliExpress seller sent me as replacement. Maybe there was some shorts. I don’t know…
I will post some pictures and description of the robot as soon as I will finish it.