Connect directly HC-SR04 with atmega328

Hello folks,

I intend connect HC-SR04 directly on atmega328. On this image: http://imgur.com/a/PByrn it is possible see this sensor connect, http://www.learningaboutelectronics.com/images/HC-SR04-Ultrasonic-distance-sensor-pinout.png, with lead 9 on trigger and lead 8 to echo.

I tested the code with sensor connected on arduino uno and all works fine. But when I connected all without board arduino I haven't signal from sensor. The code, saved on atmega 328, it is ready to pulse signal high on lead 8 always the sensor catch something less than five centimeters. But this didn't work!

First of all I thought the problem was to the code and way I was use to programmer the atmega 328 through board arduino. But, simply to test, I added a simply task which a each cycle the lead 6 turn on and turn off. The result, as expected, blink led yellow during atmega328 turn on.

What can I do wrong? Thanks

Check that you have connected your HC-SR04 to the correct pins of your stand-alone 328.

If that doesn’t work, post your code (using the code tags </>), a schematic, and close-up photos of your hardware.

Hi,
OPs images.


HC-SR04-Ultrasonic-distance-sensor-pinout.png
Tom.. :slight_smile:

HC-SR04-Ultrasonic-distance-sensor-pinout.png

Hi, I can't see any links connecting the positive and negative side strips on each side to each other.

Do you have a DMM to measure some voltages?

Tom.. :)

I can't see ANY decoupling capacitors in that layout!