AtMega328p and Relays

Hi. Read please this article

and give us more information.

  1. What do you mean "I tried in the AtMega"?
  2. What is your relay modules?
  3. Give your wiring diagram (may be hand-drawn).
  4. Give your preformatted and properly pasted code.

It will be easier to help you.