Appendix

Share for us

Robot HATS

Robot HATS is a specially-designed HAT for a 40-pin Raspberry Pi and can work with Raspberry Pi model B+, 2 model B, and 3 model B. It supplies power to the Raspberry Pi from the GPIO ports. Thanks to the design of the ideal diode based on the rules of HATS, it can supply the Raspberry Pi via both the USB cable and the DC port thus protecting it from damaging the TF card caused by batteries running out of power. The PCF8591 is used as the ADC chip, with I2C communication, and the address 0x48.

1. Digital ports: 3-wire digital sensor ports, signal voltage: 3.3V, VCC voltage: 3.3V.

2Analog ports: 3-wire 4-channel 8-bit ADC sensor port, reference voltage: 3.3V, VCC voltage: 3.3V.

3. I2C ports: 3.3V I2C bus ports

45V power output: 5V power output to PWM driver.

5UART port: 4-wire UART port, 5V VCC, perfectly working with SunFounder FTDI Serial to USB.

6TB6612 motor control ports: includes 3.3V for the TB6612 chip, 5V for motors, and direction control of motors MA and MB; working with SunFounder TB6612 Motor driver.

7Switch: power switch

8Power indicators: indicating the voltage – 2 indicators on: >7.9V; 1 indicator on: 7.9V~7.4V; no indicator on: <7.4V. To protect the batteries, you’re recommended to take them out for charge when there is no indicator on. The power indicators depend on the voltage measured by the simple comparator circuit; the detected voltage may be lower than normal depending on loads, so it is just for reference.

9Power port: 5.5/2.1mm standard DC port, input voltage: 8.4~7.4V (limited operating voltage: 12V~6V).

PCA9865

PCA9685 16-channel 12-bit I2C Bus PWM driver. It supports independent PWM output power and is easy to use 4-wire I2C port for connection in parallel, distinguished 3-color ports for PWM output.

1. PWM output ports: 3-color ports, independent power PWM output port, connect to the servo directly.

2 & 3. I2C port: 4-wire I2C port, can be used in parallel. Compatible with 3.3V/5.5V

4. PWM power input: 12V max.

5. LED: power indicator for the chip and for the PWM power input.

TB6612

The TB6612 Motor Driver module is a low heat generation one and small packaged motor drive.

1Power and motor control port: includes pins for supplying the chip and the motors and controlling the motors’ direction

2PWM input for the motors: PWM signal input for adjusting the speed of the two motors

3Motor output port: output port for two motors

Line Follower Module

The TCRT5000 infrared photoelectric switch adopts a high transmit power infrared photodiode and a highly sensitive phototransistor. It works by applying the principle of objects’ reflecting IR light – the light is emitted, then reflected, and sensed by the synchronous circuit. Then it determines whether there exists an object or not by the light intensity. It can easily identify black and white lines.

In other words, the different conduction levels of the phototransistor when it passes over black and white lines can generate different output voltages. Therefore, all we need to do is to collect data by the AD converter on the Atmega328 and then send the data to the master control board via I2C communication.

This module is an infrared tracking sensor one that uses 5 TRT5000 sensors. The blue LED of TRT5000 is the emission tube and after electrified it emits infrared light invisible to human eye. The black part of the sensor is for receiving; the resistance of the resistor inside changes with the infrared light received.

Light Follower Module

Phototransistor, or photo triode, is a photoelectric conversion component that senses the light intensity. The stronger light, the larger currents, and better conductivity of the triode.

Based on this principle, we use it for light following. It works by converting the conductivity to voltage output, which means the stronger light shone on it, the smaller voltage output. Then convert the voltage into digital values by the A/D converter on the MCU. And we can tell the light intensity then by this value.

The module can be used to sense the ambient luminance. The blue potentiometer is to adjust the sensitivity – you can change it to adapt to specific circumstances. There are two mounting holes of 3mm diameter on the module for easy assembly on your robot.

Ultrasonic Obstacle Avoidance Module

This module contains an ultrasonic sensor to detect the distance to an obstacle in front. It is usually used on robots to avoid obstacles. With the two holes, it can be assembled easily on the robot. There is power indicator light added onside to indicate power on/off. The 3-pin design makes it unique among most of the ultrasonic module in the market: the same pin to trigger and receive signals. The 3-pin anti-reverse cable included makes the wiring tighter and more convenient. Also the beautiful cartoon design and the red PCB add to its fascination.

The 25kHz ultrasonic module differs from common 40kHz ones. It is not so precise in distance measurement, but it has a wider detecting range of about 30 degrees. Thus it can detect the obstacle near ahead, and measure the distance if it’s assembled on the PiCar. Though a 40kHz ultrasonic measures distance precisely, it can only detect obstacles which is right in front. Therefore, the 25kHz ultrasonic module is more preferably applicable to an obstacle avoidance car, or projects require a large detection range instead of accurate distance measurement.

SunFounder SF0180 Servo

The SunFounder SF0180 Servo is a 180-degree three-wire digital servo. It utilizes PWM signal of 60Hz and has no physical limit – only control by internal software to 180 degrees at most.

Electrical Specifications:

ItemV = 4.8VV = 6.0V
Operating speed (no load)0.12 Sec/60°0.09 Sec/60°
Running current (no load)140 mA200 mA
Stall torque (locked)2.0 kg-cm2.5 kg-cm
Stall current (locked)520 mA700 mA
Idle current (stop)5 mA5 mA

For more information, refer to SunFounder_PiCar-S/datasheet/SunFounder_SF0180.pdf in the code package on our Github page. .

WiFi Adapter

The Ralink RT5370 Wireless Adapter is used in the car. Below are the features:

USB: XC1291

Network Connectivity: Wireless-Wi-Fi 802.11b, Wireless-Wi-Fi 802.11g, Wireless-Wi-Fi 802.11n

Applicable Network Type: Ethernet

Transmission Rate: 150Mbps

DC Gear Motor

It’s a DC motor with a speed reducing gear train. See the parameters below: