KS0361(KS0365) keyestudio 37 in 1 Starter Kit for BBC micro:bit

keyestudio 37 in 1 Starter Kit for BBC micro:bit

 

KS0361(KS0365) keyestudio 37 in 1 Starter Kit for BBC micro:bit

Jump to navigationJump to search

Keyestudio 37 in 1 Starter Kit for BBC micro:bit

Note: the micro:bit has beed updated to V2.0 version; therefore, you can get more details for KS0361(KS0365V2.0 basic kit in the following link:

https://fs.keyestudio.com/KS0361-0365

Introduction

micro: bit is a powerful hand-held, fully programmable, computer designed by the BBC. It is only half size of a credit card, available for children’s programming education. Onboard comes with Bluetooth, accelerometer, compass, three buttons, 5x5 LED matrix, USB interface, connection pins. In order to learn micro bit more easier, we particularly make this kit, in which includes a keyestudio sensor shield fully compatible with micro bit and other commonly used sensor modules. In addition, this sensor kit also provides various learning projects for you, including wiring diagram, source code and more. It can help you make learning easy and fun to enjoy the programming.

 

Kit List

Note: The micro:bit main board is Not Included in KS0361 starter kit, but Included in KS0365 starter kit.

No. Product Name Quantity Picture
0 No micro:bit Board in KS0361 Kit
0 With micro:bit board in KS0365 Kit 1
1 Micro bit Sensor Shield V2 1
2 Digital White LED Module 1
3 Red LED Module 1
4 3W LED Module 1
5 keyestudio RGB LED Module 1
6 keyestudio Analog Temperature Sensor 1
7 keyestudio Photocell Sensor 1
8 keyestudio Analog Sound Sensor 1
9 Analog Rotation Sensor 1
10 keyestudio Passive Buzzer module 1
11 keyestudio Digital Buzzer Module 1
12 keyestudio Digital Push Button 1
13 keyestudio Digital Tilt Sensor 1
14 keyestudio Photo Interrupter Module 1
15 Capacitive Touch Sensor 1
16 Traffic Light Module 1
17 Hall Magnetic Sensor 1
18 Line Tracking Sensor 1
19 Infrared Obstacle Detector Sensor 1
20 PIR Motion Sensor 1
21 Flame Sensor 1
22 Crash Sensor 1
23 Analog Gas Sensor 1
24 Analog Alcohol Sensor 1
25 Reed Switch Module 1
26 keyestudio Water Sensor 1
27 Soil Humidity Sensor 1
28 LM35 Linear Temperature Sensor 1
29 Vibration Sensor 1
30 Thin-film Pressure Sensor 1
31 GUVA-S12SD 3528 Ultraviolet Sensor 1
32 1602 I2C Module 1
33 TEMT6000 Ambient Light Sensor 1
34 HC-SR04 Ultrasonic Module 1
35 Joystick Module 1
36 Micro Servo 1
37 Single Relay Module 1
38 Steam Sensor 1
39 F-F Dupont Jumper Wire 40pin 1
40 USB Cable 1
41 Premium Battery Case 6-cell AA 1

 

micro:bit Pins

Before getting started with the following projects, first need to figure out each pin of micro:bit main board. Please refer to the reference diagram shown below.

The BBC micro:bit has 25 external connections on the edge connector of the board, which we refer to as ‘pins’. The edge connector is the grey area on the right side of the figure above. There are five large pins, that are also connected to holes in the board labelled: 0, 1, 2, 3V, and GND. And along the same edge, there are 20 small pins that you can use when plugging the BBC micro:bit into an edge connector.

Note that it read from the BBC micro:bit official website. More reference you can click the link below:
BBC micro bit Pins: http://microbit.org/guide/hardware/pins/
BBC micro:bit website: http://microbit.org/
Micro bit MakeCode Block Editor: https://makecode.microbit.org/
Meet micro:bit starter programming: http://microbit.org/guide/
BBC micro:bit Features Guide: http://microbit.org/guide/features/
BBC micro:bit Safety Warnings: http://microbit.org/guide/features/
BBC micro:bit Quick Start Guide: http://microbit.org/guide/quick/

After mastering the basic information of BBC micro:bit, in the following part let’s move on to programming projects. Use this small board with keyestudio micro bit sensor shield and other sensor modules to make some interactive experiments. Play it and learn it. Enjoy your wonderful time!

 

 

Keyestudio Micro bit Sensor Shield V2:
This shield is very easy for microbit wiring. It breaks out the PI0 ports in the form of 3Pin (GND, VCC, PI0), easy to connect other sensor modules. Also with communication interfaces, like serial port、I2C and SPI pin headers.
You can power the shield via USB connection or external DC power jack (DC7-9V). If power the sensor module, you can control it via two cap V1 and V2 on the shield, with DC3.3V and 5V.
Power the sensor shield with DC 7-9V, and this shield can power the micro:bit and other sensor modules, pretty convenient.

Special note:
when connect external sensor module to the shield for working,the operating current of AMS1117-3.3V and NCP1117ST50T3G chip is too large, so it is easy to get hot. Pay special attention to avoid touching the two chips and causing burns.

keyestudio Digital White LED Module:

This white LED light module is ideal for Arduino starters. It can be easily connected to IO/Sensor shield. It enables some light-interactive works. Specifications:

  • Type: Digital
  • 54 socket
  • Size: 30*20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect LED module to microbit sensor shield, connect the S pin to S pin header, + pin to V1 header, - pin to ground header.

 

Keyestudio Red LED Module:
This keyestudio red LED module has 3 Pins; - pin is connected to ground, + pin is connected to VCC(3.3-5V), S pin is for signal control; you can set the High or Low level to control the LED on and off.

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.
Then connect LED module to microbit sensor shield, connect the S pin to S0 pin header, + pin to V1 header, - pin to ground header.

Example Result
Done wiring and powered up, send the code to MICROBIT, you should finally see an LED on the module gradually become brighter, then gradually dim, circularly just like the LED is breathing.

 

Project 4: Blink and Breath

Overview
In this project, we combine the project 2 and project 3. You will learn how to control the LED on the module blink for two times, then breath for two times, circularly. This time we use keyestudio 3W LED module, which has high brightness and can be used as illumination.
Component Required

  • Micro:bit main board*1
  • Keyestudio Micro bit Sensor V2 Shield*1
  • USB Cable*1
  • keyestudio 3W LED Module*1
  • Dupont jumper wire*3

Component Introduction
Keyestudio 3W LED Module:
This LED module is of high brightness because the lamp beads it carries is 3w. You can apply this module to Arduino or other projects, ideal for Robot or search and rescue application. For example, intelligent robots can use this module for illumination purpose.
Please note that the LED light can't be exposed directly to human eyes forsafety concerns.

Specifications

  • Color temperature: 6000~7000K
  • Luminous flux: 180~210lm
  • Current: 700~750mA
  • Power: 3W
  • Light angle: 140 degree
  • Working temperature: -50~80℃
  • Storage temperature: -50~100℃
  • High power LED module, controlled by IO port of microcontroller
  • IO Type: Digital
  • Supply Voltage: 3.3V to 5V

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect 3W LED module to micro:bit sensor shield, connect the S pin to S pin header, + pin to V1 header, - pin to ground header.

Test Code
If you are not familiar to make code, don't worry. Firstly, you can enter this link:https://makecode.microbit.org/reference to know more about microbit blocks.
Then you can directly enter the https://makecode.microbit.org/ to edit your project program. Below is an example code we have done for you as reference.

Example Result
Done wiring and powered up, send the code to MICROBIT, you should see the LED on the module firstly blink two times, then breath two times, circularly.

 

Project 5: Make a Sound

Overview
In this project, you will learn how to generate a sound with keyestudio digital active buzzer module. Here you can refer to LED blink, in this lesson control the buzzer on and off circularly.
Keyestudio Digital Buzzer Module:
It is the simplest sound making module. You can use High/Low level to drive it. Changing the frequency it buzzes can produce different sounds.
Buzzers can be categorized as active and passive ones. The difference between the two is that an active buzzer has a built-in oscillating source, so it will generate a sound when electrified. The buzzer on this module is an active buzzer.
This module is widely used in our daily appliances like PC, refrigerator, telephones, timers and other electronic products for voice devices. etc.

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect buzzer module to micro:bit sensor shield, connect the S pin to S7 pin header (P7 of micro:bit), + pin to V1 header, - pin to ground header. If input HIGH level to P7 end, buzzer will continue to sound.

i.e. should hear the buzzer module sound and then stop, circularly. It seems like the sound is interrupted.

Passive Buzzer Module:
Buzzers can be categorized as active and passive ones. The difference between the two is that an active buzzer has a built-in oscillating source, so it will generate a sound when electrified. The buzzer used on this module is a passive buzzer. A passive buzzer does not have such a source, so DC signal cannot drive it beep. Instead, you need to use square waves whose frequency is between 2K and 5K to drive it. Different frequencies produce different sounds. You can use micro:bit to code the melody of a song, quite fun and simple.

Specifications

  • Working voltage: 3.3-5V
  • Interface type: Digital

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect passive buzzer module to micro:bit sensor shield, connect the S pin to S0 pin header, + pin to V1 header, - pin to ground header.

i.e.  hear two sounds produced from passive buzzer circularly,  or the song Ode To Joy.

RGB LED Module:
RGB comes from the initials of three additive primary colors, red, green, and blue. RGB LEDs are like 3 regular LEDs in one, how to use and connect them is not much different. They come mostly in 2 versions: Common Anode or Common Cathode. Common Anode uses 5V on the common pin, while Common Cathode connects to ground.
This keyestudio RGB LED module is Common Anode. It can be seen as separate LEDs. LEDs have three different color-emitting diodes that can combined to create all sorts of colors. This RGB LED module is very easy for wiring, with a fixed hole that you can mount it on your any devices..

Specifications

  • Light Color: red, green and blue
  • Brightness: High
  • Voltage: 5V
  • Input: digital level

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect RGB LED module to micro:bit sensor shield, separately connect the B, R,G pin to P0, P1, P2 Analog Input header, ground pin to ground.
If input HIGH level to P7 end, buzzer will continue to sound.

i.e. firstly show three colors, separately red, green and blue light. Then change the color quickly and circularly.

 

Digital Push Button Module:
This is a basic button module. Buttons are a type of commonly used components to control electronic devices. Usually they are used as switches to connect or disconnect circuits to control the operation of electronic devices or other devices. This module integrates a push button on it and with three connection pins. It is very convenient for you connect it to other IO shields.

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect button module to micro:bit sensor shield, connect S pin to S0 pin header, + pin to V1 header, - pin to ground. Shown below.

i.e. When press the button on the module, you should see the LED matrix of micro:bit show the icon like a heart. Otherwise, it will show the icon like this.

 

Tilt Control

When design the circuit, sometimes you will need to test whether an object is tilted left or right, so in this case you can use our tilt sensor. In this project, you will learn how to use our digital tilt sensor to control 5*5 LED of micro:bit display different images.

Tilt Sensor:  This keystudio digital tilt sensor mainly integrates a tilt sensor. The tilt sensor is a component that can detect the tilting of an object.
The principle is very simple. It mainly uses the ball in the switch changing with different angle of inclination to achieve the purpose of triggering circuits. When the ball in tilt switch runs from one end to the other end because of external force shaking, the tilt switch will conduct, or it will break.

Specifications

  • WSupply Voltage: 3.3V to 5V
  • Interface: Digital
  • Size: 30*20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect tilt module to micro:bit sensor shield, connect S pin to S0 pin header, + pin to V1 header, - pin to ground. Shown below.

i.e. When tilt the sensor to the left, you should see the LED matrix of micro:bit show the icon like a heart. If tilted to the right, it will show the icon like this.

 

Photo Interrupter Module:
A photo-interrupter is a sensor that arranges light-emitting component and light-receiving component face-to-face and packages them together. It applies the principle that light is interrupted when an object passes through the sensor. Therefore, photo-interrupters are widely used in many fields like speed measurement, positioning and counting, small household appliances, optical limit switches, object detection and so on.
During the test, if let an object continue to block the notch of photo-interrupter sensor, the module’s signal end will continuously appear High and Low level changes, then we can get the motion state of object through calculating the signal data, thus implement the counting and Speed measurement function.

Specifications

  • Support quick response; highly sensitive
  • With power light and 3-pin interface
  • Supply Voltage: 3.3V to 5V
  • Interface: Digital
  • Size: 30*20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect light interrupter module to micro:bit sensor shield, connect S pin to S0 pin header, + pin to V1 header, - pin to ground. Shown below.

i.e. When cover the notch of sensor with a piece of paper, you should see the LED matrix of micro:bit show the icon like a heart. Or else, it will show the icon like this

 

Capacitive Touch Sensor:
The module is based on a touch detection IC. This module allows you to remove the troubles of conventional push-type buttons. It has low power consumption and wide working voltage.
Powered on, the module requires the stable time about 0.5sec, at the moment all functions are banned to conduct self-calibration, do not touch the key, the calibration cycle is about 4.0sec.
It can be applied to the waterproof electricals, button replacement, etc.

Module features are as follows

  • Jog type: the initial state is low, high touch, do not touch is low (similar touch of a button feature);
  • Low power consumption;
  • Power supply for 3.3 ~ 5V DC;
  • Smooth touch surface
  • 2 positioning holes for easy installation.

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect touch sensor to micro:bit sensor shield, connect S pin to S0 pin header, + pin to V1 header, - pin to ground. Shown below.

i.e. When touch the sensing area of sensor, you should see the LED matrix of micro:bit show the icon like a heart. Or else, it will show another the icon.

Traffic Light Module:
When learning the microcontroller, you may usually use three separate LEDs (red, green and yellow) to simulate the traffic light blinking. In this way you may need more wire connection. We specially design this traffic light module, which is very convenient for wiring. It has integrated three LEDs (red, green and yellow) together on the module. Also breaks out four pin interfaces. There are two positioning holes for easy installation.

Specifications

  • Working Voltage: 3.3-5V
  • Interface Type: Digital
  • 54 Socket

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect traffic light module to micro:bit sensor shield, separately connect R, Y,G pin to S2, S1,S0 pin header, GND pin to ground. Shown below.

i.e.   the green LED lights 5 seconds then off, and yellow LED starts to blink 3 times with an interval of 0.5 second, then off, followed by red LED lights up for 5 seconds then off. Up to this moment, green LED lights again, forming a loop cycle.

 

Magnetic Detection:  Hall Magnetic Sensor:
The main component used in this sensor is A3144E. This hall magnetic sensor can be used to detect a magnetic field, outputting Digital signal. It can sense the magnetic materials within a detection range up to 3cm.
Note that it can only detect whether exists a magnetic field nearby but can not detect the strength of magnetic field.

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect magnetic sensor to micro:bit sensor shield, connect S pin to S0 pin header, + pin to V1 header, - pin to ground. Shown below.

i.e.You can place a magnetic bead near the sensor. When the sensor detects a magnetic field nearby, you should see the LED matrix of micro:bit show the icon like a heart. Or else, it will show the icon like this.

 

Follow Black Line

we will use a tracking sensor combined with micro:bit to detect an object or a black line. You can get the result shown on the LED display of micro:bit.

Line Tracking Sensor:
The tracking sensor is actually an infrared sensor, which can detect a black line. The component used in the sensor is TCRT5000 infrared tube.
Its working principle is to use the different reflectivity of infrared light to the color, then convert the strength of the reflected signal into a current signal.
When sensor detects a black line, the infrared rays are not emitted or the intensity of emitted ray back are not sufficiently strong, so that the sensor’s signal terminal outputs a High level. Otherwise, output a Low level.
In this way, we can judge the detected color by High or Low level of the sensor’s signal terminal.
Note: on the module, you can rotate the potentiometer to make the LED between on and off state. The sensitivity is the best.

Specifications

  • Power supply: +5V
  • Operating current: <10mA
  • Operating temperature range: 0℃ ~ + 50℃
  • Output interface: 3Pin interface
  • Output Level: TTL level
  • Detection Height: 0-3 cm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect tracking sensor to micro:bit sensor shield, connect S pin to S0 pin header, V pin to V1 header, G pin to ground. Shown below.

i.e. When sensor detects no object or detects a black line, the infrared rays are not emitted or the intensity of emitted ray back are not sufficiently strong, so that the sensor’s signal terminal will output a High level, LED on the micro:bit will show the number 1. Or else show the number 0.

 

Obstacle Avoidance        Obstacle Avoidance Sensor:
The infrared obstacle detector sensor is actually a distance-adjustable obstacle avoidance sensor.
It has a pair of infrared transmitting and receiving tubes. The transmitter emits an infrared ray of a certain frequency. When the detection direction encounters an obstacle (reflecting surface), the infrared rays are reflected back, and receiving tube will receive it. At this time, the signal terminal will output Low level.
If no obstacle detected, the infrared ray emitted is weakened by the distance it travels and eventually disappears, so receiving tube cannot receive it and signal end of sensor will output High level.
In this case, it can judge whether there is an obstacle ahead or not.
You can rotate the potentiometer knob on the sensor to adjust the detection distance. The effective distance is 2-40cm and working voltage is 3.3V-5V.

Module features are as follows

  • IO Interface: 4Pin interface (-/+/S/EN)
  • Output signal: TTL voltage
  • Detection distance: 2-40cm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect obstacle detector sensor to micro:bit sensor shield, connect Out pin to S0 pin header, + pin to V1 header, GND pin to ground. Shown below.

Note: for obstacle sensor, you can rotate the two potentiometers on the sensor to adjust its sensitivity. Rotate the potentiometer near the infrared transmitter tube clockwise to the end, and then adjust the potentiometer near the infrared receiver. Sled light is turned off and keeps the critical point to be lit. The sensing distance is the longest. The effective distance of the sensor is within 2-40 cm.

i.e.When sensor detects an object ahead, its signal terminal will output a Low level, and LED matrix on the micro:bit will show the number 0. Or else show the number 1.

 

Someone Comes

Overview  You may see such a lens in a film or television. When someone wants to attack a target, but not close to the target, they were directly found and the alarm sounded. When some special forces go to the target, they will be covered with moist mud, so that they will not be discovered by the other party. Why ?
Originally, the human body will emit a certain wavelength of infrared rays of about 10um. The relevant sensors are installed near the targets that are being attacked to sense the infrared rays emitted by the human body and then alarm. After the mud is applied, the sensors can not sense the infrared rays emitted by the human body.

PIR Motion Sensor:
This sensor can detect infrared signals from a moving person or moving animal nearby, and output High level at signal end. If no detected, output Low level. Note that it can only detect the moving human body, do not detect the body in static. And the detection distance is 3m at most.

Specifications

  • Output Voltage: High 3V, Low 0V
  • Output Delay Time (High Level): About 2.3 to 3 seconds
  • Detection Angle: 100°
  • Detection Distance: 3 meters
  • Output Indicator LED (if output HIGH, it will be ON)
  • Limit Current for Pin: 100mA

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect PIR motion sensor to micro:bit sensor shield, connect S pin to S0 pin header, + pin to V1 header, - pin to ground. Shown below.

i.e. When sensor detects the movement of someone nearby, 25 LED matrix of micro:bit will show the icon like a heart. Or else, it will show the icon like this.

 

 Fire Alarm

When the flame sensor detects a fire, the speaker will alarm people quickly to put out the fire and an active buzzer module to simulate the fire alarm system.

Flame Sensor:
This flame sensor can be used to detect fire or other light sources with wavelength stands at 760nm ~ 1100nm. Its detection angle is about 60°. You can rotate the potentiometer on the sensor to control its sensitivity. Adjust the potentiometer to make the LED at the critical point between on and off state. The sensitivity is the best.
In the fire-fighting robot game, the flame sensor plays an important role in probing the fire source.

Specifications

  • Supply Voltage: 3.3V to 5V
  • Detection angle: about 60°
  • Detection range: 20cm (4.8V) ~ 100cm (1V)
  • Spectral Bandwidth: 760nm to 1100nm
  • Operating temperature: -25℃ to 85℃
  • Interface: Digital

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then separately connect the buzzer and flame sensor to keyestudio micro:bit sensor shield. Shown as below diagram.

i.e. When flame sensor detects the fire nearby, the buzzer module will sound immediately. If no fire detected, the buzzer not beeps.

 

 To The Top

Overview
During the DIY, we may usually use a machine-3D printer. You can use it to print any elements with different structures. And limit switch is essential in the printing, which mainly provides the information whether XYZ axis of printer reach the boundary point.
Keyestudio crash sensor is a limit switch, available for 3D printer. It is in essence the same as button module. When printer reaches the top to crash the spring plate of module, module outputs Low level. If loosen the spring plate, module outputs High.
Crash Sensor:
Crash sensor, also known as electronic switch, is a digital on-off input module. The features are as follows:
1. When collision happens upfront of where crash module is installed, module outputs low level signal; no collision, outputs high level signal.
2. With a mounting hole, convenient for fixation on any devices.
3. PCB size: 3.1cm * 2.1cm
4. With switch indicator light, if there is collision, LED on; if no collision, LED off.

Connect It Up

Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then separately connect the active buzzer and crash sensor to keyestudio micro:bit sensor shield. Shown as below diagram.

i.e.  When the spring plate of crash sensor is pressed, the buzzer module will beep, otherwise buzzer will not sound.

 

Magnetic Switch   In this project, you will learn how to use a keyestudio reed switch module and micro:bit to detect the magnetic field. Finally show the result on the 25 LED matrix of micro:bit. Actually in the project 13, we have used a hall magnetic sensor to detect whether there is magnetic field nearby. So what is the differences between hall magnetic sensor and reed switch module? You can check it in component introduction below.

Reed Switch Module:
The keyestudio reed switch module is mainly composed of a reed switch. The reed switch is a mechanical magnetic switch, a passive device. Its working principle is that the magnetic field magnetizes its reed, so that it can be turned on and off to achieve the switch effect. However, since it is a contact type switch, its working life is limited, and it is easy to be damaged during transportation and installation.
The main component used in keyestudio Hall Magnetic Sensor is the A3144E, which is an electronic magnetic device, active device. And the output form is a switch type. It uses magnetic fields and Hall effects for contactless control purposes. Since the Hall element itself is a chip, its working life is theoretically unlimited.
Reed switch has been widely applied in household appliances, cars, communication, industry, healthcare and security areas.
Furthermore, it can also be applied to other sensors and electric devices such as liquidometer, door magnet, reed relay and more.

  • Connect It Up

Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect the reed switch sensor to keyestudio micro:bit sensor shield. Shown as below diagram.

i.e. When the reed sensor detects a magnetic field nearby, you should see the LED matrix of micro:bit show the icon like a heart. Or else, it will show the icon like this.

 

Single Relay Module:
This module uses a high-quality SONGLE 5V relay. The relay output is by a light-emitting diode, can be controlled through digital IO. It can be used to control lighting, electrical and other devices of high current or voltage.
When supply high voltage to S end, the relay is driven, that is, normally open (NO) connected, normally closed (NC) disconnected.
When supply low voltage to S end, the relay is turned off, that is, NO is disconnected, and NC connected.
In this way, we connect the 220V AC circuit to NO or NC terminal block, more safe and convenient through 5V voltage control.

  • Connect It Up

Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then separately connect both single relay module and white LED module to keyestudio micro:bit sensor shield. Shown as below diagram.

i.e. When relay is connected, LED module lights up, and then relay is disconnected, LED module is off, with an interval of one second, repeatedly.

 

 Ultrasonic Ranging Ultrasonic sensor is great for all kind of projects that need distance measurements, avoiding obstacles as examples.. to detect the distance between the module and an obstacle ahead.

Ultrasonic Module:
This Ultrasonic detector module HC-SR04 can provide 2cm-450cm non-contact measurement distance, and its ranging accuracy is up to 3mm. It includes an ultrasonic transmitter, receiver and control circuit.
Ultrasonic module will emit the ultrasonic waves after trigger signal. When the ultrasonic waves encounter an object and are reflected back, the module outputs an echo signal, so it can determine the distance of object from the time difference between trigger signal and echo signal.

The basic principle of work as follows:

1) First pull down the TRIG, and then trigger it with at least 10us high level signal;
2) After triggering, the module will automatically transmit eight 40KHZ square waves, and automatically detect whether there is a pulse signal back.
3) If there is a signal back, through the ECHO to output a high level, the duration time of high level is actually the time from sending ultrasonic to returning back.
Test distance = high level duration * velocity of sound (340m/s) * 0.5

