I am in the process of building a prototype and need advice on best way to ensure passing EMC testing the first time. I am what most would consider a hobbyist and I am doing this project on a shoestring and I really can't afford to go through the testing process more than once. It seems from what I have been reading that EMI seems to be more of an issue at the kHz to MHz range. My device is very simple, consisting of 2 identical, polarity checking circuits in a plastic enclosure. These circuits consist mainly of diodes but I have incorporated a LED that flashes at 2 Hz. There is also a 4 kHz piezo buzzer hooked up in parallel so that the "alarm" is in sync with the flashing. I don't imagine that the 2 Hz flashing would be an issue, but I am concerned about the 4 kHz buzzer. This is a simple DC circuit. Any advice offered would be greatly appreciated.
It's the same basic set of rules for most products:
Ground plane, ground plane, ground plane. If it's a two layer board, make sure that as much routing as possible is done on the component side of the PCB. Keep tracks on the other side (on which you'll have your ground plane) as short as possible. Then fill the ground plane once all is routed.
Keep tracks as short and thick as possible, especially high frequency and power tracks - although yours are very low frequency. Thicker tracks mean lower resistance and inductance. Placement of components helps massively with this, spend lots of time getting your components in positions to make tracking as easy as possible.
Good decoupling for all power pins. Route power into decouplers and then out into the supply pin. One decoupler for every power pin. Send short, thick stubs to vias for connection to ground planes.
Follow advice in datasheets for specific components; there are often good notes for things like switching regulators about layout for example.
Keep your crystal as close as possible to the micro. Keep tracks short.
If you have connections to the outside world, think about protection as well as filtering. It's not just emissions you need to think about, but also immunity. It's impossible to know what you'd need for this as there are so few details.
Ground plane, ground plane ground plane. This is so important it's worth putting twice to reinforce the point. As big and as unbroken as possible.
There are other rules for more specialised boards such as split grounds, but I'm assuming you only have one ground?
No idea where in the world you are, but in the UK, the cost of testing can vary a lot from place to place. Plus quality of advice varies greatly.