Echolocation with HC-SR04 ultrasonic distance sensor

Ultrasonic echolocation is common practice in many areas including nature itself. We all know how bats or dolphins navigate – they emit ultrasonic waves and depending on time delay of reflected echoes, they can determine the distance from obstacles or catch. From engineering perspective it is relatively easy to measure distances with ultrasound – all you need to know is sound speed in the air and time delay between sent and received pulses. L is the measured distance; CAIR – ultrasound speed; t – time between transmitted and received pulses. The accuracy of measured distance mainly depends on air temperature. Approximately sound speed in air can be calculated by following formula: For instance at 25ºC the speed of sound in dry air CAIR = 346.13 m/s. So if you want greater accuracy, you should also measure temperature to adjust sound speed.

Pressure-less solar collector controller prototype

It’s been over three month since solar collector were installed. I decided to build controller by myself. And it turned out that it stayed in prototype stage. So I put it in to enclosure and left it like is. So far it works fine – water is hot everyday, so I have nothing more to expect. I have not many pictures of build, but I think will share what I have. I you have followed forum thread you probably are familiar what system I was building. As I mentioned the solar collector is cheap made in China and is pressureless. Normally they come with special controller which takes care of refilling tank, ensuring protection from water freezing and other special scheduled routines. Pressureless collector usually is first filled with water which heats and then it is used (mixed with cold). Initial test shows that when collector is in direct sun …

Continue reading

Running LEDs on MSP-EXP430FR5739 FRAM board

In this part we are going to create a simple project for MSP-EXP430FR5739 FRAM board. As development tools we are going to use Code Composer Studio which is free to up to 16KB Flash code size. MSP430FR5739 microcontroller has exactly 16KB of FRAM memory so we can use it all with no hustle. Download Code Compose Studio (CCS) and install it to your PC. Then start application and go to workbench. It is Eclipse based IDE so should be no problem if you have used Eclipse before.

Building STK500 AVR ISP programmer with USB

Programmer is one of the first things to think of when starting to deal with microcontrollers. Luckily it is not hard to build fully working programmer almost for any microcontroller as there are tons of open source projects around. So I decided to build stk500 compatible programmer which is actually taken from I decided not to search for same parts as in original schematics but use what’s on desk. As result I got mix of through hole and SMD soldered board that works great. Short info about STK500 V2 programmer This programmer is a clone of original AVR STK500 programmer. It works on all main platforms including Windows, Linux, BSD and MacOS X. This is mainly because as USB to serial converter there is a FT232RL chip used with full driver support. Probably main reason to build it is that programmer works in AVRstudio where microcontrollers can be programmed …

Continue reading

Adapting graphical LCD with touch screen to ChipKIT UNO32

ChipKIT is a great substitution board to Arduino. It offers better performance as it is based on PIC32MX320F128 microcontroller based on 32-bit architecture. Microcontroller has 128K of Flash and 16K of SRAM on board. Having Arduino Uno shape factor ChipKIT offers more 42 programmable pins. ChipKIT like Arduino can be programmed with bootloader that communicates to PC through USB-to-USART converter chip FT232RQ. Digilent has developed an STK500v2 based bootloader that works on PIC so it is easy to program using AVRDUDE tool. Besides that they adapted an Arduino envoronemt to work with ChipKIT boards. It’s called Mpide. It also support Arduino boards but it aim is to program ChipKIT boards. Progamming experience is pretty same as for Arduino and even most of examples written for Arduino works on ChipKIT. This is true since there is no specific hardware elements touched like program memory or EEPROM. As you know Arduino is …

Continue reading

Rethinking AVR DDS3 signal generator project

These things happen all the time. When you start a new project, but feel from the beginning that it’s not what you wanted. Usually they end up collecting dust. I think there is nothing shameful because it is better to fail than do nothing. There are thousands of examples where people, companies start new projects with enthusiasm but they never reach the day light. But without those efforts we wouldn’t see other great projects and products. Not all of them are made from first try. It’s been over a year since announcement of AVR DDS3 signal generator. As you have noticed there is no progress so far on it. And I am going to five up on it for a couple reasons. From the beginning I didn’t feel comfortable with it.

AVR DDS3 boards have arrived

Finally some update on AVR DDS3 signal generator. Circuit is practically done and PCBs are made. I decided to go with two microcontrollers on board to make it more functional. One microcontroller Atmega328P is gonna be dedicated to user interface and signal generator control. Second Atmega88 is gonna be used for signal generator only. This will give un-interruptable signal output while changing parameters or simply doing signal sweeps. Simple keypad should be convenient for entering frequency values and menu navigation.