1
\$\begingroup\$

I have successfully designed & tested a circuit using arduino uno for controlling a dc motor (MAX 50A,12V,SHORT-DUTY) By using a relay module and current sensor (configuration given in schematic). Then i tried to convert it into a PCB & designed a schematic (given below) & fabricated it, I use the same Micro controller (Atmega328p-pu) which i used in arduino board (program it using arduino uno & put it into PCB). when i tried to run it works for first cycle of my application (when i press switch 1-on & when current reach 5A have to off) but after 1st cycle Atmega328P-PU freezes & it does't get any input from switches (if i use arduino uno instead of Atmega328P-PU means it works well) , i have tried all the possibilities to make it work but failed. Help me!!

enter image description here

enter image description here

\$\endgroup\$
  • \$\begingroup\$ I don't see any bypass capacitors on VCC, also the AtMega series tops out at 20MHz, your running 24MHz? \$\endgroup\$ – MadHatter Nov 12 '17 at 17:09
  • \$\begingroup\$ It looks like your 3.3V regulator doesn't have any input or output caps. \$\endgroup\$ – Tyler Nov 12 '17 at 17:11
  • \$\begingroup\$ @MadHatter Sorry Sir , I used 16MHz only, i posted it wrongly, but where to add bypass capacitors? can you explain me sir? \$\endgroup\$ – Ashok Vijayaram Nov 12 '17 at 17:12
  • 1
    \$\begingroup\$ @HarrySvensson Sorry ... \$\endgroup\$ – Ashok Vijayaram Nov 12 '17 at 18:28
  • 1
    \$\begingroup\$ @HarrySvensson ashok is likely not from the same general area as you, and customs for how to address people may be very different for them than they are for you. Also, English may not be their first language, and they're just trying to be polite. Please keep that in mind when you correct someone ;) \$\endgroup\$ – marcelm Nov 13 '17 at 11:10
0
\$\begingroup\$

My bet is you're inadvertently holding the micro in reset. Remove C3, and short its pads with a piece of wire so the only thing on the reset pin is R3. If you must have a cap on the reset pin, it should be from reset to ground.

\$\endgroup\$
  • \$\begingroup\$ I was going to mention this, but the AtMega as a ~10k internal pull-up on the reset. I guess in a noisy environment though this may not be enough... \$\endgroup\$ – MadHatter Nov 12 '17 at 20:56

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.