I was in a team of 5 that was competing in a robot competition, held at my university. The competition was similar to the famous robot firefighting contest held at trinity college. The goal of the competition was to build an autonomous robot that could navigate in a simple model of a building. The building consisted of four rooms. In one of the rooms, there was a lit candle. The robot’s task was to autonomously navigate the building and find the candle and put it out.

Even though we officially did not manage to put out the candle, we did pretty well and came second place in the competition. As you can see in the video below, the robot managed to put out the candle with some help. 😉

The mechanics

Another group member designed and 3d-printed the body of the robot. The robot also used special wheels called Mecanum wheel, which allows it to move in any direction and rotate on the spot. Each wheel was driven by its own stepper motor. To control the arm with the sponge, a small servo was used.

The electronics

The electronics used was a Raspberry Pi, an Arduino with a 3d-printer control card to control the stepper motors, 4 ultrasonic distance sensors to measure the distances to the walls and a camera with its IR-filter removed to detect the burning candle.

To power everything, a combination of USB-powerbanks and Li-Po batteries were used.

The software

For the Arduino, I wrote a custom program to control multiple steppers in parallel. I also used my knowledge in control theory to ensure smooth acceleration at all times. This was to avoid slippage of the wheels and thus improve the dead reckoning of the robot’s position. To achieve this, I put a digital low pass filter in front of the stepper velocity signal. Then I developed an LQ-controller around that to be able to control the absolute position of the steppers smoothly. The Raspberry Pi could then command the Arduino via serial to move the robot with constant velocity or to a specific absolute position.

On the Raspberry Pi, a rather involved software stack utilizing Linux, Docker and ROS2 was used. Different ROS2 nodes were used to control to interface with the hardware and Arduino. To explore the building, it was thought of as a maze and a graph was iteratively built up using a version of depth first search. Detection of cycles in the graph was done through the robot estimating its absolute position using dead reckoning of the stepper motors. When the robot was close to a node that it had already visited, a cycle in the graph was detected. This worked quite well in practice.

There were bonus points for starting the robot by it detecting a tone of a specified frequency. Using the principles of detection theory, I derived an optimal detector of a pure sine-wave with unknown amplitude and phase offset. The detection was tuned by setting a threshold for the percentage of the signal’s energy content was of the sine wave. This was implemented in a ROS2 node that was connected to a microphone, and this worked really well in practice.

For detecting the candle, a ROS2 node using OpenCV was used to detect round bright objects. This worked good in practice.

This summer I worked as a intern in a joint project between Saab and Dyno robotics. The goal was to investigate available open source technologies for drone swarm. For the project we used drones from the Swedish company Crazyflie. As for the internship we did high level programming to coordinate the drone swarm and developed software to be able to design a drone-lightshow in the 3d-engine unity and then send commands to the individual drones to perform the show in real life. Programming was split equally between C# and python where C# was for unity and python for crazyflies python API to control the drones via radio.

Here is a video summarizing the project nicely.

I and five other students made a game in C++ over the course of three months as part of a course in C++. It is very much inspired by the classic Bloons TD where the goad is to stop balloons in their way from the entry to the exit by placing down towers. When you kill balloons you get more cash. Our version has the same principles but you are supposed to stop Santa and his elves instead of balloons. The code is over on Github.

I 3d-printed my own keyboard! The keyboard is called Redox so I did not design it myself. I got the switches by desoldering them from a keyboard that I bought used. The swithes are cherry mx red and are externally lubed with some PTFE-sprary. I also got some o-ring for them so that they are quiet. It is a split keyboad so that you can have your mouse in between. I did all of the soldering myself and there is no pcb for the switches. In each keyboard half there is a microcontroller (arduino micro so that it can emulate a usb-keyboard). It is running the open-source keyboard firmware QMK that I have configured to my liking. It connect to the computer via a removable micro-usb cable. The halves are connected with a cable that i made myself with some JST-connectors. The halves communicate with eachother via I2C.

(more…)

As a bachelors project at my university I along with five other students made a special type of microscope called “scanning tunneling microscopy” (STM for short). The end goal was to try and see individual atoms. It involed many different subjects from physics to programming to electronics to control theory. The working principle is something called Quantum tunneling. If you are interrested in the working principles of this kind of microscope, watch this video.

(more…)