DIY set

Get started with electronics and programming with the DIY kit for micro:bit. Build your own circuits, control motors, lights, or display data on the display. Learn to read values ​​from sensors and react to the environment - an ideal kit for teaching and home projects. Suitable for beginners and advanced users.

Description

The DIY kit is a universal kit for teaching programming, electronics and the basics of automation. It allows you to implement your own projects - for example, lighting LEDs, working with buttons, controlling servos and motors, measuring light intensity using a photoresistor or displaying data on LED displays. It uses the micro:bit and the MB3 expansion board with a contactless solder pad, which allows for simple and repeated wiring without the need for soldering.

The set is suitable for home DIY, school lessons and clubs. Thanks to the included instructions with tasks, it develops technical thinking, creativity and basic skills in computer science, physics and natural science. It supports programming in MakeCode and Python and is ideal for beginners and advanced users. Thanks to a wide range of components, projects can be further expanded according to your own ideas.

Contact solderless field

The DIY kit is an ideal tool for getting acquainted with electronics and programming. It includes an expansion board for the micro:bit with a solderless contact pad, which allows you to easily connect all the components included in the kit. Thanks to the contact pad, you can easily assemble circuits and learn the functions of individual electronic components without the need for soldering.

At the beginning, it is advisable to first design the circuit layout on a printed contact field plan. Once we have verified the correctness of the connection, we can transfer it to the actual field. The components are connected using dupont wires, which are part of the kit.

Function

The figure on the right shows the arrangement of the connections in the contact array. The connections determine which rows and columns are conductively connected. The power rails marked in red (+V) and blue (–V) run horizontally, while the remaining columns in the main part of the array are connected vertically. This arrangement makes it easy to connect components and saves on the amount of connecting wires.

Schematic symbols

Function

To work in the contact field, it is important to know basic electronic components and be able to handle them correctly.

To start, we recommend creating projects according to the attached diagrams. The electronic diagram serves as a clear diagram of the connection of individual components and helps to understand the structure of the electrical circuit. All electrical engineers use it as a guide. Once you have mastered the basics, you can try to design your own diagram or get inspiration from the Internet.

The figure shows the schematic symbols of the basic components. For each component, its name, the graphic symbol used in the diagrams, and its real appearance are given. For some components, it is necessary to observe the polarity (direction of connection) or the value (e.g. the size of the resistance).

For example, for a resistor, we determine the value using colored stripes. For an LED, it is important to connect the correct polarity - the longer leg (anode) is connected to the positive voltage (+V), the shorter (cathode) to the negative. It is always necessary to carefully verify this information so that the connection works correctly.

LED

Function

A diode is a semiconductor device that allows electric current to flow in only one direction. It has two electrodes:
  • Cathode – negative electrode
  • Anode – positive electrode
Current can only flow in the positive direction, i.e. from the positive anode to the negative cathode.

Specifications

  • Tension: ± 2V
  • Maximum current: 20 mA
  • Performance: 100 mW
  • Diode diameter: 5 mm
  • Beam angle: 20°
  • Diode lens: transparent, green
DIY_LED

Connection

An LED (light-emitting diode) is a component that glows when voltage is applied in the forward direction. It functions as an indicator in a circuit - for example, it lights up when a certain condition is met.
DIY_LED_scheme

Diagram

To connect the LED we also need to use a resistor, because the internal resistance of the diode is very small. This would cause a short circuit. In our case we will use a resistor with a resistance of 470 Ohm. WARNING! Different resistor values ​​need to be used for different LED colors because they create different voltage drops.

Resistor selection

At supply voltage UCC = 3,3V and voltage drop across the diode UF = 2V left for resistor UR = 1,3V, because it is connected in series. According to Ohm's law, we calculate the resistance for the required current - the maximum current through the diode is higher than the micro:bit pin can handle (max. 5 mA), so we choose a lower current, e.g. 3 mA. Calculation: R = UR / I = 1,3 / 0,003 = 433,3 ΩThe nearest higher value from the resistance series is 470 Ωwhich we will use.

Warning: Different resistor values ​​need to be used for different LED colors because they create different voltage drops.

