Today, my Swarmbot PCBs arrived! I’ve put one of the robots together to get a feel for where everything would go and what it would look like so its not too pretty but it seems to be functional and I’ve got the robot working autonomously in obstacle avoidance mode using the front IR sensor.
Main body PCBs
Testing the pieces together!
Front IR sensor
The front IR sensor is a TCRT5000 IR emitter and phototransistor, designed for position sensing or general reflection detection. Unlike for the SwarmSense section, this proximity sensor is very “low class” and has no support electronics for signal shaping or noise removal. I decided upon this because the module uses IR instead of visible light, increasing immunity to ambient light. I do however do bandpass filtering and peak detection in software, minimizing additional external electronic requirements. Due to this, the circuit is very simple consisting of the TCRT5000, two resistors and a capacitor.
IR proximity sensor schematic
The emitter LED is driven directly by the microcontroller. The phototransistor is operating in common emitter mode where R5 is the collector resistor and CF acts as a filtering capacitor. The range of sensing isn’t amazing in this configuration as one of the limits is the precision of the STM32 ADCs. To reduce noise during acquisition too, the servos are disabled during reading this sensor. This doesn’t pose an issue during operation as acquiring the range is a pretty quick task (around 5ms).
Modes of operation
Currently, the swarmbot is programmed to go forward. Once it hits an obstacle, it will reverse while turning right, with the hope of avoiding the obstacle. The swarmbot will continue to reverse until there is no obstacle detected in front of it.
I’m mainly waiting for components to arrive at the moment so I can test the SwarmSense section of the robot, these components should be arriving from RS in a day or two and mainly consist of the phototransistors required.
With the arrival of more parts, further progress can be made! I’m really looking forward to seeing how the SwarmSense module is going to perform though sadly I realised I could’ve built a better performance module with the same part count. Woe is me…
Keep tuned for further updates!