3 days ago •
Some news about my progress in the creation of this robot. I tested various technologies to control it remotely. At the moment, I'm working in Wifi, but it's not enough. I need to control it from a distance of more than 100m in a non open environment.
I tested the nrf24L01+ with antenna but the range is not enough. I've tested the HC-12, but I can't send the video stream, the bitrate is not enough. It's the same for the LoRa RA-02 modules. But LoRa is really good. I think I would use it for other projects ;)
I tested the 4G LTE and it works well. The range is "infinite" from the moment we get the network. The video and the commands respond correctly.
I had to rewrite part of the code in order to optimize it to handle a latency of 50ms on average.
I also started to design the base for the tools. Currently, the first tool will be an automated insecticide bomb to destroy the wasp nests that invade my garden at the beginning of the summer.
Thank you for following this project !
10/27/2020 at 20:01 •
I've made a lot of software modifications.
First all programs are now started at the robot start. I've used "supervisor" :
the robot program is divided into 3 parts that communicate with each other via various protocols: HTTP, Serial data, websocket, ...
robot_cam is a module for managing the streaming of the camera. it supports the mjpg format and can manage the entire video stream. This part is written in C and is partly based on mjpg-streamer.
robot_web is a module written in python which allows to manage the web server, the display of pages, the management of websockets, files, and various actions such as sending a "sudo" command to the system layer. A reboot, or the restart of the robot's services are thus possible directly via the web interface.
robot_core is a middleware written in C that allows to link all the robot systems. It is multiheaded and can self-correct during operation.
The web interface allows to read and perform basic operations such as :
Stop or restart the robot,
Restart a service,
Take a picture, view and download the photos.
The control of the robot is done via nipplejs.
Thank you !!
09/15/2020 at 01:18 •
A lot of time has passed since my last update. I have since learned a lot and this version of the robot base reflects that.
I completely reviewed the chassi, with meccanum wheels, real DC9V motors with reduction and an acceptable speed.
I redesign the box and made a complete review of the electrical system.
The communication mode has also been revised, and it is now in series via the TX and RX pins.
Now i'm programming the RPi and the arduino to work together.
Thank you !
03/12/2020 at 01:02 •
I've made some progess in the last days. I've designed the new shape of the robot and printed it. It's a "little" bigger as you can see in the picture :
I've added a couple of sensor :
- a rotary encoder,
- a TMP36 analog thermometer (to get inside case temperature),
- a GPS neo 6m,
- a PI camera.
I've changed the way raspberry pi 4 and arduino are communcating. I'm using SerialUSB.
I'm working now on the software on a small prototype :
And here is the major change, i've totaly rewrited the sofware :
- The webserver is handled by "flask framwork" in pyhton,
- The web interface is using websocket in JS to send and recieve data,
- The arduino is using Serial data via USB (it"s powering the arduino too),
- All the data are managed by a multithreaded core writed in python. It get the data from arduino and web interface, and it send the data to arduino and web interface.
Here is the web interface (not finished yet) :
You can see in the SSH windows the "core" dispatching data to browser and arduino.
Next step is to change motors with more powerfull one with encoder and begin to add a small arm. Or maybe some computer vision. I dont know yet.
Have fun !
11/20/2019 at 01:39 •
Today i've got some time :
Power Supply :
I have made some change on the electrical circuit. My raspberry was undervoltage. After a lot a search, i discovers that the cable i've used was not large enough to permit enough current to power the raspberry.
I previouly used 28 AWG cable. i didint know that this cable have a limit on the current they can carry. Rapsberry pi 3B+ need 2.5A. I buyed some 22 AWG cable , and make all the power circuit again.
After running some test, it was a lot better. but i got always undervoltage under eavy load. i upped the voltage to 5.1V and now all is fine ! My Raspberry Pi is working fine.
I used this document http://www.jst.fr/doc/jst/pdf/current_rating.pdf to get the max current rating for AWG cable.
I soldered a new microUSB cable to. I like soldering, it's a relaxing activity =)
For the Wifi, to get an extended range, i changed the external wifi dongle. I buyed a 8822bu chipset with an external 2.4Ghz/5Ghz antenna. I replaced this antenna with a big one of 50 cm 2.4Ghz only.
this thing is really big and i'm a little scared for the USB port. i got to find a way to make this more solid.
The wifi card is compatible with Linux, but my ubuntu is on ARM and there was no drivers.
So i modified the compliation instruction code to make it compatible with ubuntu mate with Arm processor.
Here is what i do (in a short way):
sudo apt install -y dkms git clone https://github.com/chasonr/rtl8822bu.git --branch linux-4.15-fix sudo cp -r rtl8822bu /usr/src/8822bu cd /usr/src/8822bu ln -s /arm arm7l apt install linux-headers-4.15.0-1049-raspi2
Modifiy the make file from line 960 to change the taget to ARM. otherwise it will not compile into the Linux kernel.
sudo dkms add -m 8822bu -v 1.1 sudo dkms build -m 8822bu -v 1.1 sudo dkms install -m 8822bu -v 1.1 sudo modprobe 8822bu
Have fun building robots =)
11/13/2019 at 16:30 •
I'm design the new version. Cause this one is really too small =)
Here's is a first look :
Electronics will be the same with some little variations.
New size will be 30 x 50 cm. I hope i get enough space to setup all my electronic =)
I've changed the motors. I use N20 geared micromotors. they are very powerfull. Heres one wheel with the attached motor.
Thank you =)
11/06/2019 at 12:30 •
Here is a first video of my little project :
The remote console is writed by hand. i will publish the source when it's ready.
Now i'm adding :
- an oled screen to see the robot status,
- a GPS module for getting the position,
- 4 hall sensors for the odometry,
- I'm changing the USB Wifi AC card with a long range one (9db antenna) supported by ubuntu.
Next step will be to add a case for the top of the robot, and add an arm or some tools =)
Thank you for following this project.
10/26/2019 at 18:12 •
Hi ! The lasts day i was working on the data bus and the remote control interface. And Everything is working.
I can send and receive, restart the ESP32 or RPi3, and send specific command to the ESP32.
Now i have change some piece of code on the arduino from "delay()" to "millis()". Delay is a blocking function and i need to use the motors at any time.
Next step will be to add the RPi V2.1 Noir Camera to the http console. I'm thinking about adding mjpg streamer, but i will like to stream directly from openCV. idont know now if its possible.
Last step of this code, will bee to add some vitual Joystick conneted to websocket server on the ESP32. i really like the ESP32 it's very powerfull.
And some part of the HTTP remote console where data are updated in real time (websockets are really cool !!) :
Thank you for reading and have fun =)
10/16/2019 at 14:08 •
Today, i was thinking about how differents components will communcate and work together. After some reading about i2c, serial, and other CAN possibilty, i was not convinced... this protocols are pretty old and i dont know them very well.
I was a network engineer for 12 years ... So i decided to make them communicate with an internal Wifi network at 2.4Ghz. I will use RPi3 and many ESP32 to build the main core of the robot. Here's is how it work :
- RPi3 will serve an acces point for remote control console,
- x Esp32 will connect to this internal Wifi secured by WAP2,
- Developpement and debug has to be done from an ethernet cable (SSH and xRDP accessing ubuntu desktop,).
I can now use as many ESP32 as i need and get "infinite" IO ports. Data from sensor will be published by an HTTP server with a json format, and some ajax call will display them in the remote HTTP console served by the RPi3.
I setted up a mDNS service, so i dont have to rember IP from esp32. just use come comon DNS name like : motors.local, or roboticarm.local ...
Here is a photo of my notes ... (sorry it's just a draft) :
and what it look like in real life :
have fun building robots, and thank you for following this little project.
10/11/2019 at 12:01 •
i'm continuing to remodel the whole thing in 3D and print it.
Tinkercad is really easy to use, and you can get pretty fast results.
I have rebuilded the power system. my ina219 was not well connected and i2c informations was wrong. i've made a "shunt" near the battery, so i can calculate the percent left.
I'm using 2x18650 samsung 25R. With a given temperature, volatge, and Ah its easy to calculate the percent left in real time :
Now i can get this information directly into the HTTP remote console :
Next step is to build the communication bus. I'm thing about i2c, but CAN bus seems to be cool too. i've not decided yet.