Primus

Decimus doing circuits

Decimus After a bit of a break, I have done some more work on Decimus, my DC micromouse. With all the peripherals tested and working, I have been concentrating on the motion controller or profiler. This has turned out to be harder than I expected. The basic idea is simple enough but the implementation turns out to be a bit tricky. Probably in part because I wanted it to be useable with Primus, the beginner's stepper-driven micromouse.

Primus in control and moving

After a lot of messing about with other stuff, Primus is now back on track and has the basic motion code written and installed. Movement within the maze is possible with steering off the walls to prevent collisions; fixed size moves and in-place turns are functioning; forward error detection and correction is working.

Primus gets moving

Well, it has taken a while but I have finally got the motion control properly underway. Code details will follow shortly. In the meantime, you can see the beast move on YouTube:

Feeling our way with sensors

The sensors are a critical part of a micromouse. Primus uses six infra-red reflective sensors. Here is code to test that they are working. Now that we have a nice display to show what the sensor reading are, we can get that module tested. Since the hardware is very simple, there is not a lot to go wrong. Yet somehow I had a dead sensor when I first tested the Primus prototype. It was a simple dry joint that would have been detected by more careful inspection of the board.

Adding a timer and the graphical LCD

primus micromouse splash screenThis is a fairly big jump. With the LEDs and buttons tested, it is time to add the main graphical display, made from a Nokia cellphone display. Also, there is the main system timer event.

The simple user IO is working, and it is time to add a system timer. This will generate an interrupt every millisecond. In the final mouse a lot of work will be done in here - processing buttons, driving the LEDs, reading sensors and calculating drive signals for the motors. While that may seem a lot in a millisecond, the dsPIC used in primus can execute about 16,000 instructions in that tme and we should only need a small proportion of that time.