Mushak - A half-size Micromouse
About the Team
Society of Robotics and Automation (better known as SRA) is a well-established, non-profit, student-driven organization in VJTI, Mumbai. It started in September 2008, and deals with Robotics, Embedded Systems, CAD Design, Kinematics, Mechatronics, Automation, Machine Vision, and other allied fields.
We are trying to develop our first Half-size Micromouse and compete in robotic competitions conducted all over the world.
About The Project
Mushak is a micromouse maze solving bot. The aim of this project is to make India's first and smallest half-size micromouse bot. "Mushak" in hindi means "Mouse".
This micromouse consist of a very small coreless motors (6 mm width and 10 mm length) and PCB as it's base . Since coreless motors doesn't provide enough torque for the movements of bot we used gear box to increase the torque.
Mushak is of size 45.7mm x 40.0 mm, which is smaller than similar micromouse using STM32F405RG. We boast of least area consuming micromouse made using STM32 LQFP64 package chips.
The Mushak PCB design is made on the latest version of KiCAD 6.
Mushak is designed over STM32F405RG microcontroller accomodated with various sensors and drivers for the micromouse.
We designed the smallest micromouse that is based on STM32F405RG microcontroller.
Major components used in the PCB include -
- STM32F405RG Microcontroller
- VL6180x ToF sensor
- DRV8833 Motor Driver
- MPU6500 IMU
- SFH-4045N Infrared Emitter
- SFH-3015-FA Phototransistor (Reciever)
IR sensors
The IR sensors include majorly two components, IR emitter which emits the Infrared light of a particular wavelength which is not visible with the human eye.
This light gets reflected back from the obstacle present in form of the robot to the photo transistor, when the Infrared light of this perticular wavelength enters the phototransistor device it allows the current to flow from the collector to the emmiter of device. This current flow creates a voltage drop across the resistor connected with the photo transistor and this voltage drop is read by th ADC of the microcontroller which varies as the intensity of light reflected changes. By this way we can determine how far is the obstacle from the robot.
For controlling the intensity of the transmitted light we used N-Channel Mosfet whose gate is controlled by PWM signal given by the microcontroller. By varying the PWM duty cycle we can control the intensity of the transmitted light from IR emmiter by which we can control the distance sensitivity.
Four Sensor pairs are being used in Mushak (Micromouse)
Placement of IR Sensors
Placing IR sensors pose a challenge, and required rigorous testing and brain storming.
As can be seen in the image above we have visualised 2 cell based maze and bot is placed in first cell.
- IR1 (blue rays) is pointing to the left mid point of next cell.
- IR2 (orange rays) is pointing to the left end of current cell.
- IR3 (pink rays) is pointing to the right end of current cell.
- IR4 (green rays) is pointing to the right end of current cell.
To move the bot in straight line along the diagonal maze pattern , we have considered point 1 and point 2. These two points are the edges of diagonal ends of above pattern . So if bot had to move diagonally we can check for readings at these two points and control the bot accordingly.
Power Distribution
Power to the control circuits is provided by 3V linear Regulator(LDO) which can provide upto 1A current. Power to the motor is directly given to the motor driver through battery.
Additional capacitors are added across outputs for filtering out the voltage. Voltage divider resistors are being used to monitor the battery voltage. Power indication LED has been provided in the PCB. The input voltage for the PCB is 3.7 voltage through a general LiPo battery.
STM32F405RG (Microcontroller)
The below image shows the pinout of STM32F405RG that we will be using for this project :
Decoupling capacitors of 0.1uF are connected near the vdd pins of STM32. Additional external low and high frequency oscillators are added for precise timing.
HSE(High Speed External) clock - 25 Mhz
LSE(Low Speed External) clock - 32.769 Khz
Filter circuit is being used for filtering out the analog reference voltage. Additional Debug switches are being added for debugging purposes.
DRV8833 (Motor Driver)
We have used H-bridge motor driver which can control two motors at the same time via PWM (pulse width modulation) from the STM32F405RG (microcontroller).
The motor driver can supply 1.5 Amps of current per motor which is enough to power up the coreless motors.
This motor driver keeps the controls terminals from the microcontrolller isolated from noise and high volatages of the motor power supply.
VL6180X (ToF Sensor)
We added a Time of Flight sensor in front of the robot to measure the distance of the obstacle in front from the robot.
This sensor measures the time taken by the light signal to get reflected from the obstacle and then measures the distace of the obstacle from the robot.
The sensor uses I2C protocol for communication with the microcontroller and send the distance values. It also has an additional feature of sensing the ambeint light which we can use to avoid the problems faced with IR sensors due to varing ambient light conditions.
Due to cost issues it is not feasible to replace IR sensors with VL6180x, else it could have been a replacement.
HC-08(Bluetooth Module)
We used a BLE(Bluetooth Low Energy) module to communicate to the robot. It is one of the most important modules that is being used in mushak, this bluetooth module will enable us to communicate with the robot and precisely tune it to solve the mazes, additionally it makes debugging easier for us making Mushak user friendly.
The module consumes very less power(since it works on BLE) and works on UART communication to talk with the microcontroller.
For attaching this module we have provided the JST connectors to connect this module externally when required.
AS5600 (Magnetic Encoder)
To measure the RPM and the distance that the robot has covered we needed a type of encoder feedback. For this we used AS5600 magnetic encoders to measure the amount of rotation of the robot wheel.
The magnetic encoders are mounted in an innovative way due to which no external mounts were required for their placement. Since magnets need to be right infront of the IC of AS5600 to get proper reading, we have taken extra care with mount size and shaft placement.
The sensor works on I2C communication protocol to provide the reading to the microcontroller.
MPU6500 (IMU)
This sensor gives the feedback of orientaion of the robot. This MEMS based chip has in-built Acclereometer and Gyroscope by which it can determine its orietation with respect to space.
This sensor works on SPI as well as I2C communication protocol but in our case to get the fastest data transfer, we used use SPI communcation.
Routing
Front Copper Layer:
Back Copper Layer:
Final Routing:
For routing of the control circuitry we used traces of 0.2mm width and for power connections we used 0.4mm width tracks to ensure fairly high current flow.
Solutions to some of the major problems faced while designing PCB
- Minimalising passive components is a really hard task. So to solve this I properly reffered the application notes and datasheet of stm32f405RG. Moreover the design is well tested on simulation platform.
- Efficient placement of components to reduce the size of the PCB. Innovative design to fix sensors and encoders in such a small space.
- Since IRs are sensitive to ambient light we required a mechanism to adjust the brighness of IR Emitter. So to do that we used a mosfet based circuit, so brightness can be controlled using PWM.
- It was a big challenge to place 90+ SMD and THT components on a small size PCB of just 45.7x40mm size.
Issues Faced in Mechanical Designing
Designing Mount
Issue : The main issues faced in designing the Mount were As the Gears acquired were of a smaller diameter, there was an issue of interference between the bearing and the motor. As they were too close, it was impossible to 3D print a mount with the thickness less than 1mm.
Solution : The solution opted for this was to actually disalign the motor and the shaft to give room the bearing housing to be 3D printed. This enabled us to print a more stable base due to the stronger Shaft housing. Below images demonstrate how it was done.
Finalising and Meshing the gears
Issue : As there are a varieties of gears available. It was hard for us to choose the right combination and Built the Model and mounts around it.
Solution : We started with finalising the sizes and the gear ratios needed according to the available spaces. We then did the market research to find the gears closest to our needs and incorporated those models into the Design.
- Comments(1)
- Likes(10)