Your latest sketch is many times better in this regard. I found the originals difficult to follow, whereas this one is pretty good.
- First, add a diode at the power input. This will protect your circuit in case the DC barrel connector's polarity is accidentally reversed.
Ditch C1 and C7 in favor of a single large 100µF cap at the power supply input. There's no good reason to put separate bulk caps at each regulator unless they're far apart.
C2 is OK at 10µF, given the likely current demands on the 5V circuit, but I would use something like a 47µF instead just because you can.
C8 should probably be something like 47µF to 100µF, since fans tend to be current hogs at times.
- In addition to bulk capacitance (the larger electrolytics) it's a good idea to use 0.1µF to 0.33µF ceramic caps on each side of the regulators. This prevents over/under-shoot oscillations.
Put a diode in reverse across the regulators (anode on pin 2, cathode on pin 1 -- or in schematic terms, like this: 1 --|<|-- 2). This ensures the input side is ALWAYS higher than the output side, which prevents backwards flow if power is removed from the input, while charged capacitors or other external voltage exist on the output side.
You should put a 0.1µF ceramic cap between the high side (pin 1/2) of every switch and ground. This prevents "switch bounce", which is a spiky oscillation as the switch contacts intermittently begin (or stop) conducting during button presses. Unless you either use a cap, or sample the input pins multiple times and average the results, you'll likely trigger multiple "presses" every time your press a button, which is enormously frustrating.
As you can tell, in circuit design, you use a lot of 0.1µF ceramic caps. I buy them 25 to 100 at a time for that reason.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16