After being quiet for a couple of years I decided to research if something changed in the robotics… wow… amazing…
Every single thing I was stuck on is sorted!!!
So now plan is:
- Websockets to communicate (already done)
- Nice JS Virtual Joystick for controlling robot and camera (already done)
- Lidar laser distance measure
- Two cameras with ability to switch between night and day vision
- LTE (3G/4G modem) and VPN to have always connected
- new Platform with Wheels Suspension
- GPS coordinates on the map
- Compass and vehicle orientation
- Head lights and back lights
- Sonar and IR sensors back, sides and etc
And much more are coming soon!!!
So I’ve been playing quite a while with different sensors data, like Sonar, Infra Red, Accelerometer and GPS. As you might saw from previous post I’ve chosen to use I2C protocol to speak to the sensors, because it’s super easy and reliable and also I don’t need any DAC/ADC convertors. But now another task to be solved – all these sensors supply quite a lot of changing data like distance to obstruction, coordinates and angle information.
Pulling this data every second is not a nice solution, simply because it will generate extra load by establishing connection, especially if I’m going to use 3G dongle instead of WiFi. Also 1 second poll is too slow for distance – because it is a few more inches of moving.
So I’ve started to dig and found WebSockets – this technology is supported by mostly all common browsers and very simple – client (http) establish connection and after server can send updates (push messages) and accept more messages from a client, so probably I’m going to change even move controls to this protocol!
Yesterday got I2C sonar sensor (proximity) and compas (also provide accelerometer data) – all working perfectly fine! So now robot is stopping if any obstruction in front and also knows the location of north pole… also connected GPS module with real-time clock, so now working on showing Google maps module with location and direction, because I know how robot is oriented!
Next step will be to add some leds as a head-light, they will have special auto-on/dimm function, because sonar sensor has also light level module!
Just released today what all the time I spend trying to connect different sensors is actually should be spend connecting sensors with I2C interface! Just found nice sonar (SRF08 it could measure from 3cm to 6m) and magnetic compass (CMPS10 and also will have accelerometer, just not sure if it will be useful somehow)! Can’t wait they will arrive to finish most important part – robot will “see” the wall and other obstructions and will not allow the driver to drive into the wall/obstruction!
Also this sonar has a light sensor, which means I’ll be able to make a headlight of the robot to switch automatically in dark areas!
Just a small video made from my phone, sorry it’s a little bit dark out here, but I hope it’s enough quality to see camera moving because of the web-controls and at the same time it’s streaming!
I was away for a while and was not able to continue my work on a robot project.
But for a few days got sick and during this time moved a few things forward:
- connected all cables and elements properly and permanently using 3M picture frame holders and Sugru rubber for fixing, will post some pictures after it will be all finished 😉
- connected Sharp IR Distance Sensor using instructions taken from here, so now robot will stop if any obstruction is on it’s way
- upgraded http controls, now it’s famous WASD controls for moving the robot around
Next step is to assemble it all together, make work, present to my office colleagues…
As a goals to archive – stream audio to the web page from the webcam mic and induction charge battery, so I would not need to connect the battery myself, but simply drive the robot over the special “dock station”
Well it has been a long time since last time I touched my robot, so a few things happened:
1. I’ve switched the power supply to “NAZTECH PB15000”. It’s huge, but it can supply 1 usb for Raspberry and also give 12V at 5amp output for motors
2. I’ve created a nice webcam pan and tilt web control, which require more optimizations in terms of number of the requests it sends to the robot (some should be skipped basically).
3. I’ve fixed web-cam/wifi dongle lag by “avoiding” fuses for USB ports and now wifi and web-cam are working MUCH MUCH better. You can do the same by following instructions here.