Electronic – Ultrasonic rangefinder (for beginner)

microcontrollerprogrammingprototypingultrasound

I'm quite beginner in electronics.

So, to begin with, I wanted to make a simple (?) ultrasonic rangefinder, based on microcontroller. So I had a few questions for experienced in electronics:

  1. What would be the best environment for development – breadboard, or something else ?

  2. What would be best to use: sender and receiver as one unit (example: BPU-1640TOAH12) or a separate units for sending and receiving: Velleman MA40A5S (send) and MA40A5R (receive). If it matters, I would like to measure a distance up to 5 meters.

  3. What is a typical power supply source for such a circuitry ? At least in development. Batteries ? Or something else ? What parameter (voltage, current) would affect the output signal strength ? Do I need to have some advanced op-amp chains (or some other amplification elements) ?

  4. What microcontroller should I be using ? Should be very cheap and simple(= without extra unutilized features). What would you recommend ?

  5. What about using "Proteus" ? Should I trust this program ? Is it any good ?

P.S I'm NOT interested in Arduino.

Best Answer

1 . Breadboard or Stripboard will be fine for prototyping/learning purposes. FOr the latter you need to have basic skills with a soldering iron.

  1. Either should be fine for basic distance sensing. You have more control with separate units , for instance if you want the receiver and transmitter to have different polar patterns (sensitivity angle - you could put one in a tube to make it more directional for example) or slightly different angles (for whatever reason)

  2. Can be powered by any reasonably clean ~5-12VDC >250mA supply (probably get away with less but 250mA is easy and makes sure you have plenty for additional stuff like LEDs, LCD, etc) This could be a DC wall brick, batteries, etc. You will need a regulator (e.g. 3.3V LDO) for your micro but the transducers can be powered directly (up to 20V rms according to Velleman page)
    You will need a couple of general purpose transistors (NPN or N-ch MOSFET - BC337-40 is a good choice) to switch the transmitter with, as you will want to use the higher voltage input rail (rather than the regulated micro rail) for extra range.

  3. Any small 8-bit micro with a couple of timers, a PWM peripheral (a comparator/ADC would be nice) will do for simple sensing and display on e.g. LCD. This could be a PIC16F, PIC18F, AVR of some sort, MSP430, etc. You can get simple dev boards or "starter packs" for all these micros that will get you up and running quickly. For example with a PIC16F you can use MPLAB/MPLABX to write your code on, and use a PICkit3 to program the chip with. Here is an 18F pack that includes dev board and PICkit3. Lots more boards here.

  4. I assume you mean using Proteus for development (I have only seen it's PCB design part) This is okay if you want to go that way, Proteus has a pretty good rep from what I have heard. Personally though, I would stick with the tools provided by the people who make the chips (unless they don't provide anything) I have used MPLAB for all my PIC development and it's a very solid platform. MPLABX is the next generation IDE, based on Netbeans.