Electrical Connections

The Arduino output signal is 5 volts. The solenoid is 12 volts. So I used the Aruduino to turn a relay on and off to control the 9 volts from a battery to the solenoid. It is a 12 volt solenoid, but it worked fine with 9 volts (the solenoid got very hot when I tried a 12 volt power supply). I kept the solenoid power separate from the Arduino power because of the voltage fluctuations when the solenoid energizes and de-energizes.

The USB cable is only used to load the Arduino code (and a message) into the Arduino from a computer. After that you don't need to have it connected.

At the science fairs, I would take both battery plugs with me when I had to leave the heliograph unattended, to prevent unauthorized operation.