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.

(more…)

Continue ReadingDecimus doing circuits

Another Decimus patch

This one was pretty stupid really. The motor drivers are H-bridges made from complementary pairs of MOSFET (the Zetex ZXMC3A16DN8 (datasheet). These need a proper driver chip to ensure good turn-on and turn-off times because of the gate capacitance. for the driver, I used the common Maxim MAX4427 (datasheet). There are several alternative equivalents. However, instead of using the motor supply (battery positive) for VDD, I used the +5V logic supply … stupid.

(more…)

Continue ReadingAnother Decimus patch

Decimus hardware fix

It was all getting too awkward. A bit of short sighted design on my part had the Nokia LCD sharing an SPI port with the motor encoders. This meant that I had to turn off the encoders to write to the LCD. While no motion information would be lost by doing this, it effectively meant that I could not, for example, have the mouse hold position while updating the display. In the end I took it all apart and patched the circuit board so that the LCD is now driven from the SPI1 port and the encoders are on the SPI2 port.

(more…)

Continue ReadingDecimus hardware fix

Movement at last

Now that Decimus has all its bits fitted, it is time to get on with the more serious business of driving it about. The basic code for the motor PWM driver has been tested and suitable drive commands can be sent to them. Since this is a PWM system, a motor command is effectively a percentage of the battery voltage applied to the motor. The encoders produce about 26 pulses per millimeter. This has yet to be calibrated. A very simple speed control has been implemented for the first test.

(more…)

Continue ReadingMovement at last

LS7366 quadrature counter

The LS7366 is a 32 bit counter with a direct interface for quadrature signals from incremental encoders. There is also an index channel for marker functions. The interface to the microcontroller is SPI mode 0 making it relatively easy to drive with a variety of common controllers. Decimus has one of these on each motor channel connected to the encoders on the back of the Faulhaber 2224 coreless motors. There is very little information about these chips available except the data sheet. This is how they are used on Decimus. (more…)

Continue ReadingLS7366 quadrature counter

Battery voltage monitor

Decimus has one of the ADC inputs dedicated to monitoring the battery voltage. The batteries used in this micromouse are Lithium Polymer cells and it is particularly important that they are not allowed to discharge too far. Since the full battery voltage is about 7.4 Volts, this gets divided by four in a simple resistive divider before being sampled by the ADC.

(more…)

Continue ReadingBattery voltage monitor

LCD testing for Decimus

Having installed the LCD, it was time to get the code working for it. First I realised that it may not have been so clever to put the LCD on the same SPI port as the encoders. This will mean that I have to take care that the encoders are not being read when the LCD is active. Since the encoders are sampled every interrupt, it means turning them off while writing to the screen. That, in turn, means not writing to the screen while moving, or holding position. I may end up having to patch the board to put the LCD on the other SPI port. In fact, I wish I had done that in the first place as it would just share lines with the UART and I could easily switch between the UART and the SPI for writing debugging messages. Ah well, live and learn. (more…)

Continue ReadingLCD testing for Decimus

Formula1 Rat Race – How fast is that?

The schools competition includes a head-to-head drag race called Formula 1. If you want to know how fast you have to be, read this.The Formula 1 Rat Race track is straight and 7.2m long. At the start end is an area 375mm long where the rat starts from. At the end is a 1.2m long area for the mouse to come to a rest. It must not overshoot this area of penalties will be incurred that will almost certainly eliminate the rat from the competition. (more…)

Continue ReadingFormula1 Rat Race – How fast is that?