Parameters

  • Working voltage: 0.5V(DC)
  • Working current: 15mA
  • Detecting range: 2-450cm
  • Detecting angle: 15 degrees
  • Input trigger pulse: 10us TTL Level
  • Output echo signal: output TTL level signal(HIGH), proportional to range.

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect the ultrasonic module to keyestudio micro:bit sensor shield. Shown as below diagram.

 

Light Brightness

Overview
It is seen that sensors are everywhere in our daily life. Some public street lights automatically light up during the day and automatically go out at night. Why?In fact, those lights make use of a photosensitive element that can measure the brightness of external light.
In the evening, when outside brightness becomes lower, the street light is automatically controlled to be turned on. When it is bright during the day, the street light is automatically turned off.
In this project, you will learn how to use our keyestudio photocell sensor and micro:bit to control the brightness of external light. Show the result on 5*5 LED of micro:bit or serial monitor of Arduino software.

Photocell Sensor:
A photoresistor or light-dependent resistor (LDR) or photocell is a light-controlled variable resistor. Its principal is very simple.
The resistance of photoresistor changes with incident light intensity. If the incident light intensity is high, the resistance decreases; if the incident light intensity is low, the resistance increases.
This keyestudio photocell sensor is a semiconductor, integrated with a photoresistor, easy to use and very convenient for wiring. It has features of high sensitivity, quick response, spectral characteristic and R-value consistence.
It can be applied in light-sensitive detector circuits, intelligent switch design and light- and dark-activated switching circuits.

