“Hummer-Bot” is a multi-function car based on BLE-UNO as the core control and MX1616L as a motor-driven car. Compared with traditional cars, “Hummer-Bot” is also equipped with wireless control (Bluetooth, infrared, etc.); ultrasonic, etc. . It can automatically track and avoid obstacles. Of course, Hummer-Bot can also be controlled wirelessly. Make full use of each module and integrate various related sensors to make the car more intelligent; more meaningful for development; more challenging. “Hummer-Bot” is equipped with various materials, technical manuals, routines, etc., to teach you from entry to mastery. Every electronic hobbyist can easily get started and realize the functions they want.
Three-way infrared black line tracking module
2 sets of infrared obstacle avoidance and light tracking modules
1 ultrasonic obstacle avoidance with steering gear
4-way DC motor drive
2 2000mA, 3.7v rechargeable lithium batteries for longer battery life
Support real-time detection of battery power
Support infrared remote control
Support bluetooth app control
Support PS2 handle control (optional)
Support nRF24L01+ wireless control (optional)
Support wifi control (optional)
About Arduino BLE-UNO main control board and expansion board
Arduino BLE-UNO main control board
In “Hummer-Bot”, we used BLE-UNO as the main control board, it has 14 digital input/output pins (6 of which can be used as PWM output), 6 analog inputs, 1 16 MHz ceramic resonator device, 1 USB connection, 1 power socket, 1 ICSP header and 1 reset button. It includes everything you need to support your microcontroller; just connect it to a computer via a USB cable or power it with an AC-DC adapter or battery to get started. In addition, there is also a CC2540 Bluetooth module onboard, which can realize Bluetooth communication.
Working voltage: 5V
BLE chip: TI CC2540
BLE working channel 2.4G
Bluetooth transmission distance: open distance 50m
Support AT command to configure BLE
Support USB virtual serial port, hardware serial port, BLE three-way transparent transmission
Bluetooth supports master-slave switching
Support Bluetooth automatic connection to slave in master mode
Support sending more than 20 bytes.
Input voltage: USB powered or external 7V~12V DC input
Output voltage: 5V DC output and 3.3V DC output and external power input
Microprocessor: ATmega328 (chip data sheet in the supporting materials)
Bootloader: Arduino Uno
Clock Frequency: 16 MHz
Support USB interface protocol and power supply (no external power supply required)
Support ISP download function
Digital I/O ports: 14 (4 PWM outputs)
Analog input ports: 6
DC current I/O port: 40mA
DC current 3.3V port: 50mA
Flash memory: 32 KB (ATmega328) (0.5 KB for bootloader)
SRAM: 2 KB (ATmega328)
EEPROM: 1 KB (ATmega328)
Bootloader: latest Arduino1.8.8
Expansion board interface diagram
When installing the steering gear, pay attention to the steering gear, please read the description of the steering gear calibration section first.
Hummer Bot Module Experiment
Motor drive principle
In the “Hummer-Bot” car, we chose 4 DC geared motors as the power, and MX1616L as the motor driver chip.
MX1616L adopts H-bridge circuit structure design, and adopts high-reliability power tube technology, which is especially suitable for driving coils, motors and other inductive loads. The circuit integrates N-channel and P-channel power MOSFETs, and the operating voltage range covers 2-10V, 27°C, VDD=6.5V. Under the condition of two channels working at the same time, the maximum continuous output current of one channel reaches 1.2A, the maximum The peak output current reaches 2.5A; the maximum continuous output current of 2 channels reaches 1.2A, and the maximum peak output current reaches 2.5A.
MX1616L can drive 2 motors, 2 motors are connected between OUTA1, OUTB1 and OUTA2, OUB2 respectively. Pins 2, 3, 6, and 7 are connected to the input control level to control the forward and reverse rotation and stop of the motor. Its features are:
Low standby current (less than 0.1uA)
Low on-resistance MOSFET power switch
Internally integrated freewheeling diode
small input current
Can control two DC motors
A single stepper motor can be controlled
Can realize forward and reverse.
Schematic diagram of motor driver board
Motor driver board wire connection
By looking at the chip information, we know that BLE-UNO has 6 PWM interfaces, which are digital interfaces 3, 5, 6, 9, 10, and 11. Here, we choose 5, 6, 9, and 10 as the motor control IO, and their connections are shown in the figure. The wiring method of the motor driver board and the arduino expansion board is as follows:
Infrared obstacle avoidance and light seeking module introduction
The infrared obstacle avoidance and light search module integrates the infrared obstacle avoidance function and light search function on one module. The infrared obstacle avoidance function transmits infrared signals through the infrared emission tube on the module. When the infrared signal encounters obstacles, it is sent back. , the infrared receiver tube receives the reflected infrared signal, so as to judge that there is an obstacle and achieve the purpose of obstacle avoidance. The light-seeking function is realized by using the photoresistor on the module. When the photoresistor is irradiated by strong light, its resistance value drops rapidly, the passing current increases, and the resistance value of the photoresistor increases rapidly in the dark environment, and the passing current decreases. Small, the main control board uses this to determine whether there is a light source.
How infrared obstacle avoidance works
The infrared obstacle avoidance and light search module has a pair of infrared emission and reception tubes. The emission tube emits infrared rays of a certain frequency. When the detection direction encounters an obstacle (reflecting surface), the infrared rays are reflected back and received by the receiving tube, and pass through the comparator. After the circuit is processed, the green indicator light will light up, and the signal output interface will output a digital signal (a low-level signal). The detection distance of the sensor can be adjusted by a potentiometer. Since infrared rays are used, the anti-interference ability is very strong, and the measurement accuracy is very high when the distance is moderate. In addition, the module is easy to assemble and use, and can be widely used in many occasions such as robot obstacle avoidance, obstacle avoidance trolley, assembly line counting and black and white line tracking.
How light works
The light-seeking function of the infrared obstacle avoidance and light-seeking module is to judge the light intensity of the surrounding environment through the photodiode, and output an analog signal. When the photoresistor is irradiated by strong light, its resistance value drops rapidly, the passing current increases, the resistance value of the photoresistor increases rapidly in a dark environment, and the passing current decreases, and the main control board judges whether there is a light source. Working voltage: 0.3-10V. Since the SG-PT3528 photodiode is used, it can simulate the sensitivity of the human eye, with a peak sensitivity wavelength of 590nm, anti-infrared interference, fast response speed and stable performance. In addition, the module is easy to assemble and use, and can be widely used in night lights, lawn lights, sun lights, etc.
Infrared obstacle avoidance and light seeking module parameters
Working voltage: 5V
Infrared detection effective distance range: 2 ~ 30cm
Peak photosensitive wavelength: 590nm
Output infrared obstacle avoidance signal: digital signal
Output photosensitive signal: analog signal
The module can adjust the infrared obstacle avoidance detection distance through the potentiometer, and the detection distance is 2~30cm. If you find that the distance measurement is not very sensitive during use, you can use the trimmer potentiometer to achieve the desired result (adjust the potentiometer clockwise, the detection distance Increase; adjust the potentiometer counterclockwise to reduce the detection distance), the infrared obstacle avoidance detection distance on the left and right sides needs to be adjusted the same, so that the car will be more smooth during the obstacle avoidance process.
Manual adjustment as shown in the figure:
Infrared obstacle avoidance and light-seeking module wire connection