Electronic projects
GMR Board Introduction
GMR Board Introduction
The full name of GMR board is General Robot Expansion Board, which is an integrated circuit board designed specifically for the Home Robot Platform (HCR). GMR Board Introduction
Three microprocessors (single-chip computers) need to be inserted into this integrated board: two Arduino Nanos and one Arduino Mega ADK. The three processors have been connected via I2C and no additional wiring is required.
One Nano is used for motor control and data acquisition, and the other Nano is used to drive the ultrasonic sensor. The Arduino Mega ADK is used as the main control board to collect and transmit data and other expansion modules. There are also 2 wireless communication slots that can use Xbee, Bluetooth and other communication modules. In addition, there are 8 I/O ports, 8 analog ports and 3 i2c communication interfaces as input and output of Mega ADK. The nano board has a dedicated port for motor drive and an adjustable knob voltage output.
Sensors
Dear friends, in this third article, I will explain the most important thing in mobile robots, sensors. If sensors are the soul of a robot, then sensors are the eyes of a robot. Of course, some sensors can be noses and ears, but eyes are the most important. In the previous article, I think everyone has seen the hardware structure of GMR. We will use two types of sensors, infrared and collision sensors.
Infrared sensor
Use 7 sharp infrared sensors at a relatively low position of the entire mobile robot, with a sensing range of 10-80cm, which is suitable for timely response to the surrounding environment in emergency situations. From a hardware perspective, you can stabilize the power supply by connecting a capacitor between VCC and GND to reduce the impact of power supply voltage fluctuations on the measurement results, or connect a capacitor between GND and the data line to reduce the fluctuation of the output voltage, ignore possible error signals, and improve data stability.
Connect the infrared sensor and the main controller as shown below
Then burn IRsensor_test.ino into Arduino Mega2560
void IRreader() is the infrared sensor reading function and contains the pin declaration
float smooth(float newdata, floatfilterVal, float smoothedVal) This function processes the output of the infrared sensor so that its final output value is in centimeters.
Collision Sensor
Use 3D collision sensors, installed in 3 directions in front of the robot. The role of the collision sensor is to respond quickly (stop, retreat) to this state when the mobile miracle man has hit an obstacle in extremely special circumstances.
Connect the collision sensor as shown below
Then burn Bumper_test.ino into Arduino Mega2560
OpenBumper(4,3,2); declares 3 digital pins of 3 bump sensors
BumperFunction.h This library stores the states of the three sensors, converting the two states of the digital port into binary and storing them in a byte. Different values of this byte represent different states.
For example, 00000110 means that the sensor corresponding to the D2 pin on the right is triggered.
GMR total wiring diagram So far, all hardware connections have been completed. The following figure is the overall wiring diagram