Circuit Design

Circuit Design

The circuit design aims to minimise cost, area and component count. In this section, subcircuits will be introduced and discussed.

Power 

An MCP1702 3.3V linear regulator provides a stable source for the MSP430. Its maximum supply voltage is too low for direct connection to the battery and in any case, the noise produced by the motors would likely be too great.

Motor Drivers


Instead of a conventional H bridge for each motor, two are merged to drive the pair with six MOSFETs. This reduces the number of transistors required by two. Three QS6M3 dual complementary P-N FET pairs are used. They are very nice SOT23 devices optimised for low gate drive. With this circuit simplification, the motors may not simultaneously be driven in opposite directions to spin on the spot. Instead, they are driven alternately. This is no great loss, since the motors are driven with PWM and usually under half speed. At full speed the robots move far too fast!

Four signals M1, M2, MP and MN are driven by the MSP430. They are all pulled up to Vbatt with 10k resistors. This is essential because the MSP430 is powered through a 3.3V regulator whereas Vbatt may be as high as 4.2V on a fresh charge. If the MSP430 only drove the signals to 3.3V, the P-channel FETs would never completely turn off. Instead it drives the signals low or tristates its output to let them be pulled high to the Vbatt rail. Applying 4.2V to the tristated MSP430 inputs is safe, according to its datasheet.

Charging

A Microchip MCP73833 lithium polymer charge controller allows the robot to charge from any 3.5 to 6V source. This was a decision of utility over economy. Charge management could be controlled for each robot by the charging station, saving the use of a charge controller on each robot. However, centralised charge management would be a complex matte, as the charger would have to support a varying number of parallel cells at different charge levels. This might necessitate an individual bay for each robot. For an extra ~40p per robot, any number of robots may drive into a  simple charging bay; the number only lmited by space and charger output current. Battery charging status is reported to the MSP430.

At the time of writing; the MSP430 cannot measure the battery voltage. This was an omission corrected post-assembly with a simple PCB modification. A correction will soon be made to the design. If the battery is run too flat, its on-board protection circuit isolates it from the robot; preventing it from being charged by the usual means. This annoying bug can be corrected with the battery voltage modification and a simple firmware change to disable the motors when charge is dangerously low.

Communication 

 

IR communication circuit

 The robots use three photodiodes to receive IR communication from any angle. The photodiodes are also used as ambient light sensors, for crude "sun"-based navigation, and so on. These two tasks require different biasing conditions. A 10k bias is used for IR reception which requires low sensitivity, and 100k is used for sensitive measurement of ambient light. The MSP430 sources BIAS1 and BIAS2, switching appropriately. AC coupling s required in the receiver front-end circuit to filter out the DC photocurrent generated by ambient light. The 10k resistor and 330pF capacitor forms a high-pass filter that removes the DC and low frequency components of the IR signal. The filter reaches 3 dB attenuation at approximately 1 kHz. The received signal is superposed onto a DC value of half of the supply voltage by the resistor divider formed by R20 and R21. The DC voltages from each photodiode are fed to the MSP430 at PD1,2 and 3 for ambient light measurement. The bias is switched and ambient light measusrement is performed during IR transmission when the robot is transmitting a zero - the only time the photodiodes are not in use for reception and are not swamped by the transmission LEDs!

The IR transmission LEDs are switched with BSS670 FETs as the MSP430 cannot source sufficient current. The same is true for the "mood" LEDs and food detection LED.

"Food" Detection 

Floor-looking photoreflective sensor and associated circuit
An Avago APDS-9101 is used to measure the reflectance of the floor, and detect reflective food tokens. A 2.2k resistor biases the phototransistor, and the resulting FOOD signal is connected to an analogue input on the MSP430. The signal is measured with and without illumination. The two readings are subtracted to estimate surface reflectance. For example, if the two signals are very similar, then most of the transmitted light was absorbed and reflectance is low.

We found surprisingly little variation in the IR reflectance properties of many materials. Black and white card tested were both highly reflective whereas black crepe paper was an excellent absorber. We wanted a durable and strongly absorbing surface for the test arena floor. We resorted to walking around B&Q with the robot in its test jig connected to a portable oscilloscope! Eventually we found a matte black wallpaper with floral gloss black pattern which was a superb absorber. Pale yellow card was found to be the best reflector, so we used it for the food tokens. To enable the robots to push them around, a small puck of thin plywood was stuck to each token.

Full Schematic 

is here in PNG format. See the downloads page for files in Eagle format.

License

Creative Commons LicenseFormica hardware by S. English, J. Gough, A. Johnson, R. Spanton, J. Sun is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.

 

categories [ ]