Not working, regulator? caps? wut?

So I made a homemade circuit using atmega328p-pu 2x22pf caps, 16Mhz crystal a led with resistor for testing and a AMS1117 5.0V which is similar to a LM1117 from the data sheet they got some caps as well but i didnt added any. (yes i added a 1k resisgor on reset)

My problem is when i plug the battery the regulator provides exact 5V on output but using the besic example of blinking led my led doesnt even blink or blinks only for few ms and only once in a random time or when i plug and unplug the battery.

Any ideas that can cause that? and yes i triple checked the circuit and every component to be connected and working. Could this be because i dont have caps on the regulator?

I dont have tantalium caps as the datasheet says could i use electritic instead ? and what value ?

Thx, D.60

You need 0.1uf caps (ceramic) between grfound and vcc right next to the chip, and between ground and avcc, also right next to the chip. Avcc must be connected to vcc. These are not optional, without them the chip will be prone to unexpected resets, freezes, and other undesired behavior.

You also must have capacitors on the regulator in addition to those o.1uf decoupling caps. Always follow the manufacturer recommendations for capacitor type on regulators; some are picky (and not all 1117s are the same in terms of what they want; one of the reasons I like the zldo1117s is that they advertise compatibility with ceramic, electrolytic, or tant - rather than requiring a specific type). Without the caps, they will not regulate properly and may be prone to oscillation.

You need 0.1uf caps (ceramic) between grfound and vcc right next to the chip, and between ground and avcc, also right next to the chip.

never used those and I never knew... hmm I will add them in my circuits design.

You also must have capacitors on the regulator in addition to those o.1uf decoupling caps.

I don't have right now tantalium or ceramic caps, what value electrolitic caps I can use on the regulator? is 10uF on the input and and 1uF on the output ok ?

The ones that are demanded on the datasheet.

I put 0.1uF caps on the VCC_GND and AVCC_GND of the chip
and 1uF cap on the input of the regulator, works fine now, looks like the problem was the caps.

Sad that I don’t have a osciloscope to see what is going on.

D.60

A DSO138 for 25$ already helps.

A DSO138 for 25$ already helps.

Maybe someday, no money for such thing now :D

Domino60: My problem is when i plug the battery the regulator

Thx, D.60

Show us the circuit diagram. There could be a problem with grounds.rr

Show us the circuit diagram. There could be a problem with grounds.rr

Problem solved, thanks for the interest anyway. : )

Has it ever come to your mind that least you could do for people who have spend time to help you with your problem would be to tell HOW you solved it?

Has it ever come to your mind that least you could do for people who have spend time to help you with your problem would be to tell HOW you solved it?

Well I just did. I wrote in the 1st comment of the topic that I had some issues and I don't use caps on the regulator.

DrAzzy said that it's good to use always caps on the regulators and microcontrollers which i didn't had installed. and in reply #4 I explained that I installed the caps DrAzzy said it's necessary to use and

works fine now, looks like the problem was the caps.

that's what I said as well in the reply #4

So I think I already answered the question of how I solved it.

Let's recap:

I made a circuit for a project using 328p-pu with 1k resistor on reset and 2x 22pF + 16Mhz crystal as well installed a AMS1117 +5.0V regulator. The Problem was that my chip couldn't work normally which made it to auto and randomly reset itself for some reason. The Solution was to install a 1uF electrolitic capacitor on the output of the 5volt regulator and 2x 0.1uF capacitors on the exact pins of the chip VCC to GND and AVCC to other GND.

The problem was that the noise of the voltage was too high cause my power/battery is far away/long wires and because I don't use caps, so using caps I reduce the noise of the flow from the regulator and the chip works normally.

Hope now I explained clearly what was the problem and what I done again for no reason.

No problem to type again I like to write such problems and solutions but the solution was already on the other comments, just don't be lazy to read.

D.60

Ok, sorry. It sounded like you changed something else.