Introduction

High Level Design

Program Design

Hardware Design

Results

What Next?

Source Code

Schematics

Pictures





Hardware Design.

The Transmitter:

We chose the Mega163 MCU because we needed AD converting function for our analog controlled hovercraft.  However, in order to read the analog input voltage, we need some form of potentiometer to output the voltage value.  In our case, we chose the analog joystick in a PlayStation2 controller to be our main analog voltage input device.  The PS2 joystick has a spring underneath each joystick control.  When full forward is pressed, it sends out 0V; when full reverse is pressed, it sends out 5V; when the joystick is still, it sends out around 2.3V (almost half of 5V).  Basically, the joystick acts as a variable resistor that outputs different voltage value at different pressure.  The other unique piece of hardware we have on the remote control is the transmitter itself.  The Mega163 TXD pin is connected to a RD resistor at 330 Ohm while a 220 pF is connected to ground.  The transmitter worked very well with the Hovercraft; however we have not had the chance to test our transmitter over a distance of 10 feet due to the power constrain of the hovercraft; we had to constantly attach it to a DC power supply.  

 

 The Receiver (Hovercraft):

 This hovercraft has three electric DC motors; two for the speed and direction control and one is used for inflating the hovercraft itself.  The two speed motors are only on when the user sends a signal and they have to be able to turn at different directions and speeds; thus H-bridges seem like the best option.  After experienced with several different designs of H-bridges, as well as space constraint, we decided to purchase the LMT182000 55V 3A H-bridges from National Semiconductor.  Like all H-bridges, the LMT-18200 has four MOSFET transistors lined up to create two distinct channels of current flow and the channels look like an H.  One channel of current flow creates a forward spin and the other creates a backward spin.  The LMT-18200 needs a PWM input to control the speed and the direction of the Motor. 

 In addition, we added couple bootstrap capacitors (10nF) to each end of the motor to reduce the noise generated by the motors.  However, when we first connected this setup on the breadboard, the setup was a complete failure and the motor twitches constantly.  This made us realize that getting rid of noise is going to be a big part of this project.  We placed a 220uF electrostatic capacitors and several 1 uF non-polar capacitors between power supply and GND to absorb the spikes and possible back current caused by the motors.      

 This set up solves the problem and the motors can once again turn nice and smoothly.  In fact, we could adjust the speed and direction by varying the width of the square wave.  Once we got this part working, we proceeded to build similar individual setup for the other direction motor, and that also worked.

 For the inflating motor of the hovercraft, we want this motor to be running constantly and it can only spin one direction, thus we did not need to use an H-bridge.  This part of design seems deceptively simple, because it can only operate under single speed and direction.  We thought we could add an unique feature which most R/C toys do not have, radio controlled power-on switch from the transmitter; so that user can turn on and off the hovercraft remotely.  To accomplish this, we followed the lab 6 setup:  Using a TIP 31 NPN transistor, with its gate connected to the port pin of MCU through a 1.5K resistor, to control the motor.  A Vdd output from the pin would turn on the gate of the TIP 31 transistor and the current can flow from Vdd to GND through the motor.  We added a diode across the transistor to prevent current flow back to the MCU and cause electrical damage.  Once again this setup worked well on the breadboard with the STK-500 board. 

Once we have finished testing our designs on the breadboard, we thought it was time to combine all the working parts into a functional hovercraft.  This step requires massive amount of soldering.  The original design was to have all three motors, including the MCU, to share the same power supply and ground.  That turns out to be a complete failure.  When the circuit was first connected, we were able to have the MCU pulse the two H-bridges to turn the motors for only a short period of time.  After using the voltmeter and oscilloscope to check every single possible node on the circuit, it seems that when one H-bridge is on it drains most of its current supply, and this caused the other motor to malfunction due to lack of current flow.  When we tried to turn all three motors on at the same time with the same power supply, we heard engine tweaking left and right before the entire system shut down.  In addition, the noise generated by the motor became a huge obstacle in completing this project.  The obvious choice was to separate the power supply share the same common ground.  To reduce the noise issue, we added capacitors to everywhere imaginable; mostly, across motors and between power supply and ground.               

The result of adding capacitors made a huge difference in the performance of the motors.  The received signal is not as noisy as before, and the capacitors absorbed a good portion of the motor spikes.  Having separate power supply for each directional motor provided smooth increasing and decreasing speed of the motors as well as the directional control.  We also placed a 0.33uF non-polar capacitor across the inflating motor, and that changed our results dramatically.  At this point, we thought we were on our way to a fully functional hovercraft.

When we put everything together with a few minor structural reconstructions, we could remote control the two direction motors at different speed and remotely turn the hovercraft on and off.  However, we faced another problem.  It turned out that the TIP 31 power transistor did not generate enough current for the inflating motor, thus the hovercraft could not inflate.  To solve the current problem, we built a Darlington pair transistors to increase the current gain across the inflating motor.  Basically we connected the emitter of a 2N3904 transistor to the base of the TIP31 and have both of them shared the same collector (refer to receiver schematics).  So now the output Pin of the MCU, (PORTC.0), is connected to the base of 2N3904 through a 1.5K resistor.  The result of Darlington pair design increased the current through the motor by 1000 fold and we could actually inflate our hovercraft.

However, we also faced an additional problem to our new hardware design; we could no longer control the MCU and the two directional motors.  When we measured the received signal on the scope, it was a bit unstable than our previous design.  Our remote control power switch did not work either.  It seems that the receiver MCU was receiving noise generated by the motor itself.  It is really hard to identify the problem, we have tried placing additional capacitors across the motors but that did not solve the problem.  However, we disabled the remote power control option by disconnecting the motor from the Darlington pair and connected directly to a 5V power supply; we could gain the control of the hovercraft again with slightly more inflated than before; but it is still not as good as the originally purchased hovercraft.