How Can I Use a Freescale Microcontroller for Ultrasonic Obstacle Detection?

  • Thread starter Thread starter neilmartin
  • Start date Start date
  • Tags Tags
    Microcontroller
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
neilmartin
Messages
1
Reaction score
0
I'm using a freescale DEMO9S12XDT512 microcontroller as a control system for an airship. The airship uses ultrasonic transducers to detect obstacles so it can then avoid them, to do this I want to send out a pulse from the transmitter sensor and measure the time that it takes to return to the reciever so I can work out the distance from an obstacle. Does anyone have any tips on how to do this as I have can't seem to figure it out, I am using codewarrior development studio to write the program.
 
Engineering news on Phys.org
What does the interface to the UltraSound transducer look like? Is it high level (like an SPI interface where you can just keep reading out distances that are measured at some periodic rate by the US sensor), or is it totally low level where you need to drive in a wavelet at the US frequency and then stop and start watching the RX sensor line?

How busy is your uC already? Can you afford a non-maskable interrupt if you need one? If you have to do the US stuff at a low level with your uC, it will be very busy, especially if you are doing multiple sensors.