The Raspberry Pi Eclipse IoT Car

anne Examples 1 Comment

So now its time to wrap up and finalize our Eclipse IoT Open Challenge project. Our contribution, the Raspberry Pi Eclipse IoT car, moves around in directions controlled remotely using CoAP and snaps pictures that are published via the MQTT protocol. A distance sensor makes the car stop if it is too close to an object. You can see how the car works in the video below.

Here is the list of the Hardware we used:

Screen Shot 2015-03-19 at 10.06.51

The application that runs on the Pi is programmed with Reactive Blocks.  This is what it looks like:

Screen Shot 2015-03-19 at 10.27.13

The Motor Control block controls how the car moves forward, right, left and stop based on commands from the CoAP interface block. You can read more about this in the previous blogpost about the car. The HC_SR04_Ultrasound block interfaces the distance sensor and stops the car if it is too close to an object/wall.  Here you can see the block magnified.

Screen Shot 2015-03-19 at 11.11.59

The information from the distance sensor is also sent via the CoAP interface block for remote viewing. The MQTT interface block communicates with the camera and publishes pictures to the MQTT server. This is what the block looks like inside

Screen Shot 2015-03-19 at 10.42.53

The Grabber block interfaces the camera and takes a new picture as soon as it is ready, resulting in a stop-motion like video. The pictures are converted to JPEG format in the Convert Image block and published to the MQTT server in the MQTT publish block.

We did experience some problems with the range and the stability of the WiFi connection. To compensate for this, the Timeout block was added to make the car stop if the car loses its connection with the remote application for more than 3000ms.

Hardware problems are time-consuming to fix and due to time-limitations we did not try alternative options for connectivity. It could be interesting to see how bluetooth performs. In addition we experienced that motors seem to interfere with the Raspberry Pi power supply causing occasional Raspberry Pi collapses.

The remote console application running on a laptop computer was also implemented using Reactive Blocks. This application lets you control the car with buttons and view the image stream together with data from the distance sensor

Want to see the details of the Reactive Blocks implementations for this project? Join the  IoT-challenge team and download the complete modifiable Raspberry Pi car application. Got some new ideas? We will be happy to hear from you.

Comments 1

  1. Pingback: Open IoT Challenge – Final submissions | Benjamin Cabé

Leave a Reply