I got a circuit from a magazine that uses a 9V battery.
I want to switch to an adapter. Do I have to just replace the battery in the circuit, or
am I missing something? Maybe a capacitor somewhere.
You have to know a lot about the adapter you are using; usually more than is stamped on the adapter... I call these things WallWarts, or WW for short.
1. Some WWs contain only a transformer and rectifier(s), either half-wave or full-wave, with no filter capacitor.
2. Some WWs contain only a transformer and rectifier(s), either half-wave or full-wave, with a filter capacitor.
3. Some WWs contain a complete, regulated, DC power supply. This would include modern switch-mode WWs (lightweight), or transformer-based ones (much heavier).
If you happen to grab a type1 WW, you need to follow it with a large electrolytic filter capacitor (hundreds to thousands of uF). If the circuit you are powering requires a tightly controlled 9V (e.g. better than 9V+-0.5V), you may have to add a LM317 type IC regulator between the capacitor and load....
If you happen to grab a type2 WW, you may need to follow it with a large electrolytic filter capacitor (hundreds to thousands of uF) because the one inside the WW could be too small. If the circuit you are powering requires a tightly controlled 9V (e.g. better than 9V+-0.5V), you may have to add a LM317 type IC regulator between the capacitor and load....
If you grab a type3 WW, it might work with no extra components, but if it is an switch-mode type, it may introduce unwanted switching hash (noise) into the downsteam circuit...