Specifications

  • Interface type: analog
  • Working voltage: 5V
  • Size: 30*20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield.Then connect the photocell module to keyestudio micro:bit sensor shield. Shown as below diagram. Note: need to use the P0 end of micro:bit, that is, Analog INPUT function.

i.e. the brightness data on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to get the data. Shown as below.

 

Analog Temperature Sensor:
This analog temperature module is based on a thermistor whose resistance varies with temperature change.
It can detect surrounding temperature changes in real time.
Through the circuit connection, convert the resistance changes into voltage changes, then input the voltage changes into Analog Input of micro:bit via signal end. Actually the analog value of micro:bit can be calculated into temperature value via programming.
This sensor is convenient and effective, widely applied to home alarm system, gardening, and other devices.

Specifications

  • Interface type: analog
  • Working voltage: 5V
  • Temperature range: -55℃~315℃
  • Size: 30*20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the analog temperature module to keyestudio micro:bit sensor shield. Shown as below diagram.

i.e. You should see the analog temperature value is shown on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to read the value.

 

Hear Footstep    Analog Sound Sensor Module:
This analog sound sensor module is typically used in detecting the ambient sound. You can use it to make some interactive works, such as a voice switch.

Specifications  

  • Supply Voltage: 3.3V to 5V
  • Interface: Analog
  • Size: 30*20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the analog sound module to keyestudio micro:bit sensor shield. Shown as below diagram.

i.e.  the voice value is shown on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to get the value. Shown below.

 

Rotary Potentiometer      Analog Rotation Sensor:
This analog rotation sensor is based on a potentiometer. It actually uses a variable resistor. When rotate the potentiometer, it actually changes the resistance of variable device.
In the experiment, set well the circuit, convert the resistance changes into voltage changes, then input the voltage changes into Analog Input of micro:bit via signal end, getting the analog value via programming.

  • Connect It Up

Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the analog rotation module to keyestudio micro:bit sensor shield. Connect signal pin to P0, + pin to V1 header, - pin to ground.

i.e. Rotate the potentiometer, you should get the value change shown on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to get the value like this:

 

Alcohol Content in the Air

Overview
In this project, you will learn how to use an analog Alcohol sensor and micro:bit to detect the alcohol content in the air.

  • Analog Alcohol Sensor:

This analog sensor-MQ3 is suitable for detecting the alcohol. It can be used in a breath analyzer. It has a good selectivity because it has higher sensitivity to alcohol and lower sensitivity to Benzine.
The sensitivity can be adjusted by rotating a potentiometer on the sensor.
It has two signal pins, Analog A0 and Digital D0. The higher the alcohol concentration, the higher the A0 value.
When both alcohol concentration and A0 value reach a certain value, D0 changes from low level to high level, which can be controlled by potentiometer.

