When your project is up and running, you will possibly want to hide it in a hedge to count the number of birds coming and going from your garden bird feeder, in which case your power supply will have to be batteries. However during the development phase, batteries are not ideal, even if you’re using the rechargeable sort.
The LM2596 DC-DC Step-down Adjustable Power Supply Module, available from Amazon at £2.99 (postage free from, I think, China) is also compact, about an inch and a half long, and can convert input DC voltages in the range 4.5V to 40V, to 1.5 to 30V (adjustable by the little screw on top of the blue pot) while being capable of delivering current up to 2A. To mount it on a breadboard, I had to solder a 7-pin header on to each end.
Then, to display what output voltage I will it set to, I bought a little digital voltmeter from Adafruit:
And here is the combination in action:
It is powered by a wall plug adapter which claims to produce 10V at up to 750 mA. Here’s where the DMM came in handy – when I checked the DC voltage produced, I found that the centre pin of the 2.1 mm plug was ground, and the outer contact was at 9.97 V. This is the reverse of what I expected, as I have found that more often the inner contact is the positive one. Interestingly, the 10 V mentioned on the label was not too far out according to my DMM, but often apparently the quoted voltage can be way off (hopefully the DMM is more reliable). Hence the need to measure, to get at least a neck of the woods estimate.
In the picture above, the voltmeter display is connected to the output voltage, and I tweaked the screw on the blue potentiometer so that it read just under 9 V, in case it was a bit high for the project I had in mind.
Some devices (chips) operate at 3.3 V and some at 5 V, and if you apply too much voltage, you can fry your chips, so all this measuring is really necessary.