Build a lightning simulator with LEDs
Let’s use the Raspberry Pi’s general purpose input output (GPIO) to do some work. Under the control of a Python script, the GPIO output will drive a heavy load – meaning that the electrical current is in the magnitude of amps rather than milliamps. For this discussion the load will be a string of light emitting diodes (LEDs) requiring 12V DC at 2A.
If you’re not familiar with Pi technology, GPIO outputs operate at 3.3V DC and are only capable of supplying milliamperes of current – so the board is not designed for such applications. Using the outputs to drive any load is not recommended. In order for the Pi to be up to the task of driving a heavy load, we are going to employ external electronics in the form of metal oxide field effect transistors (a MOSFET) to overcome these limitations.
Operating framework
Before we look at the external circuit requirements, let’s go through the process of installing an operating system on the Pi. The drawing represents five steps in cycle of installing the Raspbian OS. Obtain the Raspbian OS. In this). Remember to complete a checksum verification once the image file has been downloaded, to ensure that all the bits were transported correctly. Use the image-flashing software () to install the Raspbian OS image to a microSD card. is open source software and available for a number of operating systems. Download the software, unpack the installer and install the application. Fire it up and select the image file and SD card device to kick off the process of writing an image to the SD card. Install two files in the folder of the Raspbian OS on the SD card. One file enables the SSH service for network connections, and the second enables Wi-Fi network connectivity to the Pi. Put a blank file named in to enable remote network connections to the Pi using SSH. Create a second file named with the following contents to provide wireless access to the Pi:
You’re reading a preview, subscribe to read more.
Start your free 30 days