Specifications

  • Power supply: 5V
  • Interface type: Analog
  • Simple drive circuit
  • Stable and long service life
  • Quick response and High sensitivity

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the analog alcohol module to keyestudio micro:bit sensor shield. Connect VCC to V1 header, ground to ground, A0 pin to P0 header.

i.e. Read the value of A0 signal end. The higher the alcohol concentration, the greater the value.
You should see the value is shown on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to get the value. Shown below.

 

Flammable Gas in the Air

Overview
In real life, gas leakage events often occur. If toxic or flammable and explosive gas are leaked out, there exists a huge potential hazard to people’s health. So people have developed different kinds of sensors to detect various gas contents in the air, which can timely alarm to process the leaking gas. In this project, you will learn how to use an analog gas sensor and micro:bit to detect the flammable gas in the air. Show the analog value of gas on the LED matrix of micro:bit or check it on the serial monitor.

Analog Gas Sensor:
This analog gas sensor is used to detect combustible gases in the air, such as liquefied Gas, propane, hydrogen Gas, etc.
Keyestudio Analog Gas Sensor has high sensitivity to liquefied Gas, propane and hydrogen, ideal for testing natural Gas and other combustible gases.
It is a low-cost sensor suitable for a variety of applications.
It has high sensitivity and quick response. The sensitivity can be adjusted by rotating a potentiometer on the sensor.
Keyestudio Analog Gas Sensor has two signal terminals, Analog port A0 and digital port D0.
The higher the concentration of combustible gas, the higher the A0 value is. When both combustible gas concentration and A0 reach a certain value, D0 changes from low level to high level, which can be controlled by potentiometer.

Specifications

  • Power supply: 5V
  • Interface type: Analog
  • Size: 49.7*20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the analog gas sensor to keyestudio micro:bit sensor shield. Connect VCC to V1 header, ground to ground, A0 pin to P0 header.

i.e. Then connect the analog gas sensor to keyestudio micro:bit sensor shield. Connect VCC to V1 header, ground to ground, A0 pin to P0 header.

 

Ambient Temperature Detection   LM35 Linear Temperature Sensor:
It is based on a semiconductor LM35 temperature sensor. It can be used to detect ambient temperature. This sensor offers a functional range among 0 degree Celsius to 100 degree Celsius. Sensitivity is 10mV per degree Celsius. The output voltage is proportional to the temperature.
There exists a linear relationship between Signal output voltage and Celsius scale. The formula is as follows: at 0℃, output 0V; every 1℃ increase, the output voltage will increase 10mV.

Specifications

  • Sensitivity: 10mV per degree Celsius
  • Functional Range: 0℃ to 100℃
  • Size: 30*20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the LM35 sensor to keyestudio micro:bit sensor shield. Connect signal pin to P0 header, +pin to V1 header, ground to ground.

i.e. the temperature value is showed on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to get the value like below. The value may differs in different ambient.

 

Ambient Light   TEMT6000 Ambient Light Sensor:
This TEMT6000 light sensor is mainly composed of a high visible photosensitive light (NPN type) triode. It can capture the tiny light changes and magnify it about 100 times, which is easily recognized by the microcontroller for AD conversion.
Its response to visible light illumination is similar to that of the human eye, so it can judge the intensity of ambient light. But note that it does not react well to IR or UV light.
This sensor is available for friendly interaction applications.

  • Connect It Up

Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the TEMT6000 light sensor to keyestudio micro:bit sensor shield. Connect the signal pin to P0 header, +pin to V1 header, ground to ground.