DIY_LED_connect

Programme

Basic program

The sample program is very simple. It is a warning light that flashes with a period of 0,5 s. We connect the diode to pin P0. So we repeatedly write logical 0 and logical 1 to it with a time interval of 500 ms.

Button

Function

This button is designed for easy and reliable use in various electronic devices. It has a compact size and low profile, which allows it to be easily integrated into printed circuit boards. It is equipped with a microswitch that ensures accurate and reliable detection of pressing. Thanks to this, the button responds sensitively to user inputs.

The function of the button is simple - when released, the circuit is open, when pressed, the circuit is short-circuited and connected. This behavior is also clearly shown in the schematic symbol.

Specifications

  • Switch type: microswitch
  • Number of positions: 2
  • Maximum load: 0,05A / 24VDC
  • Mechanical durability: 1 cycles
  • Button height: 5 mm
handyman_BUTTON

Connection

The button simply connects two points in the circuit - when pressed, it creates a connection between the micro:bit pin and power (or ground, depending on the wiring).

kutil_BUTTON_scheme

Diagram

In this case, it is enough to place the button between pin P0 and the ground – pin GND. Pressing it will cause a short circuit, which in this case does not pose a danger to the micro:bit, because these GPIO type pins are adapted for this use.

kutil_BUTTON_zapojeni

Programme

Basic program

In order to detect a short circuit caused by pressing the button, we need to add a block to the beginning of the code to set the P0 pin to high. This means that a voltage of 3,3 V will appear on the pin. If we did not use this block, there would be no voltage on the P0 pin and we would connect ground to ground. Therefore, the micro:bit would have no way of detecting whether the button is pressed.

Potentiometer

Function

A potentiometer is a special type of resistor that is used as a sensor. With it, we can control electrical circuits, especially controlling volume, brightness, speed and other parameters. This potentiometer is equipped with one channel with a resistance of 10 kOhm. It is designed for easy wiring and mounting on printed circuit boards. It has a standard size and is a typical rotary potentiometer with 3 terminals.

A potentiometer is basically a resistor whose resistance can be adjusted by turning the knob. More precisely, it functions as a voltage divider, where we set the ratio of the resistors. The nodal point between the resistors is a slider, which is connected to the knob that we turn.

Specifications

  • Potentiometer type: axial
  • Value: 10 kΩ
  • Progress: linear
  • Rotation angle: 300°
  • Performance: 125 mW
handyman_POTT

Connection

A potentiometer is used to continuously adjust the resistance in a circuit. By turning the shaft, the resistance value between the middle terminal (output) and the outer terminals (power and ground) changes, thereby regulating the voltage or current in a given part of the circuit.
DIY_POTT_Scheme

Diagram

We connect one leg to the 3,3 V power pin (3V3) and the other leg to ground (GND). The third leg will be our control signal. If we turn the potentiometer all the way to the right, we will measure a full 3,3 V, if we turn it all the way to the left, we connect it to ground and measure 0 V.
kutil_POTT_connection

Programme

Basic program

The micro:bit is also able to measure analog values, not just logical 1 and 0 (on/off, lit/unlit). We will measure voltage on pin P0. The maximum value of the measured voltage is 3,3 V, which is read as 1023. The minimum value of 0 V is read as 0.

To better represent the measured voltage level, we will use the bar graph block from the LED screen library. The displayed value is the number read from pin P0. The maximum value is 1023.

Transistor BC547

Information

This is an NPN type bipolar transistor. It is often used in electronic circuits to amplify signals or control current.

This transistor has the ability to switch and regulate electric currents in circuits connected to its electrodes. It is suitable for various applications, such as the manufacture of amplifiers, switches or voltage stabilizers. It is characterized by low gain, low oversaturation voltage and is easily available.

Function

The basic property of a transistor is its ability to amplify – a small current at the input causes a large current at the output. If a small current flows into the input, a current 200 to 800 times greater than the output can flow (depending on the type of transistor).

If we reach the maximum current value at the output, the transistor will turn off. amplification mode gets to switching mode. Then we say that the transistor is saturated. Any increase in input current will no longer change the output current.

