Friday, April 24, 2020

Building my quarantine-buddy

While I managed to ignore the whole "Coronadisaster" for quiet some time, it was not to avoid that at some point even I had to stay in home office. And because I don't have a balcony or garden and get bored realy fast, what almost allways leeds into me feeling sick, I decided that I go and build myself a quarantine-buddy. Inspired by "Tiny", a crawling roboter from my favorite series "Eureka", I searched the web for a little robot that would be free programmable and easy to mod. 

The first thing I realized was, that this project would be way above the pricepoint I calculated. Usable hexapods start on amazon at around 100€ and can easily go up to about 300€ - 600€. In the upper price range, they are mostly not as easy to modify anymore. 

I ended up with the Freenove Hexapod for about 140€. I got the version including the remote control because I want to modify the robot now and then and the app may not support this. The body parts are made of stylish black acryl plastic and are hold together with screws and servos. The controlunit is held in place by two plates in between the legs of the robot and is easy to access from the top and the bottom. That was another point for my choice, because this way the control unit has easy to access in and outputs where you can install aditional sensors or other stuff. The board is programmable with the arduino IDE and therefor super easy for tinkering around with, if you ever used an arduino befor or know how to programm in C / C++.    

Let's see, what comes with the box!


 
The following parts are included within the kit: 


- Warranty and contact card 
- Calibration sheed 
- 26 bodyparts
- 18 servos 
- 1 controlerboard 
- 2 NRF24L01 module







- ESP8266
- screws and nuts 
- datacables 
- an arduino uno plus external sheald as remote control




The tutorial to assamble and initiate the robot is available for download on the producers website as well as demo and standard software. 

The only thing not included in the kit but essential for the robot, are two AA sized recharable batteries and an appropriate charger.  

The batteries should be 3.7 volts each and IMR 14500 standard. Actually I'm already thinking about how to expand to batterys with more amps but by now I didn't got that far. 

So, first, I pealed off the fabrication foil from all of the bodyparts. Mostly it sticks really good to the parts so... it took me some time to get rid of it.   


The parts are made of shiny black plastic and look really esthatic when clean... But as it is with all the shiny dark surfaces, fingerprints and dust are a real killer to this optic. 

Following the guidlines, first step in the assembly is to charge the batteries. Well... I orderd them just when I opened the robot kit so... I skipped this part and went on until they are required the first time. 
Assembly of the hardware starts with screwing the disc servo arms onto the bodyplate. In general, the most steps of this part is screwing stuff together and some of this are kinda difficult to manage if you won't have addidtinal tools like a mount or something, but fortunately I have stuff like this around. 
 
After attaching the servo plates to the body, same thing must be done for the legs of the robot. And after this, the servos get assambled with the feed of the robot and the parts building the hinges.
At this point I stopped and waited for the batteries to arrive in the mail because next step was a little test on the servos and the instruction said that the battery would be required for that.

When the batteries arrived, they luckily were partial precharged so I could just start right out of the box with them. 
I attatched the servos to the controller board, what is kinda foolproof, because the pins are marked with the same colors as the wires are. Then I spred the serovs around on the table so they won't affect each other and followed the initiation guidlines. 
 
The robot can be programed with two IDEs out of the box. One is the well known and easy to work with arduino IDE, and the other one is the so called processing IDE. The idea behind this I guess, is to have the makers that just want to get some easy controls running in C like code on their side, but also provide a way to run programs with graphical interfaces too, as processing allows it. However, following this, some libraries coming with the tutorialsheeds when you download them need to be included in the IDEs and then the prewritten code for initiation can be uploaded to the board. In processing you get a graphical interface, providing you with information about the board and the voltage status of the batteries if attatched. Also in there, you can control the robots movement via keyboardcontrol. After checking on all the servos doing their job, it was time to continue the assembly. So I finished the attatchment of the hinges and screwed the controler board on the upper boddyplate. 

In the next step, all the servos got back attatched to the board and got powered on during the whole process of installing them. This is more or less just a safety thing, so they won't get damaged.
When attatching the hinges to the bodyplate, the angle of installation is critical. In my experience, having a look twice is better than beeng thrown back later because of a false orientation of the servos. 
Over all, one could say, attatching them in a 90 degrees angle to the edge of the bodyplate they are close to, brings them good enough in a right spot. The whole mechanics will get calibrated in the end, but also the wireing is a lot easier, when the hinges are first attatched in their "zero position". 



Then the legs and feeds get screwed together in a similar way. To mount the feed on, I placed the robot on the box it came in, so there won't be that much presure on the servos. The feed needs to be attatched more or less in 90 degrees to the surface what also was a little challanging but with a little patiance not as much of a deal as I thought. 










Finally, the tutorial shows what servo needs to be wired up at what set of pins and all left the is the lovely cablemanagement... yaaaaays.....Just for the record: I'm absolutely not a hero in cablemanagement and I'm deeply impressed by everyone who can make some kind of art out of it!
After I probably broke at least two of my fingers and got through almost all swearwords I know (and I know lots of them, ask my friends), I managed to atleast strip the cables some how together and mounted the backplate that holds everything in place. 

