Foundation Degree in computing - main project. Project to convert K-9 toy into an autonomous robot. By Kristian Dunn

Wednesday, 23 December 2009

It's nearly xmas - and the first wave of screw-ups

Since the last post I have been hectically working on other assignments and also the circuit diagrams and vero board layouts for the control boards. The first screw-up encountered was with the Velleman boards themselves. They have an open collector output which requires more components to interface to it. This was overlooked in the initial designs. As I am working with 74HCT series logic I can interface directly with the PIC microcontroller on the board. This is easy for the digital outputs as it is just a case of removing the darlington driver chip and jumping across the DIL connector to bypass this. The PWM output however required tracing the PWN output on the chip to the first component it encounters (a resistor in this case) and soldering onto the lead of that component. This avoids soldering directly onto the chip itself.
The second screw up in the design was the clock division of the PWM output. My circuit simply divides the clock on the positive edge. When testing on breadboard the LED output remains half brightness wherever the PWM slider is placed. This is because the clock is being divided but the duty cycle (PWM ratio) is lost. I have decided to go with the direct output and see if it works without slowing the clock speed.

After some calculations the components have been changed from the original circuit diagram so more current flows.

The third and final screw-up came evident when building the test circuit today. I use a faulty computer PSU as my bench supply which has bad output capability and tends to drop its output voltage when more than 2 Amps is asked from it so I can test most circuits without risk of damage to the components.
Somewhere along the line I downloaded a datasheet for PN2222A transistors and not P2N2222A. Only a subtle difference in part number but a totally different pin configuration so the initial breadboarded test circuit kept shorting out the main supply. This fault was quickly traced using a multimeter and the correct datasheet downloaded as a result which shows the correct output pin configuration as CBE as opposed to EBC for the PN2222A. Rotating the transistor through 180 degrees on the breadboard solved this little mishap and tests using LED's show the circuit to work very well.

So today one of the chassis motors was wored up to the test circuit and I am very happy to say that it works very well. The useable range of PWM seems to be from around 50 to 150 from a range of 0 to 255 in the software. Off load the motors pull around 0.3 Amps and stall at around 1 Amp.

This is a video of the test circuit in action.

Here is the chassis being tested. Note the direction change of the motor and the varying speed.

These two pictures show the original designs before the problems were encountered.
This is the logic controller which selects direction and prevents short circuits through the h bridge


The H-Bridge output circuit.



The Logic COntroller Vero Board design.


The Output Board Vero Design.


The next two pictures show the test circuit. The third shows the modifications to the Velleman board.





Followers