Specifications

  • Transistor type: NPN
  • Maximum current: 100 mA
  • Maximum voltage: 45 V
  • Amplification: from 200 to 800

Connection

A transistor has 3 electrodes (legs): base, emitter, and collector. The base is the control electrode, which represents the input to the transistor. The emitter and collector are the controlled output electrodes.

Bipolar transistors are controlled by the current flowing into the base. Therefore, a resistor must always be connected to the base electrode.

Diagram

To demonstrate the function of a transistor, we need to connect other components to it. Therefore, we will move on to the next chapter – Laser diode.

Using

For example, if we wanted to control a laser diode, we cannot connect it directly to the micro:bit pin because this output is very weak and is only used for control. Therefore, we have to use a transistor. Thanks to it, the output pin is only used for control and the laser diode can be connected to the power supply.

Laser diode

Function

This is an electronic device that generates a thin beam of laser light. This laser is powered by a voltage of 3 V. Its optics focus the light to a single point, other types can create different patterns and effects.

It is important to remember that laser equipment must be used with caution and under adult supervision, as direct contact with the eyes can be dangerous.

A laser with optics is generally used in presentations, demonstrations of optical principles, and more.

Specifications

  • Power supply: 3 V
  • Laser color: Red (650nm)
  • Laser class: IIIA
  • Output power: < 5 mW
  • Beam shape: bod
kutil_laser_S

Connection

A laser diode is an electronic component that emits a narrow and focused beam of light, usually in the red region of the spectrum. Unlike conventional LEDs, it produces coherent light, which is suitable for precise aiming, optical transmissions or distance measurement.

Diagram

According to the prepared diagram, we connect the laser diode and the resistor in series on the contact field. The resistor serves to limit the current and protect the laser diode. We connect the wire from the P0 pin of the micro:bit to the node point of the series connection, which we will use to control the laser diode.
diy_laser_connection

Programme

Basic program

For simple control of the laser diode we can use the A and B buttons on the micro:bit. When pressing the A button, we set the P0 pin to logic 1. When pressing the B button, we set the P0 pin to logic XNUMX.

Transistor BD911

Information

This is again a bipolar NPN transistor, but it is designed for higher voltage and can transfer a higher current value. Compared to the BC547, it is larger and has a metal back, thanks to which it can be cooled better. In addition, it has the option of mounting an additional heat sink.

Again, it is used in devices such as amplifiers, switches, voltage stabilizers, and more.

handyman_bd911

Connection

It should be noted that this transistor has a different electrode arrangement than the previous BC547. To test higher amplification, we will not use a laser diode, but will test a speaker. 

Speaker

Function

A loudspeaker is a device that converts electrical energy into mechanical energy in the form of vibrations. These vibrations travel through the air and affect the eardrums. This loudspeaker therefore produces audible sounds when we send an audio signal to it. You can find loudspeakers in every device that produces sound. Examples include mobile phones, televisions, radios, public transport and more.

Specifications

  • Impedance: 8 Ω
  • Performance: 0,5 W
  • Dimensions: 36 × 5 mm

Connection

A loudspeaker is an electromechanical component that converts electrical signals into sound. It uses a magnet and a coil to move a diaphragm, which creates pressure waves in the air - audible sound. It is used to reproduce music, voice, or other audio output in various electronic devices.

kutil_repro_schema

Diagram

To generate a sufficiently loud signal, we will need an amplifier. We will create this using the BD911 transistor and the potentiometer from the previous chapters. The potentiometer will allow us to set the desired volume, while the transistor will allow us to amplify the weak signal coming from the micro:bit pin.
DIY speaker hookup

Programme

Basic program

The Music library contains blocks that generate an audio signal. This is played using the built-in speakers in the micro:bit, but is also sent to pin P0. However, we have our own speaker, so we will turn off the built-in one. In the main loop of the program, we will work with the Logic library. If button A is pressed, a signal of the selected tone is sent to pin P0. Next, if button B is pressed, a different signal is sent. Finally, if no button is pressed, all sounds stop playing. Instead of tones, you can choose melodies and sounds from the library, or directly make your own!

DC engine

Function

