Car battery/alternator supply to 5V regulator- capacitors?

I finally got my project working. It uses an ATTiny85 to move an actuator in my truck. I'm using a motor driver to switch 12V from my battery/alternator. I also want to power the electronics from the car battery/alternator.

I picked up a 5V regulator from Radio Shack ( RadioShack.com Official Site - America's Technology Store ) and was just going to use that, but I've seen several schematics online where capacitors are used ( http://www.instructables.com/id/5v-Regulator ). Should I add capacitors to the regulator? I'm a little confused of their purpose.

Thanks.

Ideally yes...

The caps smooth out the voltage giving a cleaner supply.... can you still use the 7805 without? Yes but under a heavy load, bestnot too.

cjdelphi:
can you still use the 7805 without? Yes

No not if you want it to work correctly.
The capacitors lower the impedance of the supply and stop the circuit oscillation. There is no such thing as a simple 7805 each manufacturers device is different in the capacitor requirement they have.

Find the datasheet for the regulator you are using and it will probably tell you what capacitors are recommended.

Fairchild (Intelligent Power and Sensing Technologies | onsemi) seems to recommend 0.33 uF on the input side and 0.1 uF on the output side (see Figure 9). The input capacitor " is required if regulator is located an appreciable distance from power supply filter" and the output capacitor "improves stability and transient response."

Thanks so much guys! I really appreciate it.

Supplying from a vehicle battery, you mainly need the capacitor not to deal with ripple in the supply, nor with the impact of transient demands from your device, but with electrical noise from other things in the vehicle.

This typically seems to mean using several different capacitors targetted at those different objectives/problems. If you look at previous threads, you will see useful advice from people who are experts.

If you use a regulator to convert 12v to 5v, you are throwing away 60% of the energy in the regulator, which is not only wasteful but will cause it to overheat. You might want to get a 12v to 5v converter, which is more efficient.