Prvé vydanie

Obstabot

A robot that drives around and dodges walls by itself. Your first build, done in one evening.

Náročnosť
Beginner
Čas stavby
2 to 3 hours
Digitálny návod 12 €
Objednať e-mailom

Do jedného dňa ti pošleme platobné údaje (prevod alebo PayPal) a hneď po platbe ti súbory pošleme e-mailom.

PDF, kód a 3D súbory dostaneš e-mailom. Cena vrátane všetkých daní.

Stavebnica so súčiastkami 40,10 €

Stavebnica obsahuje aj návod. Dajte mi vedieť, keď bude stavebnica pripravená.

Obstabot, a small 3D-printed robot with an ultrasonic sensor

Balík Začni s robotikou

Všetko pre tvojho prvého robota, ktorý jazdí sám: kurz pre začiatočníkov, návod na stavbu Obstabota a stavebnica Obstabot so všetkými dielmi.

Samostatne 79,10 €59 €

Objednať e-mailom

Kurz a návod prídu e-mailom hneď po platbe. Stavebnicu pošleme, hneď ako budú stavebnice pripravené; dátum a cenu poštovného ti vopred napíšeme e-mailom.

Vyskúšaj pred kúpou: prvá lekcia každého kurzu a prvá kapitola každého návodu sú zadarmo.

Táto stránka ešte nie je preložená, preto je zobrazená v angličtine.

Čo dostaneš

  • Illustrated PDF build guide, chapter by chapter
  • Complete MicroPython code with comments, a servo calibration tool and unit tests
  • Wiring table with every pin, including the voltage divider that protects the ESP32-C3
  • Parts list with Slovak and EU shops and cheaper alternatives
  • The 3D print file for the body and wheels
  • Three challenge upgrades: edge detection, speed control, a second sensor

Pre koho to je

Complete beginners from about 12 years old (with an adult) and anyone who has never written code for hardware. You need a computer and a USB cable; no soldering if your board has its pins attached.

Obstabot is the smallest complete robot: an ESP32-C3 board is the brain, an ultrasonic sensor measures the distance to the nearest wall, and two continuous-rotation servos drive the wheels. When something is too close it backs up, turns, and finds a free path.

You learn the three things every robot does, sense, decide, act, with code you can read line by line.

Súčiastky, ktoré potrebuješ

  • 1× ESP32-C3 SuperMini development board
  • 1× HC-SR04 ultrasonic distance sensor
  • 2× Continuous-rotation micro servo, 360° (Feetech FS90R or 'SG90 360°')
  • 1× Solderless breadboard, 170 points (mini)
  • 8× Dupont jumper wires male–male 20 cm (pack of 40)
  • 4× Dupont jumper wires male–female 10 cm (pack of 40)
  • 3× Resistor 1/4 W (any one value, pack of 20)
  • 1× USB-C data cable 1 m (USB-A to C)
  • 1× Body 3D
  • 2× Wheel 3D

Nie je v stavebnici

  • USB power bank (5 V, any small one)
  • Hot glue gun
  • Soldering iron

Úplný zoznam s obchodmi a lacnejšími alternatívami je v návode.

Pozri sa dovnútra

Prvá kapitola návodu, zadarmo na čítanie.

What you are building and how it works

Obstabot is a small robot that drives forward until something is in its way, then backs up, turns and drives on. Every robot, from a vacuum cleaner to a Mars rover, does the same three jobs in a loop:

JobIn ObstabotPart
Sense“How far is the nearest wall?”HC-SR04 ultrasonic sensor
Decide“Too close? Back up. Close? Turn. Clear? Drive.”ESP32-C3 SuperMini running MicroPython
ActTurn the two wheelstwo continuous-rotation servos

The loop runs about 15 times per second. That is fast enough that the robot reacts before it hits the wall.

Sense: how a sensor measures distance with sound

The HC-SR04 has two round “eyes”. One is a tiny loudspeaker, the other a microphone. It sends a short click of sound at 40 kHz (too high for you to hear), and the microphone listens for the echo. The ESP32 measures how long the echo took.

Sound travels about 343 metres per second. The click goes to the wall and back, so:

d=t⋅343 m/s2d = \frac{t \cdot 343\ \text{m/s}}{2}

With the time in microseconds and the distance in centimetres this becomes the number you will see in the code: d = t / 58.2.

Ultrazvuková ozvenaZvuk je spomalený asi miliónkrát.
Pin echo je v 1 počas
1166µs
Zvuk prejde
40cm

t = 2 × d / 343 m/s, so d [cm] = t [µs] / 58.2

Decide: three distances, three actions

DistanceWhat Obstabot does
less than 5 cmback up for a moment, then turn
5 to 15 cmturn on the spot until the path is clear
more than 15 cm (or no echo)drive forward

The guide’s code adds two small ideas that make the robot much less silly:

  • it alternates the turn direction, so it does not spin into the same corner forever,
  • if it turns for more than 3 seconds without finding space, it backs up and tries again.

Act: wheels that spin all the way round

Normal hobby servos turn to an angle and stop (0° to 180°). Obstabot uses continuous-rotation servos: the same pulse that would mean “go to 90°” means “stand still”, a longer pulse means “spin one way”, a shorter one “spin the other way”. The two servos are mounted mirrored, so to drive forward one turns clockwise and the other anticlockwise. The code handles that for you, and a small calibration tool finds the exact “stand still” pulse of your servos.

What is in this guide

  1. What you are building and how it works (this chapter)
  2. Parts and where to buy them
  3. Wiring the sensor and the servos, safely
  4. Putting MicroPython on the board and running the code, line by line
  5. Calibration and troubleshooting
  6. Challenge upgrades: edge detection, speed control, a second sensor
  7. What to learn next

Otázky

Do I need a 3D printer?

No. The guide shows how to build it on a small box or a piece of cardboard too, and a library or makerspace can print the body for you.

Has this robot been built?

The robot in the videos is my own Obstabot. This written guide and its MicroPython code are a first edition and have not been tested on that robot yet. If a step is unclear, write to me and it gets fixed for everyone.

What do the parts cost?

About 20 € from the shops in the guide, plus a USB power bank you probably already have.

How do I get the guide?

Order by email. We reply within a day with the payment details and email you the PDF, the code and the 3D file right after your payment arrives.

Digitálny návod 12 €
Objednať e-mailom

Do jedného dňa ti pošleme platobné údaje (prevod alebo PayPal) a hneď po platbe ti súbory pošleme e-mailom.

PDF, kód a 3D súbory dostaneš e-mailom. Cena vrátane všetkých daní.

Hodí sa k tomu