This is a DC motor that operates in the voltage range of 3 to 5 Volts. The motor is capable of reaching speeds of up to 18,000 revolutions per minute (RPM). This motor is compact in design and easily integrates into various electronic projects. The DC motor is often used in model making, robotics, electronics, and other fields. Its power and speed make it suitable for driving small vehicles and other mechanical devices.

Specifications

  • Tension: 3-5 V
  • No-load current: 0,35-0,4A
  • Number of revolutions: 18 000 RPM
  • Body diameter: 20 mm
  • Axle diameter: 2 mm

Connection

A DC motor is an electromechanical component that converts electrical energy into rotational motion. It works on the principle of the interaction between a magnetic field and a current flowing through a coil, which causes a shaft to rotate. It is used to drive wheels, fans, or mechanical parts in various electronic and robotic devices.

Diagram

The DC motor is again a device that consumes a large amount of current. Therefore, if we want to control it with the micro:bit, we need to use the BD911 transistor. We connect a 47 Ohm resistor to the base (B) of the transistor, since this transistor has a low gain and needs a larger amount of current. We connect the other leg of the resistor to pin P0. We connect the emitter to ground (GND) and the collector (C) to one electrode of the DC motor. We connect the other electrode to the 5 V pin. Attention! The DC motor can have a large mechanical resistance, if it does not spin when you connect it, try to spin its shaft with your fingers. Once it gets over the initial mechanical resistance, it can maintain speed.

Programme

Basic program

In order not to load the micro:bit output for too long and not overheat the transistor, we will want to spin the motor only if button A is pressed. We will do this using a logical condition in which we check whether button A is pressed. If so, we will write the value 0 to the output pin P1. If not, we will write 0.

LED RGB

Function

This diode allows you to emit light in three primary colors: red, green, and blue. By combining these three colors, it is possible to create different color shades and intensities based on controlling the voltage of each channel.

Specifications

  • Diode type: LED
  • Diode color: RGB
  • LED current: 20 mA
  • Voltage (red): 1,8 - 2,6 V
  • Voltage (green): 2,7 - 3,6 V
  • Voltage (blue): 2,7 - 3,6 V
  • Diameter: 4,9 mm

Connection

An RGB LED is a light-emitting electronic component that combines three colored diodes – red, green, and blue – in a single package. It allows you to create different colors of light depending on the intensity of each component. By controlling each color separately, a wide range of colors can be achieved. RGB LEDs are used for visual signaling, color effects, and lighting in electronic and programmable projects.

Diagram

The diode has 4 legs, 3 of which are anodes of each color channel and 1 cathode. Each channel of the RGB diode has a different operating voltage. Therefore, we must use a different resistor for each channel so that the light intensity of each channel is the same. The calculation of resistor values ​​is given in an earlier chapter, which deals with the LED itself. The cathode must be grounded for the diode to function.

Programme

Basic program

The sample code is very simple. The RGB LED has 3 channels, which we control with individual pins. We will use the micro:bit buttons to control these pins by writing a logic 1 or logic 0. We can also use the micro:bit logo to turn off all channels.

7-segment LED display

Function

This display is equipped with seven segments that allow you to display various numbers and symbols. The green color of the LEDs provides a contrasting and readable output. The display is suitable for various applications, including digital clocks, measuring and displaying values ​​in electronics, and other similar devices. With a clear and legible display, this display is easy to read even in different lighting conditions.

Specifications

  • Display type: LED
  • LED voltage: 1,8 V
  • Display type: 7-segment
  • Character height: 14,2 mm
  • Color: Green
  • Number of characters: 1

Connection

LED 7-segment display is an electronic component used to display numbers and simple characters. It consists of seven LED segments arranged in the shape of the number "8", which can be lit individually. The combination of lit segments creates individual digits. The display is used in measuring instruments, clocks, calculators and other projects where a clear numerical display is needed.

Diagram

The connection is very similar to that for RGB LEDs in the previous chapter. However, here we will turn on individual segments instead of color channels. Each segment is backlit by its own LED, so it also requires its own resistor in series. The resistor value for one channel is 270 Ohm. To be able to recognize which pin you use to turn on which segment, connect it according to our diagram. The middle legs on both sides of the display are cathodes, so we will connect at least one of them to the ground pin GND. The other legs are anodes of the diodes inside the display. We will connect them through a resistor to the control pins P0, 1, 2, 8, 9, 13, 14, 15.

