(updated) building a circuit - can you look at it?

attached is a circuit that does nothing more than watch an IR receiver and control a few LED strips.

As is, does it look like it will work? I'd like your thoughts on anything that seems like it wont work, will break, could be done better... and the like.

Also, is 16 mhz the fastest you can take an atmega 328 chip safely? Or can i put in a 20 mhz crystal and have things work as they should?

Changed the crystal to a resonator. cheaper and easier to wire up.

Thanks for your eyes!

PIC of schematic:

Uploaded with ImageShack.us

Jeez that's hard to read, how about black on white?

Anyway the crystal is wrong, should have two 22pF caps to GND from pins 9/10 and the xtal between 9/10. Have a look at any of the Arduino schematics for the circuit.

R2 is a little bit high (although it depends on the LED being used), 330R is more normal.

What's the diode one the regulator OP for?

Regulators normally have larger caps that that, say 10/22uF.

There's no decoupling cap on the uC.

20Mhz is OK as long as you don't use any of the Arduino timing functions.

How are you programming this? If it's via CON1 and an FTDI cable you will have to modify the bootloader (and other stuff in the IDE environment) to use 20MHz.

Crystals normally have an X designator, Q is for transistors.


Rob

Jeez that's hard to read, how about black on white?

Really? the brighter, the harder it is for me to see it :confused: I'll invert and re upload.

Anyway the crystal is wrong, should have two 22pF caps to GND from pins 9/10 and the xtal between 9/10. Have a look at any of the Arduino schematics for the circuit.

Ok, i will. I've since changed it to a resonator, though. I think i have it wired correctly now :confused:

R2 is a little bit high (although it depends on the LED being used), 330R is more normal.

To be honest, that was a random pick... i have not yet sourced that part, so i haven't done the math for it yet.

What's the diode one the regulator OP for?

its precautionary. the +12V in will be coming from a PC powersupply, so i want to be as safe as possible with this...

Speaking of which, if you can see another way to make the +12V and the gnd a bit safer for the PC power supply, please let me know!

Regulators normally have larger caps that that, say 10/22uF.

Ok, thanks for letting me know! The new version has been updated

That all looks about right, I still don't understand the diode.

How are you getting 12v from the PC?

There are two things to "protect" the PSU from

a) Connecting your gadget back to front.
b) Drawing too much current.

Truth is I would think the PSU is already protected against this, it's your gadget that is in danger.

You can put a diode in series with the 12v input (a) and also a fuse (b). Personally I wouldn't bother with a fuse but a series diode is always a good idea. Even a full bridge rectifier which makes the 12v input polarity independant (a single diode will stop any damage but the gadget won't work until the polarity is fixed).


Rob

That all looks about right,

Ok, cool. Thanks again!

I still don't understand the diode.

the diode is there to prevent current, should it, for any reason, ever reverse. There are expensive devices in this computer that i don't want to get fried in any way.

How are you getting 12v from the PC?

straight from the 12V rail through a molex connector. the leads from which will be soldered to the two pads at the top left of the schematic

There are two things to "protect" the PSU from

a) Connecting your gadget back to front.

Yeah, i'll just have to be extra careful about this one

b) Drawing too much current.

Truth is I would think the PSU is already protected against this, it's your gadget that is in danger.

I don't care if the gadget goes up in smoke... and the PSU will let me know if / when there is too much of a current draw. I just need to make sure that this controller wont introduce any noise or spikes into the 12 v rail that could screw with the other components.

At a glance, I would add gnd connections to your connector(s) to the other devices (serial).
Add a few 0.1uF caps on the power - gnd of the connectors also.

I would move the diode to the input of your 7805.