SunFounder PiCar-S
change with the light luminance. The stronger the light is, the larger the reverse current will be. Most phototransistors
work this way.
The ADC chip on the HATS can receive 8-bit analog signals and convert them into integers, and transfer the signals
to the Raspberry Pi. The Raspberry Pi will analyze the data to determine the direction of the brightest area (the light
source), and further control the steering and movement of the four wheels to approach the light source.
You may need a light focused flashlight in this experiment. At least, the spot size of the torch should not be too big
to reach all the 3 phototransistors on the module at the same time. Well, you can also shine the flashlight closer to the
car to get a small spot size.
Ultrasonic Obstacle Avoidance Module
The module contains an HC-SR04 ultrasonic distance sensor to detect the distance to an obstacle ahead. It is
commonly used for robots to avoid obstacles. With the two holes, it can be easily mounted to the robot. A four foot
anti-backwards cable is included to make the wiring tighter and easier.
The HC-SR04 ultrasonic distance sensor provides non-contact measurement from 2cm to 400cm with a range
accuracy of 3mm. each HC-SR04 module includes an ultrasonic transmitter, a receiver and a control circuit, so we
have to be careful with the Trig and Echo pin connections when using the HC-SR04 module. When we attach it to the
picar-s, it measures the distance and detects if there is an obstacle ahead.
Principle
Supply a short 10S pulse to the Trig to start the ranging, and then the module will send out an 8 cycle burst of ultrasound
at 40 kHz and raise its echo back. The echo is a distance object that is pulse width and the range in proportion. You
can calculate the Range through the Time Interval between sending trigger signal and receiving echo signal.
Formula:
𝑅𝑎𝑛𝑔𝑒
(
𝑚
) =
𝑇 𝑖𝑚𝑒𝐼𝑛𝑡𝑒𝑟𝑣𝑎𝑙
×
340
𝑚/𝑠
2
Or:
Range
(
cm
) =
Time Interval
58
Or:
Range
(
𝑖𝑛𝑐ℎ𝑠
) =
Time Interval
148
We suggest to use over 60ms measurement cycle, so as to prevent trigger signal to the echo.
78
Chapter 1. About the PiCar-S
Содержание PiCar-S
Страница 1: ...SunFounder PiCar S www sunfounder com Nov 10 2021 ...
Страница 2: ......
Страница 4: ...ii ...
Страница 8: ...SunFounder PiCar S 4 Chapter 1 About the PiCar S ...
Страница 9: ...SunFounder PiCar S 1 1 3 Mechanical Fasteners 1 1 Components List 5 ...
Страница 10: ...SunFounder PiCar S 1 1 4 Wires 6 Chapter 1 About the PiCar S ...
Страница 11: ...SunFounder PiCar S 1 1 5 PCB 1 1 Components List 7 ...
Страница 12: ...SunFounder PiCar S 1 1 6 Other Components 8 Chapter 1 About the PiCar S ...
Страница 22: ...SunFounder PiCar S 18 Chapter 1 About the PiCar S ...
Страница 26: ...SunFounder PiCar S 22 Chapter 1 About the PiCar S ...
Страница 27: ...SunFounder PiCar S 1 4 Circuits Building 1 4 1 Connect the Power 1 4 Circuits Building 23 ...
Страница 28: ...SunFounder PiCar S 1 4 2 Connect the Modules 24 Chapter 1 About the PiCar S ...
Страница 29: ...SunFounder PiCar S 1 4 3 Connect the Servo 1 4 Circuits Building 25 ...
Страница 44: ...SunFounder PiCar S Mount the wheels onto the Upper Plate carefully 40 Chapter 1 About the PiCar S ...
Страница 69: ...SunFounder PiCar S Subflow of Line Following Function 1 8 Arming the Car 65 ...
Страница 74: ...SunFounder PiCar S 70 Chapter 1 About the PiCar S ...