header image

Hardware

Components

Table of the electronic components for the robot
Image Drawing Diagram Name
raspberryPi raspberryPiDrawing raspberryPiDiagram Raspberry Pi 4B
arduinoYun arduinoYunDrawing arduinoYunDiagram Arduino Yún Rev 2
ultrasonar ultrasonarDrawing ultrasonarDiagram Ultrasonic sensor
led ledDrawing ledDiagram RGB LED
thermometer thermometerDrawing thermometerDiagram Thermometer
speakers speakersDrawing speakersDiagram Speakers
microphone microphoneDrawing microphoneDiagram Microphone
camera cameraDrawing cameraDiagram Camera
resistance220 resistance220Drawing resistance220Diagram 220Ω Resistor
resistance1k resistance1kDrawing resistance1kDiagram 1kΩ Resistor
resistance10k resistance10kDrawing resistance10kDiagram 10kΩ Resistor

Raspberry Pi

The Raspberry Pi 4B (abbreviation RPI) is a nano-computer. It has 4 Go of RAM and it's based on a 32bits system. It is more powerful than the previous Raspberry Pi, with a better Graphic card.
It has two micro-HDMI ports instead of one HDMI port.

Arduino Yún

In addition to the 32U4 chip, the Yún has an additional processor, an Atheros AR9331, which runs a distribution of Linux for embedded systems named OpenWrt-Yun, based on OpenWrt. A full install of Python 2.7 is included as well.
The Yún has a number of different physical characteristics and connectors than the Leonardo. There is an on-board SD slot, Ethernet jack, and a USB-A Host connector. There is no power barrel connector on the Yún; it can be powered from the micro-USB connector.
There is no built in 5V regulator. If you power your Yún with more than 5V, you will likely damage it. If you are not powering the Yún from the micro-USB connection, you can apply power to the VIN and 5V pins on the board. If using the VIN pin, you cannot provide more than 5V, it will damage your board. It is recommended to power the Yún from the USB connection whenever possible.
The SD, Ethernet, and USB-A connectors are not physically connected to the 32U4 processor, they are connected to the AR9331.
The Yún's 32U4 functions in the same way as the Leonardo, except you cannot use Serial1. It is reserved for communication with the AR9331 processor.
The Yún also has a WiFi module built on board, allowing it to connect to a wireless router, or act as an access point.
The 32u4, WiFi, and AR9331 processors all have their own reset buttons.
There are several status LEDs on the Yún, indicating power, WLAN connection, WAN connection and USB. Additionally pin 13 is connected to one of the status lights.

Resistor

Resistor is an electrical component that limits or regulates the flow of current in an electronic circuit.
Color rings attached to the resistor is used to indicate its resistance.
resitor color chart
With the same voltage there will be less current with more resistance. And the links among current, voltage and resistance can be expressed by the formula below: I=U/R.
Do not connect the two poles of power supply with low resistance, which will make the current too high to damage power supply. And resistor has no poles.
For the project we use three kind of resistors : 220Ω resistor, 1kΩ resistor and 10kΩ resistor.

Ultrasonic sensor

Ultrasonic ranging module use the principle that ultrasonic will reflect when it encounters obstacles. Start counting the time when ultrasonic is transmitted. And when ultrasonic encounters an obstacle, it will reflect back. The counting will end after ultrasonic is received, and the time difference is the total time of ultrasonic from transmitting to receiving. Because the speed of sound in air is constant, and is about v=340m/s. So we can calculate the distance between the model and the obstacle: s=vt/2.
ultrason
Ultrasonic module integrates a transmitter and a receiver. The transmitter is used to convert electrical signals (electrical energy) into sound waves (mechanical energy) and the function of the receiver is opposite.
Instructions for use: output a high-level pulse in Trig pin lasting for least 10uS. Then the module begins to transmit ultrasonic. At the same time, the Echo pin will be pulled up. When the module receives the returned ultrasonic, the Echo pin will be pulled down. The duration of high level in Echo pin is the total time of the ultrasonic from transmitting to receiving, s=vt/2.

Thermometer

DS18B20 module is using a single bus. The power supply voltage range of 3.0 V to 5.5 V and no standby power supply. It can measure temperature range for-55°C to +125°C with accuracy of +/- 0.5 °C.
The programmable DPI of temperature sensor is from 9 to 12. Temperature conversion is 12 digits lattice type. Maximum is 750 milliseconds. Families can be defined non-volatile temperature alarm Settings.
Each DS18B20 contains a unique serial number so that multiple DS18B20S can exist in a bus.

RGB LED

RGB LED has integrated 3 LEDs that can respectively emit red, green and blue light. And it has 4 pins. The long pin is the common port, that is, 3 LED 's positive or negative port. We can make RGB LED emit various colors of light by controlling these 3 LEDs to emit light with different brightness.
rgb
Red, green, and blue light are called 3 primary colors. When you combine these three primary-color light with different brightness, it can produce almost all kinds of visible lights. Computer screens, single pixel of cell phone screen, neon, etc. are working under this principle. So you can create about 16 million colors with different combinations.

Speakers

There are two speakers, each with a power pin and a ground pin. The membrane vibrate so the sound can be transmitted.

Microphone

A microphone module featuring a high-sensitivity large-for mat electret capsule. Output DO (active high) is switched when the soundlevel exceeds a preset level. A pot allows adjustment of the level.
The sound sensor module provides an easy way to detect sound and is generally used for detecting sound intensity. This module can be used for security, switch, and monitoring applications. Its accuracy can be easily adjusted for the convenience of usage. It uses a microphone which supplies the input to an amplifier, peak detector and buffer. When the sensor detects a sound, it processes an output signal voltage which is sent to a microcontroller then performs necessary processing.

Camera

The infrared camera can take video even in the dark. It's linked to the Raspberry Pi with the display pin.



Robot components software

The robot components software is based on Python language. It measure the distance between the robot and an obstacle with the ultrasonic sensor. Then, if the distance is 30cm or less, the RGB LED become red. Else, the RGB LED is green. We use the thermometer to get the temperature in order to calculate the ultrasound speed. With that, the ultrasonar can get a more precise value. Then, we use the camera to take a video in order to do facial recognition and object recognition. The microphone can record sound to do sound recognition. Thanks to the speakers, the robot can speak with the people he meet.

2021-03-16 16:04:02

Free Web Hosting