i.e. Read the value of signal end. The stronger the ambient light, the greater the value. You should see the value is showed on the LED matrix of micro:bit.

 

 

 Automatic Water Your Plant    Soil Humidity Sensor:
This simple soil sensor is ideal for detecting the humidity of your plants’ soil. If the soil lacks the water, the analog value output by the sensor will decrease, otherwise, it will increase.

Specifications

  • Power Supply Voltage: 3.3V or 5V
  • Working Current: ≤ 20mA
  • Output Voltage: 0-2.3V (The greater the humidity, the higher the output voltage.)
  • Sensor type: Analog output
  • Interface: Pin1- signal, Pin2- GND, Pin3 - VCC
  • Dimensions: 20*60mm

The automatic water system is as follows
Firstly, we connect a soil sensor to the microcontroller for the purpose of detecting the humidity of soil. Then connect a relay module to the MCU as well. On the normally open (NO) terminals of relay, separately connect a pump and a power supply.
When the soil is detected too dry, the microcontroller will control the relay on, NO terminal connected, supply the power to the pump, and the pump will start to work, watering your flowers and plants.
If the soil is detected enough humid, the microcontroller will control the relay off, NO terminal disconnected, power off, so the pump will stop watering.

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the soil humidity sensor to keyestudio micro:bit sensor shield. Connect the signal pin to P0 header, +pin to V1 header, ground to ground.

i.e, Insert the sensor into the soil of your plants. Read the analog value on signal end. The greater the soil humidity, the greater the analog value.

You should see the value is showed on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to get the value.

 

Water Level Alarm       keyestudio Water Level Sensor:
The water sensor is easy- to-use, portable and cost-effective, designed to identify and detect water level and water drop. This smaller sensor can measure the volume of water drop or water quantity through an array of traces of exposed parallel lines.

Features

  • smooth conversion between water quantity and analog quantity;
  • strong flexibility, outputting basic analog value;
  • low power consumption and high sensitivity;
  • Production process: FR4 double-side tinned
  • Shape design: Anti-skid semi-lunar recess

Specifications

  • Operating voltage: DC5V
  • Operating current: ﹤20mA
  • Sensor type: Analog output
  • Detection area: 40mm x16mm
  • Working Temperature: 10℃-30℃
  • Working Humidity: 10%-90% without condensation
  • Dimensions: 65mm x 20mm x 8mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then separately connect the buzzer and water sensor to keyestudio micro:bit sensor shield. shown below.

i.e. Read the value of signal end. The higher the water level, the greater the value. When the analog value is greater than 400, buzzer on the module will alarm. You should see the value is showed on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to get the value. Like below figure shown.

 

Ultraviolet Detection    Keyestudio GUVA-S12SD Ultraviolet Sensor:
This sensor mainly includes GUVA-S12SD, applied to measure ultraviolet index of intelligent wearable device, such as watches, smart phone and outdoor device with UV index. In the aspect of disinfection by ultraviolet rays, it can be used to monitor the intensity of ultraviolet light or used as a UV flame detector.

  • Connect It Up

Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the Ultraviolet sensor to the shield. Connect the signal pin to Analog P0.

