ultrasonic range meter problem


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    44

    Default ultrasonic range meter problem

    i have problem to drive the tranduser.i saw in many circuits drive the tranduser direct from two ports with 180 degrees diference so they can take 10 volts in the tranduser.i try to do it with PBP but i can't do it.can anyone help me if i can do it with PBP and how.

    thanks

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    are you saying you want to drive 10Volts to your Sensor?!? in this case you can just add an external op-amp or a transistor circuit with a gain of 2.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Warrier's Avatar
    Warrier Guest


    Did you find this post helpful? Yes | No

    Default

    Hi,
    driving both sides of the transducer alternatively will give you 2xVdd bipolar signal but make sure the xducer terminals are floating. I am assuming it's 40kHz unit - these present a high capacitance load and am not sure PIC can give you enough drive to get the full Vdd amplitude. Hopefully you don't have any tuning inductor across the xducer..

    Like Steve says, use couple of transistors to buffer the PIC output.

    As for code - you are looking at 12.5usec pulsewidth -so assembly would be the way - unless Steve can help you with generating such short pulses with PBP. Remember that these have narrow tuning range (no more than 1kHz or so or Hi Q) so you don't have much room for pulsewidth variation- may be you need to use HS clock... PBP, as far as I know, can only put out pulses in 1usec interval (pauseus) so you have to use 12usec for pulses and 1usec in between. And to get good acoustic power out you need a burst of few cycles ....

    -warrier

  4. #4
    anj's Avatar
    anj Guest


    Did you find this post helpful? Yes | No

    Default

    If you just want to generate a 40KHz tunable duty cycle pulse, use a chip that supports hardware PWM.
    Though PBP doesnt allow you to set a PWM greater than 32767 ( using HPWM ), you can manually set the required registers ( without needing assembler ) and get it to fire off at a perfect 40KHz PWM ( 4MHz, 8MHz oscillators work perfectly for the arithmetic ).
    Feed this into a set of OPAMps running as differential comparators, with the transducer across their outputs and bobs yr uncle.
    If you need more power, then use the PWM to drive a transistor/mosfet on the supply to the transducer.
    Andrew

  5. #5
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,046


    Did you find this post helpful? Yes | No

    Default

    USEFUL INFORMATION ON ULTARSONIC RANGEFINDING:

    http://users.picbasic.org/index.php?page=searchprojects

    http://users.picbasic.org/projects/u...xperiments.pdf

    http://www.picbasic.org/forum/showth...ght=ultrasonic

    the picbasic langauge used may have features that dont exist, yet, in PBP, but the underlying techiniques are valid and applicable as are the circuits and design principles.

Similar Threads

  1. Problem to compile my program
    By wagner in forum Off Topic
    Replies: 5
    Last Post: - 7th July 2008, 20:17
  2. Ultrasonic range meter
    By Crista in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th June 2008, 18:01
  3. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  4. RF range problem
    By George in forum Off Topic
    Replies: 10
    Last Post: - 19th March 2007, 04:11
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59

Members who have read this thread : 0

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