Introduction: Mbot Telepresence Robot
When I work on my ship, the only way to interact with my sweet little girl is via whatsapp and my wife that has to aim right the phone. It was fine but since my girl's going to reach her third birthday, the conversations are beginning to be complicated as my wife has to follow her throught all the house. As a result, I mainly watch the the floors and the walls..
As I already has automated my home throught DIY arduino, ESP8266 and domoticz, I challenge myself with an arduino robot to carry the phone around.
As I didn't owned a 3D printer, I choose the Mbot Ranger for it's lego compatibility, its easier block programming system and thought to control it via a web page.
It turns out that the ranger isn't webcontrol friendly, the lego compatibility led to big ugly's things, I found the block programming not as open as I wanted and the web page too heavy to control correctly my robot.
2 months later, I have succeed but:
I use an esp8266 to control via serial the ranger with a code based on the xbee protocol
I add a esp8266cam with a pan/tilt to be able to look around
I learn to code an android app to web control on MIT App inventor
I create my own code for the ranger
I bought a 3d resin printer to build some parts and choose water washable resin as it seems less dangerous.
I can detailled the step further if people need it
- 1x Mbot Ranger
- 1x ESP8266 D1 mini
- 1x ESP8266Cam
- Cam Lens OV2640 850nm 75MM (for better rendering)
- 1x Pan-Tilt for Mbot Ranger
- 1x Me RJ25 Adaptor Board- 13801 (to connect the pan-tilt to the Ranger)
- 1x Old android phone for Whatsapp
- 1x 3D printer (elegoo mars 2 and water washable resin for me)
Step 1: Contruction of the Mbot
The construction of the Mbot is simple, you can avoid the mounting of the line follower module and the ultrasonic sensor.
The Pan tilt is harder has it didn't come with any instruction.
Step 2: Taking Control
The esp8266 is a low-cost Wi-Fi microchip that you can program with the arduino IDE. You can upload a program with just a computer and a usb cable and make it do WhatsApp you want: pilot a relay (lights, swimming pull pump,...) read probes (temperature, pressure) or even serial communication. The D1 mini is just a smaller model.
It's that last feature that we're going to use to control the ranger.
The D1 mini will be connected to the port 10 of the Auriga with a RJ25 that i cut in half. The ranger come with severall RJ 25 so i use half of one and save the rest for the cam.
On the yellow and blue port you have 1 5v power output, 1 ground and 2 analog ports. Its exactly WhatsApp we need to power the esp and to communicate.
white -> D2
Step 3: Upload the Program in the D1mini
I start from the sketch i found here here: https://www.generationrobots.com/blog/en/how-to-t...
It was made to control the ranger over the xbee protocol but i modified it so it can be control through HTTP GET method.
You'll need the followings librairies:
You have to enter your wifi network name and adress in "const char* ssid = "XXXXXX"; const char* password = "XXXXXX";" and the IP you want to give in "IPAddress ip(192, 168, 0, XXX);"
Step 4: Upload the Program on the Ranger
You have to choose Arduino mega 2560 to be able to upload to the auriga.
You'll need the folowing librairies: Wire.h , SoftwareSerial.h, MeAuriga.h
Step 5: Program the ESP8266cam
This module is an ESP8266 with a cam. The cam that is sold with the card is rather bad so i bought an Lens OV2640 850nm.
There's plenty of site that explain hos to do it, i follow this one:
but stop at "3. ESP32-CAM Upload Code" to upload the code here: https://github.com/yoursunny/esp32cam
This particuliar code permits to bypass some error in my app.
Step 6: Print Some Parts
Here the STL file to print:
- the box for the battery, D1mini and the Adaptor Board
- the box for the esp cam
- the phone holder
- the tilt-pan holder as the one that is sold is too weak
All the parts are made with holes compatibles with Mbot, you have to dig holes in the box for the cables.
The ranger box is a little to small but it fits!
use the sticker at the back of the lens to stick it in the right position on th esp8266cam before putting it in the box
i use some resin to block my old phone in the phone holder
Step 7: Android APP
My App send two HTTp Get request, the left joystick for the ranger mouvement, the right for the Cam mouvement.
In the parameters you can enter the IP adress of the ESP8266 (D1 mini) and the IP Adress of the Cam.
You can add a port using: "IPADRESS":"port" to forward the port through your router.
I'll post the app on the market soon.
Participated in the