Spruce Used to Control LinkSprite Robot Platform
On LinkSprite Spruce, STM32 MCU is used. STM32 has ARM Cortex-M3 core. It can be used on Keil development environment and Arduino IDE.
LinkSprite Arduino Robotics Kit is an Arduino based Robotics kit.
The hardware included:
- Robotics platform
- Two-Channel DC Motor Driver Breakout (L298 Chipset)
- Path sensor board
- three infrared obstacle sensors
- Arduino board is NOT included
- Battery holder
- Jumper wires
The platform comes with the metal base, two rubber tires, one ball caster metal, and two gearmotors.
Two-Channel DC Motor Driver Breakout to Arduino Uno:
I1 -> pin 2 of spruce
I2 -> pin 1 of spruce
I3 -> pin 5 of spruce
I4 -> pin 6 of spruce
EA -> pin 11 of spruce
EB-> pin 12 of spruce
P3 on the motor driver board is connected to the four wires of two motors. VMS is connected to the Vin of Arduino, and GND is connected to the ground of Arduino.
Path Sensor Breakout Board connected to Arduino:
+5V is connected to 5V on Arduino.
GND is connected to ground on Arduino.
Pin 15 connected to Q1
Pin 16 connected to Q2
Pin 17 connected to Q3
Pin 18 connected to Q4
Pin 19 connected to Q5
Obstacle sensors connected to Arduino:
Front obstacle sensor connected to Pin 16.
Right obstacle sensor connected to Pin 17.
Left obstacle sensor connected to Pin 15.
Path following example:
After switch on,the car will run along the black line on floor , this car is equipped with five path sensors, when the middle sensor detectes black line, car will go forward; when the centreright sensor detectes black line, that indicate car will slightly turn to the right side, so the car should be turned slightly to the left; when the most right sensor detects black line, that indicate car turn too much to the right side, so the car should turn left by a wide margin. Concretely, use PWM control L298N end EA, EB can be enabled to control car's speed, by controlling delay () to control car's rotation angle. By analogy, the black line wich detected by left side sensor will be just opposite.
Arduino pde example:
Get out of Maze example:
Equipped with three infrared sensors at the front of the car to avoid obstacles, when an obstacle is detected, the corresponding sensor will output low level. When obstacle is detected at current side, the car will backward a little then turn left again by default; when right side of the obstacle is detected, the car will turn to left; when left obstacle is detected, the car will turn to right. Attention that each rotation rate shouldn't be too much, you can use the program for several minor adjustments, so that car can move ahead closely to the edge of obstacle, Concretely,use the PWM control L298N Enable EA, EB to control car's speed, by controlling delay ()to control car's rotation angle. You can adjust the potentiometer on the back of sensor to adjust the detection range, detection distance shouldn't too far, the appropriate distance is 20CM, thus the car can achieve Maze features, if encountered a dead end, car can come out closely to the wall.
720-204-8599 (MST: 9:00am-5:00pm)
720-279-0774 (MST: 6:00pm- 3:00am)