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.


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.

  • \$\begingroup\$ Wow! Thank you for your expanded answer. Really good explanation! Thank you so much! \$\endgroup\$ – Dmitri Sep 29 '12 at 18:21

Solderless breadboards are good if you're looking to try something out, but for a more permanent solution you can get solderable protoboards. My personal favorites are protoboards which mimic breadboard layouts, like these from Wright Hobbies (not a paid promotion, just from experience).

Another alternative is to design and make your own PCB's. There are a variety of groups which order in batch from professional manufacturers making the overall cost quite low for small volume prototyping work. My personal opinion is that OSH Park is the current leader for small one-off type projects both in cost and quality (again, no sponsorship just experience).

There are a wide variety of cheap micro-controllers available. The two I've heard the most about for hobbyists are the AVR's from Atmel and PIC from Microchip. There's also many other platforms available such as ARM (from many different manufacturers). Random fact, AVR chips are used in Arduinos, but the Arduino library is designed for ease of use for beginners rather than direct hard-core performance. It is possible to access the low-level AVR functions on Arduinos to get much better performance, though. I'm not familiar at all with PIC, but from what I've heard they're cheaper than AVR chips and tend to have less features per chip.

Most of these low-powered microcontrollers consume very little power (though I guess little is objective) and can easily run off battery power. I think the most common voltages are 3.3V or 5V, though I know many AVR's can operate at lower voltages if you don't necessarily need the maximum "spec'd" clock frequency. You can use a voltage regulator IC to help deliver the correct voltage range to your circuit.

  • \$\begingroup\$ Thank you for your answer! Now the only thing i'm curious about - voltage and current: how would they affect input/outpu signal strength. Which one I need to amplify (and I think I would need to), if I like to have a shot at ~5 meters long ? Oh! Sometimes at schematic I see same Vcc (Vdd) value used at several imputs (e.g +5V). Is it the same source, or they are different ? \$\endgroup\$ – Dmitri Sep 29 '12 at 18:00
  • 1
    \$\begingroup\$ On a given chip these are usually from the same source, though they should probably have their own decoupling capacitors. \$\endgroup\$ – helloworld922 Sep 29 '12 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.