Keeping Up With the MicroBros – Week 10


This week we competed in the robot drag race and got second place out of four! ​:tada: The main limiting factor was the janky plastic-geared TT-motors in the Mecanum car kit having quite limited speed, however (even though it was remote controlled) it did work, so that is something ​:slight_smile: .

After the drag race (with candy won in hand ​:candy:) we started working on decisions for placement of sensors to attach this week, it made sense to put the HC-SR04 ultrasonic ones in front and back as the requirement for low range and short latency is lower than the sides that we need to avoid bumping into walls. On the sides custom IR sensor assemblies from Iver is getting connected.

Jonathan ​:man_mage:

 Shortly after the drag race we had a first iteration of a mouse that could sense front/left/right, rotate, strafe and adjust speed based on walls in proximity. So at this point we know that we have somewhat control of the mouse, and need only implement the “smart” functionality.

My tasks going forward is to perfect the PID controller that should make sure the mouse is centerred and perpendicular (more tuning is needed), and recognize walls in the correct tile while keeping track of what tile the mouse is in.

Some work has been done to start it off: Here’s how we currently calculate forward / strafe / rotation:

Furthermore, I’ve implemented a moving average filter to cancel out “jumpy” sensor values:

Lastly, I’ve added methods to find minima and maxima when turning to determine when a turn is finished (since we cant rely on sensor values mid-turn):

Mats ​:technologist:

Other than the drag race, planning the sensing and helping out with debugging I’ve been fairly busy with other subjects, university things, and preparing to enter the workforce ​:muscle: . Still I have put time in to ensure goals within the project timeline are met.

Remote debugging

I’ve implemented a BLE service to start/stop running autonomously, manually stepping moving one tile and see live positioning / state of maze.

Implementing these was just like the remote motor control quite a journey as the BLE Generic Attribute Profile is not really meant to be used for RPC.

Some things like update of position, maze updates and start/stop uses notify instead of polling to avoid wasting the CPU-time of the Micro:bit.

Remote controls and state of MicroMouse

Iver ​:older_man:

This week I have been assembling the car. This has mainly consisted of finding a place for the sensors and building them so they can fit on the car.

The IR-sensors were placed inside the car on the sides. I soldiered them to one prototype board each and made sure that the diodes were alone on one side of the board. Then I made holes in the car to stick them through the plastic between the wheels.

The sonar sensors fit perfectly between the wheels in the front and back of the car. So I used some velcro tape to fasten the sensors. All in all it was a good result I think. I hope the solider sticks, as the sensor I had finished had to be fixed again when I got home.

Next week on Keeping Up With the MicroBros ​:people_hugging:

  • Babies (robot) first autonomous step
  • First turn? ​:red_car:
  • Calibrated IR sensors with signal processing (maybe)
  • More Math. ​:mortar_board:

Leave a Reply