Solar Lantern
#
Lesson OverviewIn this lesson, you'll learn how to build a solar powered lantern. The Solar Lantern uses a solar panel to convert the sun's rays into electricity, which is stored in the built-in rechargeable battery.
The PCB
you'll design is small enough to easily fit in a canning jar or an old milk jug (just make sure you've consumed the liquid first) or you can create your own custom enclosure out of the materials you have on hand.
Key Topics & Concepts
- The Photovoltaic effect
- Photons
- Electrons
Supporting Topics and Concepts
- Conductors, Insulators, and Semiconductors
- Switches
- Diodes
- LEDs
- Transistor
- Batteries
To successfully design and build this project, you'll need to first know a bit about how solar panels work.
#
Bill of MaterialsMost of the components in this lesson should be familiar to you if you've taken other Patchr lessons, but if you need a refresher, the table below provides links to our glossary that cover each component in depth.
The table below shows the component name with link to the glossary, the Patchr symbol you'll use during your design process, and the schematic symbol that's used to describe how the components connect to create the lantern's circuit.
Component Name | Patchr Symbol | Schematic Symbol |
---|---|---|
White LED (x4) | ||
1000Ω resistor | ||
2N3906 PNP Transistor | ||
1N5819 Diode (x2) | ||
Slide Switch (x3) | ||
JST Socket Connector (x3) | ||
AAA Battery Pack | ||
Solar Panel |
Now that you're familiar with the entire BOM, it's time to learn how solar cells are able to convert the sun's light into electricity.
#
Converting sunlight into electricitySolar panels are semiconductors, which means they aren't great at conducting electricity like copper, but are better than insulators which do not conduct electricity well.
In fact, you've probably encountered all three types of materials before — though you might not be as familiar with the names of semiconductors. Here are a few examples of the three types of materials.
#
Material ExamplesConductor | Semiconductor | Insulator |
---|---|---|
Copper | Silicon | Rubber |
Silver | Gallium arsenide | |
Gold | Germanium |
Conductors such as copper are great at conducting electricity. That's why traces on a PCB are typically made with copper.
Semiconductors are just OK at conducting electricity, but that's frankly one of their biggest benefits — they can act as conductors or as insulators. Best of both worlds.
Insulators like rubber are not very conductive at all.
#
SemiconductorsSo what's the big deal about semiconductors? Well, because their ability to conduct electricity is changeable, engineers have figured out how to manufacture semiconductor components that can become better at conducting electricity if an outside energy is applied to the material. That's exactly what's going on with a solar panel.
A solar panel is a semiconductor that is made up of a sandwich of different semi-conductive materials. When the photons hit the solar cell, it frees up electronics in the semiconductor material and that creates electricity.
Here's a short video from the US Department of Energy that's worth watching. Click here to view the video
The conversion of photons into electricity is known as the photovoltaic effect
#
How the circuit worksCircuit designers use schematics as a way to communicate a circuit's design using icons that represent components and lines that convey how the components are or are not connected to each other.
Each electronic component has a unique symbol which can admittedly be a bit overwhelming when you're starting out in electronics. In this lesson, you'll see the schematic symbols as well as the Patchr component icons to help you gain familiarity with the symbols. As you encounter more schematics, you'll gradually gain familiarity with the symbols. There's no need to try and memorize them all at once.
#
The Power of SwitchesLook at the very top of the schematic and find the switch. This switch controls if the battery is supplying power to the circuit — which ultimately will illuminate some of the LEDs.
You're probably wondering, "why some of the LEDs and not all?" Well, that's because the switch that's in the middle of the circuit selects if one or two of the LEDs receive power and shine. Think of this second switch as controlling a dim setting and a bright setting for the lantern.
#
Solar ChargingWhen the switch at the top of the circuit is off (also known as open), none of the LEDs will illuminate, but that doesn't mean that the circuit isn't doing something.
When the power switch is open, and the solar panel is exposed to sunlight, the circuit charges the batteries.
#
Protection DiodesOf course, switches alone don't make this circuit work. The two diodes in the top left of the schematic are used to protect the solar panel from being damaged by the battery. This protection is in place because when the power is turned on, the solar panel is can still charge the batteries. However, if it were unprotected by the diodes, the battery would actually damage the solar panel.
The diodes offer protection since current only flows one way through them. When diodes are used in this way — to blocker current from flowing through another component — they are called blocking diodes.
Your Solar Lantern customization begins with the board shape. In this step you can create a custom board shape using the built-in drawing tools found in the left toolbar or you can upload a custom SVG file from your computer using the toolbar on the right of the screen.
#
Board Shape DesignRegardless of which customization tool you decide to use, there are a few things to keep in mind while designing.
The custom board size may not exceed 100x100mm. The design window shows this with light red shading and OUT OF BOUNDS text. If your shape exceeds the boundary, you will get an error notification and be unable to advance to the next step in the design process.
The white area inside the red shading denotes the space you have to work with for your board shape.
The dotted red lines that make a small rectangle indicate the minimum size your board can be — if you made your board any smaller than this area, you would not be able to fit all the components on the PCB let alone route traces between them.
#
Zooming & MovingZooming in and out can be done with the icons in the left toolbar or by using your mouse's scroll wheel.
To reorient your design workspace, hold the right mouse button down and drag the workspace to your desired location.
To move your custom board shape, click on the Move Selected tool in the left hand toolbox. Then click and drag your shape to the location you want.
#
Built-In Drawing ToolsThe toolbox on the left of the screen features the draw polygon path, draw freehand path, draw rectangle, and draw circle tools. These tools allow for simple shape customization within Patchr.
Once you have a shape drawn, you can use the tools on the right side of the screen to scale up or down your shape and rotate it.
When you are happy with your custom board shape, click on the NEXT > button to advance to the layout step.
#
Uploading an SVG FileTo really get the most out of board shape customization, you can upload single-path SVG files into the editor.
- First ensure your SVG is using a single path.
- Click on the Choose File button under the Upload SVG heading in the right hand side toolbar.
- Assuming your SVG is compatible, you should see your custom board shape in the editor. You may need to use the scaling and rotation tools — also in the right hand side toolbar — to tweak the placement and size of your SVG.
- Once you're happy with the size and shape of your custom board, click the NEXT > button to advance to the layout step.
Note that SVG files are a specialized type of image file which are made up of vector coordinates. If you're new to vector files and vector drawing, check out Inkscape, which is a popular, free, and open source vector drawing program.
#
Component PlacementWelcome to the layout step. Your PCB Editor window now shows a list of components at the bottom of the screen.
To add a component to the PCB, simply click on the one you want to add and drag it onto the PCB.
If you don't have the placement right the first time or want to move the component a smidge? Just click and drag it to the spot you want.
#
Component RotationWhen you're designing a PCB every millimeter matters, that's why sometimes it's helpful to be able to rotate the component footprint to maximize layout efficiency.
To rotate in the Editor, click the rotate tool in the toolbox and then click on the component you want to turn. Then click, hold, and drag the component to the orientation you want.
#
Verify Your LayoutOnce you have all the components on the PCB, it's time to route the electrical connections between the components.
Click the NEXT > button and the Patchr Editor will check to ensure all the components are on the PCB and their footprints don't overlap.
Don't worry if you discover during routing that a component's layout needs to change, just click the < BACK button and you can edit the layout.
#
RoutingRouting a PCB design is where you draw the electrical connections known as traces between the components.
#
Schematic For ReferenceWhen routing, you'll want to refer to your schematic as you work. The schematic shows you what components need to be connected. However, that doesn't always mean copying the exact shape of the routes in the schematic is the way you should route your board.
In fact, most of the time the traces that you route between components will have completely different shapes than the schematic, and that's OK.
#
Create Your TracesWith the trace tool selected from the toolbox in the PCB Editor, click on a pad of the component you want to route.
You'll then be able to drag a teal line that indicates the placement of the trace.
#
Add A Bend In Your RouteIt's unlikely that all your traces will be straight lines from one component to another. To create an angle in you trace, click on the PCB while using the trace tool. Then continue to move your cursor to create the trace heading in a new direction.
#
Routing ConsiderationsWhen positioning a route between components, make sure that the route you are creating doesn't block the way for other routes needed for nearby components. You may find your layout of a component wasn't ideal and you want to move it, just click < BACK button and make the layout adjustment.
Start by routing your power and ground traces.
Focus on components that use multiple traces, since they will require more complex routing.
Routing is as much an art as a science. As you route more PCBs, you'll begin to develop your own habits and patterns.
#
SilkscreenLast but not least is the silkscreen for your PCB.
A silkscreen layer is typically used for marking where components go and adding company logos and product names to a PCB. It's also an easy way to add the reference designators
from the schematic onto your PCB, component outlines to help show the area they will take up on the board, and even text that identifies if a switches on and off positions.
But, silkscreens don't have to be merely functional, they can also be used to bring your board to life and give it some extra pizzaz. From drawing graphics to writing your name on a board, a creative use of the silkscreen layer is a fantastic way to make your PCB a work of art.
#
Submit Your DesignOnce you have your PCB looking the way you want. Click NEXT > and your board will head to your teacher for review before manufacturing.
Congratulations, your custom Solar Lantern is almost ready for solder!