Thursday, January 17, 2013

06 All about Motors/ Interface micro to transistors

 
This is a singing toy "Grandma got run over by a reindeer"
before I remove the fabrics... and hack the toy.
Input transducers are electronic devices that detect changes in the real world and send signals into the process block of the electronic system.
Examples of a digital sensor for the reindeer is the microswitches in its hand


Example of input transducers for the reindeer is the push switches in one hand to detect when the toy is being 'stroked'. The microcontroller uses information from the input transducers to make decisions about how to control the output devices.


06 Driving Motors and Other Output Devices
Standard Interfacing Circuits

MSP430 microcontroller
  • only provides up to 10mA per channel and limited to about 50mA
  • possible light up about 4 to 5 LEDs from the chips
  • over loaded will burn out your microprocessor
In order to provide more current, we can use a transistor switch. The transistor will require very little current to switch a much larger load. The 2N3904 will work for low current devices, it rated to 200mA and has a gain around 25. Therefore in order to drive the transistor, we need to provide a current of 8mA.

       Current = 200 mA/25 gain
                    =  008 mA
Since the  MSP430 microcontroller runs at 3.3V internally, we need to choose a resistor that will provide at least 8mA (.008 A) Since there is a voltage drop of around 0.7V across the transistor, the resistor receives about 2.6V. We then need to choose a resistance less then 325Ω.
      
        Resistance = 2.6V/ 0.008 A = 325Ω
        We picked 330Ω because it is the closest resistance in the kit.

The standard schematic for attaching 2N3904 transistor to
MSP430 microcontroller
To interface a signal lamp the standard transistor interfacing circuit
 
 
The MPSA24 can handle up to 300V at .6 Amps of current.
(3 times as much as the little 2N3904)
With such a large gain, you only need a very small current to create a very large current.Reproduce the original transistor circuit except with the MPSA13 Darlington transistor.
DC Motors

Brushed DC Motors are widely used in applications ranging from toys to push-button adjustable car seats. Brushed DC (BDC) motors are inexpensive, easy to drive, and are readily available in all sizes and shapes.






Brushes and Commutator
BDC motors do not require a controller to switch current in the motor windings. Instead, the commutation of the windings of a BDC motors is done mechanically.

There are a number of ways motors can be interfaced to the microcontroller. Here you need to use the power Darlington transistor:

Use the wires from one of the motors on your Hacked Toy as the motor in this circuit. Turn the motors on an off by replacing the signal light with the motor wires and including a 1N4001

At this point you should now know how to use switches and your LDR (Light Dependent Resistor) as input and control the motors in your toy as output.

No comments:

Post a Comment