Wire guide & H-bridge control


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default Wire guide & H-bridge control

    Hi All,

    I think this might be a very interesting topic for all robot builders


    I have build a prototype robot with 2 DC motors controlled by a dual H-bridge controlled by I2C

    http://www.robot-electronics.co.uk/htm/md22tech.htm

    I2C control is quite easy, i use the turn mode


    The robot needs to follow a buried wire with 100 khz RF, as buried wire detector I build the following circuit

    http://www.philohome.com/sensors/filoguide.htm

    Has anyone a code example on how to do the PID control and eventually additional filtering and hysteresis ? starting from the deteted
    DC voltage on the ADC

    I think the control will be quite the same as the line following robots (black line)

    Maybe we can start a code discusion with examples here, so everyone can learn and share little pieces of code ?

    Cheers

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Wire guide & H-bridge control

    Hi RFsolution,
    With line following robots, they have inputs from both (or all) sensors so that they know if they are way too far over.

    From your description you have 4 distinct zones of control.
    1) the wire is way over to the left of the left most sensor.
    2) the wire is between the left and right sensor.
    3) the wire is way over to the right of the right most sensor.
    4) their is no wire

    If you use a differential output from a comparator or such then you could loose the ability to sense if the wire goes outside the two sensors (far left and far right).
    However, if you ADC scanned both sensors at a rapid pace then your robot is less likely to get lost also, it means that your control loop can be tuned so that the robot can speed up when it the wire is in the centre and slow down if it thinks it's loosing the wire. But also, the adjustments to motor control can be small when the wire is in the centre and progressively coarser the more the wire moves from the centre.

    Also, you don't necessarily need to use coils of wire as detectors, the analogue hall effect sensors would be an easier, smaller and cheaper option. Be aware though that Hall effect sensors come in at-least two types, one has a digital output that is on when a certain field strength is reached, these types will not work for your needs. However the analogue ones give you an output that can be fed directly into the ADC to provide a voltage based upon how much of a magnetic field is being picked up.

    I hope this helps...

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Wire guide & H-bridge control

    Hi Comwarrior

    thanks for your information,

    I will have a look for analog Hall sensors, never used them

    Ofcourse with the LC coil detector like lego mindstorm, i can feed both detetor voltage to 2 ADC's separatly, maybe this is more simple ?

    Can you point me to some often used analog hall effect devices ?

    will google and Farnell a bit

    Thanks

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Wire guide & H-bridge control

    well, according to the datasheet the A1302 should work fine for your application.
    5V only though, but it's linear 1.3 mV/G so for every 1.3mV on its output you have 1 gauss... if you used a 4V precision Vref (some pics have them onboard) then you could actually make your bot detect and measure the EM field.
    Best yet, it cheep £0.99 each...

    Here is the farnell link... http://uk.farnell.com/allegro-micros...sip/dp/1791388

    Also, ontop of this... you don't have to use an AC circuit to drive the wire... you can run DC through it... thus saving even more time and money...

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Wire guide & H-bridge control

    Thanks, I took a look and ordered a few to test, as the wire is buried I need to detect it at a distance of 10-20cm, I'm thinking to install 2 sensors about the same distance and then use 2 ADC's

    I get back here if i did some tests

Similar Threads

  1. Need guidance with DC motor controller - PWM & H-Bridge
    By rfetech in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th November 2010, 03:33
  2. RC H-bridge control
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th March 2006, 14:10
  3. Replies: 6
    Last Post: - 10th June 2005, 07:31
  4. H-Bridge control DC motor
    By Paul F in forum General
    Replies: 8
    Last Post: - 11th March 2005, 12:50
  5. H-Bridge control DC motor
    By Paul F in forum General
    Replies: 2
    Last Post: - 2nd March 2005, 21:04

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts