Book Image

Raspberry Pi Zero Cookbook

Book Image

Raspberry Pi Zero Cookbook

Overview of this book

The Raspberry Pi Zero, one of the most inexpensive, fully-functional computers available, is a powerful and revolutionary product developed by the Raspberry Pi Foundation. The Raspberry Pi Zero opens up a new world for the makers out there. This book will give you expertise with the Raspberry Pi Zero, providing all the necessary recipes that will get you up and running. In this book, you will learn how to prepare your own circuits rather than buying the expensive add–ons available in the market. We start by showing you how to set up and manage the Pi Zero and then move on to configuring the hardware, running it with Linux, and programming it with Python scripts. Later, we integrate the Raspberry Pi Zero with sensors, motors, and other hardware. You will also get hands-on with interesting projects in media centers, IoT, and more.
Table of Contents (17 chapters)
Raspberry Pi Zero Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Controlling high power DC load using MOSFETs


For scenarios where you need to handle a lot of DC power and current, MOSFETs are a great solid-state alternative to mechanical relays. With proper power and heat-sinking, many common power MOSFETs can power over 1000 LEDs!

Note

AC or DC power are both dangerous! Just like the previous recipe, use extreme caution when using high-power loads. In this case, we will be using a 9V DC load--not too dangerous, but many MOSFET circuits can handle high-voltage and amperage solutions.

Getting ready

For this recipe, we will need the following equipment:

  • 3 N-channel power MOSFETs (the IRLB8721 MOSFETS are inexpensive and available from Adafruit (https://www.adafruit.com/product/355)

  • 12V analog LED light strip; with a 2 A source, you can run about 3 meters of 60 LED/m lights.

  • 9V-12V power source (1-2 A is perfect)

How to do it...

  1. Wiring a MOSFET is quite simple. One side will be connected to the Raspberry Pi to control the MOSFET, while the other side will is for...