Robot on unicycle

Robot on unicycle

Story

The sport of unicycling is an emerging competitive sport. The sport of unicycling has gone through a process of development from amusement to the acrobatic stage and then to the sports field. At present, the sport has spread to 220 countries and regions around the world, and the world unicycle competition has been held 6 times. In August this year, the 7th World Unicycling Championships were held in New York, USA. Unicycling is very beneficial to improve strength, speed, endurance, agility, flexibility, and other physical qualities, and can improve overall balance, mediation muscle tension, etc. Now, we make a unicycle device with block pellets and use micro:bit, Nezha Breakout Board , and PlanetX sensors so that the acrobat in the unicycle device can move around in a circle and record the number of laps.

 

Case Display

 

Required Items

micro:bit*1

 

Nezha Breakout Board

 

motor

 

Ultrasonic sensor

 

PlanetX Segment Sensor

 

 

Building Steps

Step 1

Use a 5x7 hole arm ring/ring beam, 5-hole beam, and double bolt connector to fix the block motor

 

Step 2

Use a 5x7 hole arm ring, four bolts, and three holes right angle connection, H-shaped hole wall reinforcement device base, increase the force area.

 

Step 3

Use pins and 3x5 L-arms to strengthen the structure of the device to avoid shaking of the device.

 

Step 4

Build the rotating shaft that connects the unicycle acrobat, which is also the structure that provides power to the unicycle acrobat. Note that the two pins on the right side of the yellow beam do not need to be connected to the white 5-hole beam below.

 

Step 5

Install the ultrasonic sensor, digital tube display, Nezha Breakout Board, and micro:bit.

 

Step 6

Build the rotating shaft installed above the motor and add a counterweight to make the whole device more solid.

 

Step 7

Build a one-wheel structure, using a 7-hole shaft connected to the tire and add the sleeve.

 

Step 8

Build the legs of the acrobat and connect the 2 5-hole shafts to the tires through cross-shaft connectors.

 

Step 9

Build the body parts of acrobats.

 

Step 10

Build acrobatic legs, the use of movable connecting pins, so that the legs float up and down with the device's movement.

 

Step 11

Build acrobats' hands and replace them with similar structural parts.

 

Step 12

Build the head of the acrobat, the head replaced by a 40-tooth gear.

 

Step 13

Overall effect.

 

Programming

Go to the makecode programming platform, click on extensions, and search for "PlanetX" and "Nezha" to add two program extension libraries.

 

First let the motor move, use the macro: bit motherboard A, B button to control the motor to start and stop, of course, if you want the unicycle to go around faster, you can also increase the motor speed percentage, but also take into account whether the ultrasound can identify such a fast object!

 

The next step is to write a program for the ultrasonic sensor to identify the unicycle, so that every time the unicycle passes through the range identified by the ultrasonic sensor, the number displayed on the digital tube display will increase by 1. The reason for adding "wait for 300ms" is to avoid the ultrasonic sensor identifying too high a frequency and causing the display to increase by a number that does not match the number of laps.

 

Finally, some initialization commands are made to the program of the whole system. Note that the program sets up the ultrasonic sensor to connect to the J4 interface of the Nezha expansion box, the digital tube display to connect to the J1 interface of the Nezha expansion box, and the motor to connect to the M4 interface of the Nezha Breakout Board.

 

Total Programming

 

Programming Link:

https://makecode.microbit.org/_L9F2jK165RDD