Programme

Basic program

In the test program, we will display the name of the button we are pressing, i.e. when pressing button A, the letter A will be displayed and the same for button B. We will also add the option to turn off the display by pressing both buttons at the same time.

LED display TM1637

Function

This display is used to display values ​​in the form of numbers or characters. Unlike the previous display, this display has the ability to display up to 4 characters next to each other. In addition, there is no need to worry about connecting individual segments and their subsequent control. The display is equipped with its own unit for communication with the micro:bit. Connection then becomes very easy.

It is suitable for displaying values ​​of electrical and physical quantities, such as time, voltage, current, and others.

The display can be connected to the OMG Robotics expansion boards MB1, MB2 and MB3 using Dupont wires, making it much easier to connect to the micro:bit.

Specifications

  • Power supply: 3-5 V
  • Number of characters: 4 characters
  • Body dimensions: 66 × 27 × 10 mm
  • Display dimensions: 50 × 19 × 7 mm
  • Backlight color: Red
  • Weight: 15 gr

Connection

Diagram

Using four Dupont wires, you just need to connect the display to the power supply (3V3) and ground pin (GND). The other two pins are used for communication.

Pin description:

  • CLK (clock): pin for clock signal (I2C communication)
  • DIO (data): data pin (I2C communication)
  • VCC (voltage): positive pin for power supply
  • GND (ground): negative pin for power, ground

Programme

Basic program

We will need a library TM1637, which is already imported in the test program.

Initialization

In the first step, you need to create an object tm, which represents our display. When creating the object, we define the pins for communication - according to the diagram, these are the pins P0 for data signal (DIO) and P1 for the clock signal (CLK). Next, we set the backlight intensity (maximum 8, default is 7) and the number of characters the display will display (LED count).

We will also create a variable pocet, which will store the number of times the A button is pressed. Then we call the function turn on, which activates the display. We need to pass the object to the function tm.

Displaying values

To display the values, we will use the function show number, which works similarly to the micro:bit display command from the core library. We pass a variable to the function pocet.

Number of presses

We will use the block When pressing the A button, in which we will be the variable pocet add 1. Also try adding a block for button B that starts from the variable pocet subtracts 1.

IR Sensor

Function

This sensor is able to determine whether there is an obstacle in front of it. It works on the principle of a receiver and a transmitter. The transmitter sends a light signal in front of itself. The receiver then detects how much light has returned. If an obstacle appears in front of the sensor, the light is reflected from it and hits the receiver. The signal is in the form of light, but in the infrared spectrum, which is why it is called IR, or infrared.

Such technology is used in industry for automation of production lines, automatic gates, motion sensing and other applications.

The intensity of light may not only change with the presence of an obstacle, but also with the color of the surface from which it is reflected. This allows the sensor to know whether the surface in front of it is white or black.

The sensor is equipped with a potentiometer, which allows us to determine at what intensity its output switches from logical 1 to logical 0. If your sensor is unable to detect the presence of an obstacle, try adjusting this level by turning the potentiometer.

Specifications

  • Sensor: IR diode, IR photodiode
  • Comparator: LM393
  • Logic current: > 15 mA
  • Power voltage: 3-5 V
  • Size: 32 × 14 mm
  • Detection range: 1--15mm

Connection

Diagram

The sensor can be easily connected to the OMG Robotics MB3 expansion board using Dupont wires. The following pins need to be connected:

  • VCC – power supply (3–5 V)
  • GND - the earth
  • DO – digital output for communication with micro:bit

Programme

Basic program

First, we set the P0 pin to high. In the main loop, we will detect whether the sensor connected to P0 is reading a logic 1 (open) or a logic 0 (short). We will then display this information on the micro:bit display.

Light sensor

Function

