BotDream.com Re-Started! :) Software/Hardware used to work with Microchip PICs
2007 01 Nov

I’ve just completed the 2nd H-Bridge circuit to command the DC motor. Since my time is short I decided to make the circuit on a test PCB board. I’m also a little rusty on the PCB software (Protel or Eagle - no more Orcad for me, I’ve had my share!). I’ve done better circuits, but this works and I’m good with that!

botdream interface

botdream interface

botdream interface

Also made some test and I’m quite happy with this circuit!

Quick info:

The Red wire will connect to the 12VDC (positive pole) of the robot main battery. Black wire to the Ground (negative pole) of the battery. Note that Green pair (Signal to control motors power) will be connected to another interface that will apply PWM signal with max. amplitude of 5V and it is necessary to connect both Ground from the 2 distinct circuits (Power / Control circuit).

The Brown pair will be connected to the DC motors.

The Green pair of wires will control the amount of power delivered to the DC motors (Brown pair). The control is done with a PWM (Pulse Width Modulation) signal to one wire from the pair. If the PWM pulse is applied to the Green wire the motor will rotate on direction A, if the pulse is connected to the White/Green wire the motor will rotate on direction B. If both wires are connected to the signal max value (5VCD) then the motors will be short-circuit, meaning that the robot will stop immediately (Breaks On). If both wires are connected to Ground signal the motors will spin freely.

Tests and measurements:

I’ve connected 2 6VDC motors (one each h-bridge circuit) and applied a 1KHz PWM Signal (Square Wave), with 5Vpp of max amplitude and off-set 2.5V (meaning that signal will have voltage values from 0V to 5V). For the tests I’ve change PWM signal Duty-Cycle from 10% to 50% and made some measurements:

Duty Cycle 10% 15% 20% 25% 30% 35% 40% 45% 50%
Motor 1 current (mA) 100 140 150 200 220 220 220 230 250
Motor 2 current (mA) 110 170 200 230 250 260 270 270 270
Motor 1 voltage (V) 1.9 3.5 5.0 6.0 6.7 7.4 7.8 8.3 8.5
Motor 2 voltage (V) 2.3 3.1 4.0 4.6 5.0 5.7 6.3 6.7 7.5

After the test I’ve connected the circuit to the robot’s motor and applied a PWM signal with 30% Duty
-Cycle and the robot started to move! Really nice, now I’m happy!

Next step will be to create the middle interface that will receive commands for PC application and then send them to the motors to drive the robot around!

3 Responses to “2nd H-Bridge circuit is now completed”

  1. Ukri8051 Says:

    Ehehehehhe be careful whith secret services, they dont like crazy electronics guys !!! but i love the project, any help you know here to find me eheheheheh
    just a tip, trie to use an i2c expander for save ports on the Pic (why not a 8051 ? is the best !!!! ehehehe ) the expander will allow an easy upgrade in the future…….just an ideia…….
    Keep the good work !

  2. Nelson Neves Says:

    Hi, look who is here, my friend Ukri8051! Thanks for your post! I will investigate a little more on the i2c expander. About the micro 8051 I really like it but i haven’t use it for quite a while :( … I’m a little more confortable developing with Microchip PIC. I’m using CCSInfo Pic C tool wich has big comunity and a lot of good C libraries.

  3. Testing PIC 16F690 PWM 4 multiplexed channels Says:

    […] This will be required to drive my previous module that will control the DC motors (will need to have PWM switching between P1B and P1C - this will invert DC motor direction): http://www.botdream.com/blog/2007/11/01/2nd-h-bridge-circuit-is-now-completed/ […]

Leave a Reply