I have been reading a lot of ee basics lately for my upcoming arduino project, and found a lot of exceptions to what a learner might think about how parts need to be connected to the arduino.
Here is some of the things i found out.
Led's (or any diode really) needs a resistor on the positive side.
A power regulator needs capacitors on both power lines hooked up to ground.
A relay needs a resistor and transistor before the relay switch with a diode over the 2 low power contacs of the relay.
I think this is the reason why you can buy these things preassembled on pcb's.
Does someone have a list of these kinds of exceptions which might not be obvious to someone starting out with electronics?
"A relay needs a resistor and transistor before the relay switch with a diode over the 2 low power contacs of the relay."
Not always. Depends on how much current the coil needs. Diode, yes.
"I think this is the reason why you can buy these things preassembled on pcb's."
Don't see what that has to do with anything.
You can generally buy things preassembled on PCBs because one party thinks there is a demand, and another party has a percieved need for same.
On every introduction to led's i have read that they need a resistor as they would otherwise pull too much current. Thinking about it i guess that it might not matter on which side the resistor is but i have always seen it placed on the positive side. So that is what i assumed. Or why do you ask this question?
I am simply trying to find out what is safe wiring for different components.
It's true that LEDs often have a resistor in series to limit current. It can be on either side as either way the current has to go through it. However "any diode" is going too far. Diodes used, for example, for reverse polarity protection don't also need a resistor.
Also it is possible to get constant current drivers (chips) that output a fixed current. In that case, the resistors are not necessary.
It's a good idea to come up with some general rules like that. Just trying to help make sure they are accurate.
Check the power supply voltage is suitable for a device (including is it a 3.3V device?)
Check power is connected the right way round(!)
Check the power supply can supply enough current for all the devices it powers.
Input switches/buttons are wired to pull-up or pull-down resistors or internal pull-ups are enabled.
Yes, you can power an Arduino from a 400 AMP 12 VDC car battery and nothing bad will happen (though a few parts might get warm)
A voltage divider (potential divider) made with 2 resistors is not a power source it is a potential reference... like a stationary potentiometer wiper pin
As a general rule, partially based on the fact that many devices are open collector or open drain it is usually better SINK than SOURCE a load. IE; feed the LED CATHODE from an arduino pin.