Advertisement

motor h bridge

Not rated 15,018

#H-bridge #motor driver #basic stamp #current control #PWM #DC motor #power switching #microcontroller interface
motor h bridge
motor h bridge

Description: The basic stamp cannot directly power motors due to its maximum current output of only 20mA, while motors typically require around an amp or more, with even higher current spikes. To address this limitation, a circuit will be implemented where the stamp sends an on-off signal to a device capable of managing the required current flow. If two peripheral contacts are soldered together and removal proves difficult, a desoldering iron can be utilized. It is advisable to check for connectivity using a digital multimeter to measure resistance between connections. An infinite resistance reading indicates that the connections are isolated, which is desirable. Care must be taken to ensure that solder blobs do not touch each other. The motor driver should not be placed in the socket until all soldering is completed to avoid heat damage. The enable pins function similarly to a car's clutch; they disable power flow from the supply, allowing for motor direction control through the associated pins. Inputs 1 & 2 control motor 1, while Inputs 3 & 4 control motor 2. Motor outputs consist of four wires, enabling control of two motors in either direction or four motors by toggling them on or off. Connections should be made one at a time, ensuring ample wire length. The first pin's position can be identified by a small nub on the socket. For example, if pin 1 connects to ground, a black wire should be soldered to the corresponding pin on the h-bridge, with the other end connected to the stamp ground. A connector should be used for the power connection from a 7.2V battery, ensuring that the connector configuration is not duplicated to prevent accidental connections. Only the enable A and B pins, input pins, ground, and 5V from the stamp should have bare wire connections. It is recommended to wire the battery connections with polarity to avoid reverse voltage. The h-bridge should be placed in the socket, aligning pin one with the nub side. Pins may need to be gently bent to fit properly, noting that there are 15 wires on the h-bridge and 16 spaces in the socket, leaving one space empty. After wiring the h-bridge and placing the chip in the socket, it is important to connect it to a power supply that outputs 5V and 12V.

To implement this circuit effectively, the following components and steps are necessary:

1. **Basic Stamp Microcontroller**: This will serve as the control unit, sending signals to the motor driver circuitry.

2. **Motor Driver (H-Bridge)**: The H-bridge is essential for controlling the direction and speed of the motors. It allows the microcontroller to control the motor's rotation direction by enabling or disabling the appropriate pins.

3. **Power Supply**: A dual-output power supply that provides 5V and 12V is required to power the microcontroller and the motors, respectively.

4. **Digital Multimeter**: This tool is crucial for verifying connections and ensuring that there are no unintended shorts between soldered contacts.

5. **Desoldering Iron**: Should any soldering mistakes occur, this tool will facilitate the removal of excess solder.

6. **Wiring**: Use 22 gauge single-strand wire for connections, ensuring that each wire is long enough to reach its corresponding connection point without tension.

7. **Soldering**: Careful soldering is necessary to ensure reliable connections. Each connection should be checked for shorts before proceeding to the next.

8. **Connector Configuration**: To prevent incorrect connections, ensure that the connectors for the battery and motor driver are designed to be non-reversible.

9. **Polarity Protection**: It is vital to ensure that battery connections are polarized correctly to prevent damage to the circuit.

10. **Assembly**: Once all connections are made, the H-bridge should be positioned in the socket with attention to pin alignment, ensuring that pin one connects to the correct corresponding connection.

In conclusion, this circuit design allows for the effective control of motors using a basic stamp microcontroller, overcoming its current limitations through the use of an H-bridge motor driver. Proper assembly and testing are crucial to ensure reliable operation and to avoid potential damage to components.The basic stamp does not have the ability to directly power motors because it can only provide 20mA maximum current, and motors normally need much more, on the order of an amp, with spikes even higher! Therefore the solution we will use is to add a circuit where the stamp sends an on-off signal to a device which can handle the current flow.

This d evice looks as follows: If two peripheral contacts solder together and you are having trouble getting the solder off, use the desoldering iron, available from Chris Cassidy, TA or instructor Check that they didn`t connect together by taking out the digital multi meter and checking the resistance between each pair of connections. If the resistance is infinite (ie you see `0. L` on the screen), that is desirable. If not, you will have to remove some solder between the two connections. Notice that the solder blobs are quite close together. That is fine, as long as they do not touch. Do not place the motor driver in the socket until all soldering is completed. This protects it from heat damage. Enable A and B - These are like the clutch of your car, in a sense. You put in the clutch, change the gear, and then let it out. Likewise here we disable the power flow from the power supply, and then determine the motor direction by turning on or off the associated pins, then enable that circuit pathway to put current through the motor.

Inputs 1 & 2, and Inputs 3 & 4 - These control motor direction. You must turn off the enable pins by using the stamp to set the enable pins to low (0), then turn one on, and the other off, which allows the motor to rotate one direction. Switch which pin is high and which is low to change motor directions. So pin 1 and pin 2 control motor 1, and pin 3 and 4 control motor 2. Motor outputs - essentially four wires, any of which can have power output through them. This allows you to either control two motors in either direction of rotation, or four motors by only turning them on or off.

Connect up the pins, one at a time by soldering wires from one point to another point, as the diagram shows. Leave yourself plenty of length in your wires. Keep track of where your pin 1 is relative to the small nub on the socket. Typically that is used to tell where pin 1 is. Align that nub with the side that pin 1 will be on for your h-bridge. For example, if the diagram shows pin 1 is connected to ground, solder a black wire to the outer pin on the corresponding pin for the h-bridge, and the other side will go to the stamp ground, so use a wire that can be pushed into the breadboard at the other end - 22 gauge single strand wire.

Be sure to use a connector (the blue crimp connect connectors) to connect the power from the 7. 2 V battery, and don`t duplicate the connector configuration, ie if your power has the male side on the battery, and the female side on the motor driver. This prevents accidental connections of the battery wire to the motor output and so on. The only bare wire connections going to the stamp are the enable A and enable B pins, input 1, 2, 3, 4, ground, and 5V from the stamp.

Finally, it is recommended that the battery connections are wired to be polarized, so the voltage cannot accidentally be reversed. For example, male goes to the positive 7. 2V wire, female to ground. 5) Place the h-bridge in the socket, aligning pin one to the nub side of the socket, so the pin one wire is connected to pin one on the h-bridge.

In order to make the pins fit in the socket, you must gently bend the pins so that the front row aligns with the back row. Keep in mind there are 15 wires on the h-bridge, and 16 spaces in the socket, so one space on the back row will be empty.

That should be where pin 16 would be if this were a 16 pin chip. Now that you have wired your h-bridge, and placed the chip in the socket, before connecting it to the basic stamp, use one of the power supplies which outputs 5V and 12V, and connect the

Related Circuits