This sensor is able to determine how much light falls on it. For example, it can determine whether there is an obstacle in front of it. It measures the light intensity using a photoresistor, which is described in the previous chapter. The change in the resistance of the photoresistor is measured directly on the sensor and this information can be read at its output. Such technology is used in industry in the automation of production lines, automatic gates, motion detection and other applications. The sensor is equipped with a potentiometer, which allows us to determine at what intensity its output switches from logical 1 to logical 0. If your sensor is unable to detect a change in lighting, try adjusting this level by turning the potentiometer.

Specifications

  • Sensor: photoresistor
  • Comparator: LM393
  • Logic current: > 15 mA
  • Power voltage: 3-5 V
  • Size: 32 × 14 mm

Connection

Diagram

The sensor can be easily connected to the OMG Robotics MB3 expansion board using Dupont wires. The following pins need to be connected:

  • VCC – power supply (3–5 V)
  • GND - the earth
  • DO – digital output for communication with micro:bit

Programme

Basic program

We will use the same program as for the IR sensor. First, we will set the P0 pin to high. In the main loop, we will detect whether we are reading a logic 0 (open) or a logic 1 (short) from the sensor connected to pin P0. We will then draw this information on the micro:bit display.

Servomotor

Function

A servo motor is a type of drive that can precisely adjust the rotation or speed. In our DIY set you will find continuous servo motors (marked with an orange sticker) that can control the speed. Their advantage is their compact dimensions, so they can be used to drive robotic vehicles.

Specifications

  • Operating voltage: 3-7,2 V
  • Wire length: 150 mm
  • Speed: 0,12 sec / 60 °
  • Torque: 1,2 kg cm
  • Temperature range: -30 to 60°C

Connection

Diagram

Our expansion boards are designed to make connecting servo motors very easy. Simply plug a single Dupont connector directly into the expansion header so that the brown wire is on the GND pin.

Programme

Basic program

The MakeCode environment contains a native library directly for controlling servo motors. However, if you are building our robotic vehicle, you can use our library, which you can find on the page of any vehicle or tank. The values ​​that we can send to the servo motor are in the range of 0 - 180. Since we are working with continuous servo motors, we must take into account that it can rotate in both directions. Therefore, the value 90 corresponds to the idle state, when the servo motor does not rotate. Values ​​in the range of 90 - 180 correspond to rotation at a given speed to one side, 90 - 0 to the other side. We will test this property in the sample program. At the beginning of the program, we stop the motors for safety. If button A is pressed, the motor will rotate to one side. However, if button B is pressed, the motor will rotate to the other side. If neither button is pressed, the motor will stop.

IR diode and IR photodiode

IR diode

The IR diode works the same as an LED, the main difference is
the radiation it emits. We are not able to detect this type of radiation
visible to the human eye, as it is in the infrared range
spectrum.

IR photodiode

An IR photodiode differs from a classic photodiode in exactly the same way. It reacts only to infrared radiation. A classic diode is transparent in only one direction. If radiation of a given spectrum falls on a photodiode, it becomes transparent to electric current in the reverse direction as well. We use this phenomenon in the manufacture of our infrared trap.

Specifications

  • Diode diameter: 5 mm
  • Performance: 100 mW
  • Beam angle: 20°
  • Diode lens: transparent, blue

Connection

An IR diode and an IR photodiode are electronic components used to detect objects using infrared light. An IR diode emits invisible light radiation, while an IR photodiode detects the light reflected from an obstacle. If the light falls back on the photodiode, the circuit evaluates the presence of an object.

Diagram

First, we need to turn on the IR diode. Together with a 470 Ohm resistor in series, we connect it to the 3V3 power pin. Again, we are careful to orient the diode correctly, i.e. connect the short leg (cathode) to ground. Next, we will measure the voltage on the resistor that is connected to the photodiode. As soon as IR radiation begins to fall on it, the diode opens the transition between the cathode and the anode (closed direction) and current begins to flow through the resistor. This causes a voltage to appear on it, which is detected by the micro:bit pin. We choose a 2 kOhm resistor on which we measure the voltage so that an unnecessarily large current does not flow through it.

Programme

Basic program

In the sample program, we will only read the logic value on pin P0. If our trap detects an object that interrupts the signal between the transmitter and receiver, the display will light up.

Gallery