i.e. Read the analog value of P0 signal end. The greater the Ultraviolet light, the greater the value.
You should see the value is showed on the LED matrix of micro:bit.

 

Vapor in the Air

Our lives are surrounded by air everywhere. The air contains many ingredients, some of which are useful, some are harmful, some of which have a significant impact on the human body, and some of which have a slight effect on the human body.

Keyestudio Steam Sensor:
Steam sensor is an analog sensor, which can be used as a simple rainwater detector or liquid level switch.
When moisture on the sensing area of this sensor rises, output voltage of its signal end will increase.

Parameters

  • Working Voltage: 3.3V-5V
  • Working Current: <20mA
  • Working Temperature: -10℃~+70℃
  • Interface Type: Analog Signal Output
  • Size: 36mm x 20mm

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the steam sensor to the shield. Connect the signal pin to Analog P0.

i.e. Read the analog value of P0 signal pin. The higher the vapor content in the air, the greater the value.
You should see the value is showed on the LED matrix of micro:bit. Or you can open the serial monitor of Arduino IDE to get the value as the figure shown below.

Thin-film Pressure Sensor:
This sensor adopts the flexible nano pressure-sensitive material with an ultra-thin film pad. It is water-proof and pressure-sensitive.
When the sensor detects the outside pressure, the resistance of sensor will change. Then through the circuit can convert the resistance changes into the voltage changes, output it on the signal end.
In this way, we can get the conditions of pressure changes by detecting the signal changes.

Specifications

  • Range: 0-10KG
  • Working Voltage: DC 3.3V—5V
  • Response Point: <20g
  • Repeatability: <±5.8%(50% load)
  • Accuracy: ±2.5%(85% range interval)

Connect It Up Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the pressure sensor to the shield. Connect the signal pin to Analog P0.

 

Keyestudio Vibration Sensor:
This sensor is mainly based on a 801S sensor element. The interior structure is a metal ball fixed on a special spring as a pole, and the other surrounded by it as another pole. Once the vibration reaches a certain amplitude, the two poles are connected.

Parameters

  • IO Type: Digital
  • Supply Voltage: 3.3V-5V

Note: you can adjust the sensitivity by a trim-pot on the sensor. The sensitivity is the best when adjust an LED on the sensor between on and off state.

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the vibration sensor and LED module to the shield. Connect the signal pin of vibration sensor to Analog P0.

By reading the High/Low level changes of P0 pin to control an LED state.
If you slap the table where the sensor locates, when the vibration sensor detects the vibration signal, an LED on the Piranha LED module will lights up, otherwise, LED off.

keyestudio Joystick Module:
Lots of interactive projects may need joystick. This module provides an affordable solution, easy to use.
On the joystick module, it has 3 signal interfaces, which can simulate the three-dimensional space. The signal pins X and Y will simulate the X-and Y-axis of space. Connect them to Analog Input of microcontroller. By controlling 2 analog input values to control the coordinate of an object in X- or Y-axis.
Another signal pin Z( labeled B on the module) will simulate the Z-axis of space. Generally connected to Digital port, and used as a button.

Then open the serial monitor of arduino software, you should see the value of X,Y and B pins. If push the joystick, the value will change.

keyestudio Micro Servo:
The servo has three interfaces,distinguished by brown, red and orange line (different brand may have different color). Brown line is for GND, red one for power 5V, orange one for signal terminal (PWM signal). The rotation angle of servo is controlled by regulating the duty cycle of the PWM(Pulse-Width Modulation) signal. The standard cycle of the PWM signal is fixed at 20ms (50 Hz), and the pulse width is distributed between 1ms-1.5ms. The pulse width corresponds to the rotation angle ( 0°~90°).

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the micro servo to the shield. Connect the signal line to P3 of micro:bit, power line to V1 header, ground line to ground header.

Example Result
Done wiring and powered up, send the above code to MICROBIT. You should see the servo turn back and forth between 0°and 90°.

keyestudio 1602 I2C Module:
This module is a LCD 16x2 display, useful for creating standalone projects.

  • 16 characters wide, 2 rows;
  • White text on blue background;
  • Chip Operating Voltage: 4.5-5.5V
  • Working Current: 2.0mA (5.0V)
  • Optimum working voltage of the module is 5.0V
  • Single LED backlight included can be dimmed easily with a resistor.
  • Built in character set supports English text
  • Comes with necessary contrast potentiometer

Connect It Up
Insert the micro:bit into keyestudio micro:bit sensor V2 shield. Then connect the 1602 LCD to IIC pin headers on the shield. Connect the SCL pin to P19, SDA pin to P20, VCC pin to V2, GND to ground. Shown below.

Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.

Example Result
Done wiring and powered up, send the above code to MICROBIT. You should see the character “Keyestudio” is showed on the first line of LCD screen, on the second line show the number. And the number will plus 1 per second.

Or check the video here:
https://video.keyestudio.com/KS0361-365/

Leave a Reply