Project 102: Custom Lighting
This the learning center page for project 102, custom lighting.
The custom lighting project delves further into to digital electronics and programming using a Raspberry Pi single board computer. In this project, we will build a device to provide electrical current and control a series of individually addressable neopixel lights. We will design and print an ergonomic plastic enclosure to hold a 5V DC power converter and a small Raspberry Pi Zero W computer. We'll again be creating a custom website, hoest by our Pi Zero W, to control various lighting schemes accessible by any web browser. Finally, all the resources related to this project will be hosted on a github repository.
The enclosure for this project will be designed by us in CAD and 3D printed. It will include a power input barrel jack connector, a power switch, a power LED indicator, and have 3 pin JST style connectors to provide our neopixels with power and lighting data. The enclosure will also have a standoff mounting points for our Pi Zero computer and provide the end user with access to a removable SD card slot.
Purpose
The purpose of the custom lighting project is to further explore digital electronics, including working with a serial peripheral interface (SPI) bus. We will again research and understanding how to convert a electronic component datasheet into programming code.The final lighting product will allow anyone with Internet access and a web browser to control and manipulate our custom lighting setup. We will also test out writing various lighting effects, and add settings to control the settings for each custom lighting effect. All the features will be implemented by a custom website we'll be designed from scratch for the specific purpose of allowing the people of the Internet to control our custom lighting.
Gallery
As we progress through this project we'll be keeping a log of our progress. The picture gallery below serves as a record of the steps we've completed thus far.List of Materials
The following materials are required to build this project:- Raspberry Pi Zero W single board computer with a memory card.
- 5 meter WS2812B neopixel strip with 300 individually addressable LEDs. Amazon link
- 5V step down converter to power the neopixels and our Pi Zero W Amazon link.
- 60 watt or more DC power adapter
- Soldering iron and solder.
- A package of electronic wires.
- Wire stripping tool.
- Metric caliper measuring tool.
- A 3D printed case based on our collaborative teaching sessions.
- Power on/off switch, barrel jack connectors, a power indicating LED.
Software Environment
A computer with the Linux operating system will be used to create and design software and related resources for this project. We will use OpenSCAD to design the case, and Mono Develop with Mono Framework version 4.8 to communicate with the sensor, character display, and serve the custom lighting website.Mono Framework
In order to support as a wide variety of Raspberry Pi devices, we have selected the Mono Framework 4.8 as the primary software toolkit used to work on this project. The Mono project and its accompanying framework are an open source implementation of Microsoft's .NET Framework. Although Microsoft has a god record and of improving their .NET Framework, their newer Dotnet Core platform it leaves behind a significant class of devices. By choosing to use the Mono Framework in place of Dotnet Core, we can create software that runs on all Pi hardware.To aide in software development, and get off to a quick started we've created an IoT Raspberry Pi library for the Mono Framework. It contains all the instructions and code the students need to get started with programming IoT style applications on a Pi computer. Read more about our IoT library at its official github repository.
Mono Develop
When authorizing and building projects using the Mono Framework we will be using the Mono Develop integrated development environment (IDE). Mono Develop is free open source software, and provides more than enough functionality to meet our needs. Additionally, the project and solution files used by Mono Develop are 100% compatible with Visual Studio and Visual Studio Code, so it will be possible to migrate our project to these other development environments should the need arise in the future.We've also enhanced Mono Develop with custom tooling to allow for code to be compiled on a desktop PC then transferred and run on a Raspberry Pi with a single click. This makes for an greatly improved programming process, with minimal steps are required to go from writing code to testing our programs. This tooling will be assist us in an an iterative processes as write and test our programming code and add the best parts it to our project.
Git Repository
The full content of our software and other file assets are hosted at this git repository. It contains the source code to run the custom lighting, as well as technical diagrams, models, and photographs of the components we will be designing as we progress through this project.Design and Modeling
We will design a plastic enclosure for the project to house a 5V DC power converter and a Raspberry Pi Zero W single board computer. A model of this enclosure will be created using a vector CAD tool, and extruded into a solid parts using the open source tool OpenSCAD. The front of this enclosure will have a barrel jack for power, an on / off toggle switch, and a power indicating LED. The rear of the case will have wire JST style 3 prong conenctors to provide our neopizels with both power and data.The current iterative state of our enclosure is shown below.
❮
❯
Datasheets
The electronic components we will be using include a WS2812 neopixel LED strip. The WS2812 standard has a well known operational protocol, and its specifications have been published by its original manufacture Worldsemi.The operation of the WS2812 neopixels are described in this datasheet by Worldsemi.