I grabbed the calibration sheed and was ready for the horrortrip of calibration but... I was actually really surprised how easy this went. I you just work calm and straight forward on it, it's not more that a few simple clicks in the processing app and the robot is done calibrating. 
First thing now was to let the robot move around on the table using my laptop keyboard to control it. That worked pretty well and it was kinda strange to see the thing you just assambled yourself move like it has an own mind. But, as cool as this already is, I pluged the ESP in and tried to hook me with my mobile into the robots WLan. Well, let's say, at this point the batteries were empty and I didn't recognized directly so... I had some failures, but then it did worked.  



Finally, with only some screws and a 5V battery, I but the remote together and pluged the NRFs in. After uploading the remotesketch from the arduino IDE, I was able to move the robot via remote imediately.


So far, this project was really fun, but the actual reason I bought this, was to tinker around with it. And that means, I'll add some sensores in the future and try to program custom code for ist. So I'll keep you updatet on this! 

Thursday, April 2, 2020

Becoming part of an european-wide network for air measurements


In December ’19 I was watching a livestream on a talk at CCC about measurements on air quality. Because everyone was talking about the climate change thing and I’m a big fan of data and statistics, I decided to become a part of the European “luftdaten.info” project. It allows everyone who’s interested to host their own measuring station and upload the data to the project servers. They are then visualized on a map and show the data in, more or less, real time.
The following is a report on how I build and installed my station and what for interesting data I already found in the first days.

First, I had to get all the parts together. Therefor, I just copied the list given with the building instruction, easily to find on the luftdaten.info website, and went to my local microelectronics store. With some extra material that I used for mounting the station and make it safe against the environment, I ended up with the following materials:


  • NodeMCU ESP 8266
  • SDS011 fine dust sensor
  • DHT22 temperature and air moisture sensor
  • 7 jumper wires (about 15 – 20 cm length)
  • Micro usb ribbon cable (as long as needed to connect to power)
  • Usb to grid adapter
  • Pipe (inside diameter 6 mm, length 20 cm)
  • Two pieces of Marley Silent HT DN 75 87°
  • Some piece of fly grid plus mounting tape
  • Tension belt
  • Cable ties
The ESP8266 (right) and the SDS011 plus usb connection (middle and left)


With all the materials, it was now time to start building the sensor.
In the first Step, the custom firmware that makes sure realizing the project is possible without any programming knowledge is flashed on to the ESP. For that, downloading USB to serial drivers is required, if not existing already as in my case. After that, a little flashing program makes it easy to flash the image onto the controller. It is a wise idea to do this step as the first one, because it allows to check on the status LED of the ESP because he’s not hidden in the tube already. Also, if the firmware flash fails somehow or the board is broken, you can easily access it. 

Flashing the ESP firmware
Next up is already the assembly of the components. Depending on the ESP version, the transmit- and receive pins of the SDS sensor are connected to data pins of the controller, as well as ground and voltage. The DHT22 sensor only transmits data to the ESP and is therefore only connected to one data pin, 3V3 voltage and ground.

Absolutely professinal chart of the wireing
SDS011 Connection
ESP and DHT22 Connection
 










Then, I cut the pipe in a length that it is almost as long as one piece of the tube and put it onto the SDS input connection.
After connecting all parts together, I tied them up with the cable ties. First the ESP onto the SDS and then the cables of the DHT22 down the pipe, close to the end. 



The complete assembled construct should now stick exactly inside the tube. In my case it didn’t and did not hold in place on its own, so I added a little bit of glue in the gabs between the SDS and the walls of the tube. After arranging the pipe and the DHT22 as close as it is possible to the opening of the tube but still hiding inside, I closed the housing of the sensor by assembling the second part of the tube over the other half of the SDS. 

Finally, I mounted some fly grid over the ends of the tube and put a little hole in it, so the power cable can run through it.
To attach the sensor outside of my window, because I don’t own the flat, I live in, I used a tension belt.



The only thing left then, was to connect to the management Wi-Fi of the sensor, initialize a connection to the router and tell the ESP what sensor is connected to what pin. Because I used the default wiring, I could just leave it with the pre-set settings here. After that, I created an account at luftdaten.info and registered my sensor via its ID. For precise data analysis, the coordinates, hight and placement of the sensor is required. A few minutes later, the first measurements of the sensor showed up on the map as well as on the temperature- and air moisture-graph.

In the first days of measurement, I noticed a short quadruplication of the 10µm fine dust values in my sensor and the ones around. When I had a closer look on it, it appeared that something like a cloud of dust was traveling all over Europe…. Phenomena like this are, what fascinates me on building this kind of tec. It shows, what no one can see with bare eyes, smell or feel and therefore would never assume without technology that makes it visible.   

Normal measurements 

 


Measurements at the "event"



 Finally, I just want to mention, that the whole idea belongs to the amazing team of luftdaten.info, so if you like my try on this project and maybe wanna try it yourself, just go and visit their website. :D