Main Content

Introduction

This project has the intention to solve to prevent accidental death by stepping on LEGO bricks.

How many times have we been barefoot in your house? Thinking about your future prospects, suddenly and without warning, you step on a LEGO brick, generating pain just comparable to a blow to the jewels of the family.

We seek the answer to this serious problem, and LEGO is no stranger to the solution, they have created slippers just for that purpose:

All rights reserved to LEGO.

https://www.amazon.com/finally-makes-slippers-protect-parents/dp/B0184LJJ3U

In addition here is an article that supports this thesis:

https://qz.com/366858/legos-are-so-painful-to-step-on-because-of-physics/

There are even people who are capable of doing this out of charity:

All rights to Dailymail.

https://www.dailymail.co.uk/video/news/video-1616382/Man-walks-bare-foot-120-feet-legos-charity.html

In order to protect yourself from this horror you need nerves of steel and pain immunity.

We have to solve for this calamity!

This has to stop!

And Sony has my back on this.

Solution

We are going to build a robotic car that is capable of collecting the pieces of lego that are detected by vision algorithms, and will use ultrasonic sensors to give the robot more autonomy.

It would be quite different from the current solutions, because it’ll be a robot that will literally go looking for the pieces of LEGO, and will pick them up so that its owner will not be harmed by them.

The robot is based around a car-rover, the Spresense development board will control the engines through a DC motor driver. A sweeper will be used to collect the pieces of lego, this will be made in turn with three servos and 3D printed parts (or laser cutted). To control the car, we will use ultrasonic sensors to prevent the car from crashing into walls or obstacles.

In addition to just motor control, we will use a camera in the Spresense board and its smart image recognition capabilities, to scan the terrain and detect the LEGO bricks, which in turn will be collected and placed in a safe spot. If the car is incapable of picking up the piece, if it is too big or whatever, the system will send an alert to its owner, notifying that there is a dangerous piece of lego that could not be collected and threatens his livelihood.

Main features I want for the system:

Semi-autonomous (BLE control?)
Full autonomy
Accurate brick recognition.
Light
Compact design
Kid-friendly
WiFi connectivity and notifications (maybe I’ll add a Raspberry Pi Zero and connect it to cloud!).

It has to look cool.

It has to protect those you love.

For a long time I was thinking how to design the Robot in relation to autonomy and for it to look awesome and I reached a conclusion: A robotic arm to collect the bricks will seldom work and it is quite cumbersome to code for, too many precise movements and if it fails you look like a donkey.

But then I recalled images from a long ago, when I was a little boy.

1 / 3 Ohh yeah boy. Seems to do the job.

A BULLDOZER!

It looks waaaay cooler than a rover with a puny robotic arm.

Imagine doing that kind of work with an arm. (Children do not leave only just one lego around)

Your inner child comes forth.

Your inner destroyer also comes forth.

So for now we have a couple of tasks:

Seek, identify and destroy any brick (with the Camera board on top of the future Bulldozer)

Bulldoze those puny bricks to a safe spot where they can’t harm anyone.

But we have to build it, and for that I go on to:

Design

Long ago, I purchased a chassis to do a Microcontrollers final project, believe it or not I had to code that, only with Assembly language and an ATmega 16. Yeah, cry for me. But now it gets to be upgraded to the Ultimate in ARM technology, Computer Vision, full autonomy, a whole bunch of sensors, and motors and perhaps the most important thing, a complete makeover!

Spresense Boards

By now there are several guides and tutorials on how to start with the board such as:

https://developer.sony.com/develop/spresense/developer-tools

I would recommend to stck with the official sources at first.

So I’m just going to share some tips:

Tip #1: When getting the main board out, unpack it in a low light room or have it facing down like in the image:

Unpack the board and have it facing down, before you put the shading seal on.

Next, while still facing down put it inside an envelope or a box, and put the shading seal while inside the box/envelope.

1 / 3

All this to protect the light-sensitive elements of the board, as these can be easily destroyed with bright light.

Tip #2: After burning the bootloader and uploading the example sketch, the board might not be recognized. Don’t panic just unpug and re-plug the USB and try again.

Tip #3: Get some gloves to move around the camera, you want this to last a long time and also place some anti static protection on the boeard’s bottom side.

Not pictured: anti static protection, just use an antistatic bag like the ones that came with the boards.

Tip# 3:

I have to praise the amazing packaging and value of each of the components, and especially to Sony’s package engineers. These are top of the line quality boards and the premium price is worth it. By the way, is Sony telling us something?:

Where’s the Trigger?!!! I mean: Where is the last board Sony?!!

Step One: Just Bluetooth Control

In order for it to later adapt to bigger needs we first need to control the proto-Bulldozer via the Spresense board and a Bluetooth Module. Later we will add the other features.

These are the materials you need for this step:

The HC-06 Bluetooth module, the Motor driver based on the L298D, 4 DC motors, A base for your car, the Spresense board, USB cable, and a bunch of jumpers.

You have to follow the next diagram for the connections:

Important note!: Some Bluetooth modules are rated at 3.3V at RX/TX so just do a voltage divider with a 1k resistor and a 2k resistor, 2k going to ground, the RX pin receiving the divider and the 1k to the TX of the Spresense.

Apart from that I recommend that to send Bluetooth info you download the Arduino Bluetooth Controller Application but any other works.

1 / 2 Arduino Bluetooth Controller

For the Spresense code you can find the Spresense simple code at the bottom and simply (no pun intended) upload it to the board, but you need to Understand several things about the Spresense that are different from an Arduino. Let’s call it the second round of tips:

#1: The Spresense calls the USB serial monitor from the connected cable: “Serial”, and the TX/RX pins are: “Serial2”.

#2: All the pins in the Spresense are “pulled up” so it might change your normal logic a little.

#3: The code is as simple as it gets, but try to understand every step while you read it.

So we have it functioning like this, I intentionally just allocated everything on top as i’m going to be building a case for it. (Remember it has to look cool as hell)

If you stop at this point just make it look better :P.

Now that we know the basics work, its time to upgrade and go to the fun part!”

Link to article