Category Archives: Electronics

LED Bridge Lamp Electronics

For me, building the electronics for the LED Bridge Lamp was one of the most fun parts of the project.  It was an opportunity to build upon the skills I learned from earlier/simpler projects and create a really fun display/art project.

Circuit Design

The first step was figuring out the details of the circuit. To do this breadboarded the circuit and worked out the details. The resistors in the circuit are to protect the first LEDs on the strip data lines and the large capacitors help smooth out the power from the power supply.

Testing the bridge section LEDs
Testing the bridge section LEDs

 

You can find the Fritzing generated circuit diagram here:

Circuit Diagram for my LED Bridge Lamp
Circuit Diagram for my LED Bridge Lamp

Here’s what I used to build the electronics for this project:

Parts List (Quantities reflect sets/packages from the related links):

Assembly 

With the design in hand, the next step was assemble the bases and solder everything.  For the purposes of differentiating them in a succinct way I will refer to the base with the Adafruit Feather Huzzah Micro-controller in it as the ‘Smart’ base and I will refer to the base that only has power inject in it as the ‘Dummy’ base.

Here you can see a full assembled base complete with the 90lb strength magnets that will keep the bridge perched in place over my cubicle walls at work. (You can learn more about building this base in my earlier post here)

90lb Strength Magnets integrated into the base
90lb Strength Magnets integrated into the base

For the panel mount connectors I made sure they fit into the printed holes in the side of the base. I put one of the male connectors into the panel mount connector to keep everything lined up as I soldered (the plastic in there melts easily). I also put heat shrink tubing over the connectors.

Use heat shrink tubing to protect the soldered connections. TIP: Put a mail connector in the female connector when soldering to keep the plastic from deforming.
Use heat shrink tubing to protect the soldered connections. TIP: Put a mail connector in the female connector when soldering to keep the plastic from deforming.

 

The “Smart” Base

Next up was translating the bread-boarded circuit to a perma-proto board. I used female headers so I could remove/replace/upgrade the micro-controller in the future if  wanted to.

Adafruit Huzzah 8266 in headers on soldered half size permanently-proto board
Adafruit Huzzah 8266 in headers on soldered half size permanently-proto board

The circuit itself is pretty simple/straightforward.

Underside of assembled half size permanent-proto board which hosts the Huzzah
Underside of assembled half size permanent-proto board which hosts the Huzzah

With the panel mount connection inserted through the top curved section of the base and secured with its included nut, I soldered its wire to the permanent-proto board. I used about a foot of wire so I had plenty of space to work with when the setup is semi-assembled as shown below.

Soldering the power cable to the perm-proto board AFTER it was inserted through the bridge lamp base.
Soldering the power cable to the perm-proto board AFTER it was inserted through the bridge lamp base.

Next up I secured the permanent-proto board to the electronics tray/base. I wrapped the excess wire that around the magnet supports to provide strain relief to the soldered joints. The additional wires below are the wires that least to JST connectors which will provide a modular linking to the LED strips in the bridge.

Wrap excess wire around magnet supports to provide strain relieve and protect your soldered joints.
Wrap excess wire around magnet supports to provide strain relieve and protect your soldered joints.

With everything assembled it should look nice and clean and orderly as shown below:

Underside of completed 'smart' base
Underside of completed ‘smart’ base

For the USB cable I drilled a whole in the side of the riser block with a brad point drill bit and inserted the USB cable. I wrapped that cable around the magnet supports to provide strain relief here as well.

Underside of completed 'smart' base with USB cable routed
Underside of completed ‘smart’ base with USB cable routed]

The completed based is just about done.

Assembled base section (close up)
Assembled base section (close up)

I also inserted M4 Button Top machine screws to secure the top and bottom sections of the base. They self tap a bit into the plastic and hold well. They also allow me to disassemble the setup easily from the outside.

Button head machine screws used to connect top/curved have of base to the electronics tray
Button head machine screws used to connect top/curved have of base to the electronics tray

The “Dummy” Base

The “Dummy” base is largely the same procedure as the “Smart” base with the exception being that this side does not have a micro-controller — it simply injects power at the mid point of the LED light strips — without this it would look like the LED strips brown out about midway across the bridge.  The large capacitors used in this project are to protect the LED strips and smooth out the power they receive.

Dummy base with power injection. Leave extra wire so you can remove the curved section as needed.
Dummy base with power injection. Leave extra wire so you can remove the curved section as needed.

I followed the same methods of assembly, soldering, cable wrapping etc.

Underside of completed 'Dummy' base
Underside of completed ‘Dummy’ base

Cabling

Between each base and the bridge assembly and between each of the 3 bridge sections I used JST connectors for power and data (See photo below). I would build each male and female section, test the connections and then solder them into place.

JST connectors and crimper
JST connectors and crimper

I liked the idea of everything being modular but in hindsight almost feel it was more trouble than it was worth. I found myself still having to debug a bunch of these wire connections as the JSTs seem to have  a little play in the connections so if the wires are bent up — say when trying to cram those connections into the bridge superstructure sometimes the connection would open up.

When soldering my larger panavise was helpful in holding things in place so I could solder the JST connected wires to the LED strips.

Larger pane-vise was helpful in holding the assembly when I had to solder on the wires connected to the JST connectors
Larger pane-vise was helpful in holding the assembly when I had to solder on the wires connected to the JST connectors

Shown below is a completed base with the JST connectors showing.

Assembled base section with taller riser and micro controller. Note the USB cable coming out through a drilled hole in the riser.
Assembled base section with taller riser and micro controller. Note the USB cable coming out through a drilled hole in the riser.

Testing

With everything in place it was time to test the full circuit. This is where the extra wire on the JST cabling in the base came in handy. I could lay the bridge out on my dining room table and test the circuit and work out the software. Also it was nerdy fun to be effectively sitting inside this light ring in a dark room.

  • Testing the bridge flat on the table
    Testing the bridge flat on the table

    Once I got everything working it was time to pack it up and bring it to the office. Given the headaches with the JST connectors I brought the bridge section in as 1 completed piece rather than breaking it down into segments and testing all the connections again.  It filled the whole bed of my pickup truck but survived the ride.

Completed bridge assembly in the back of my pickup truck ready for delivery
Completed bridge assembly in the back of my pickup truck ready for delivery

The next post in this series will be related to the software.

You can navigate back to the Enhanced LED Bridge Lamp Summary here. 

Take care,
-Bill Rainford
@TinWhiskerzBlog
@TheRainford

Advertisements

Scary Smart Gothic Lantern

This post captures my entry into the Adafruit Extra Credit / Circuit Playground contest of 2017. I made a fun, interactive ‘Scary Smart’ Gothic Lantern which I will describe in this post.

Intro Video (Showing Two Completed ‘Scary Smart’ Gothic Lanterns):

I bought the Adafruit CircuitPlayground Developer Edition when it first came out and gave it a try — it was a fun little board and was something I’d tinker with on a long flight and recommend to friends starting out, but I didn’t have a solid use for it, in terms of a project as by the time I got it I had progressed in my electronics/maker projects to the point where I was designing my own boards etc. Then I saw the folks at Adafruit post about building this great looking Gothic Lantern and added a small enclosure to house a circuit playground to light it up and it really resonated with me.

Lantern running Flickering Candle Demonstration
Lantern running Flickering Candle Demonstration

Once I built the lantern and enclosure I decided to build a lid for that electronics enclosure as I didn’t like seeing some light showing through from the space between the enclosure and the base of the lantern. My lid fits snugly into the electronics enclosure and blocks any light from coming out of the base.

3D Printing Details:

I printed my lantern from Polymaker PolyLite PLA (Black and White). I used M4 x 30mm flat head machine screws and nuts (Qty 4 each) to attach the electronics enclosure and lid to the base of the lantern.

I found the lid (via how the lantern model was designed) to be a bit too loose for my liking so I added a piece of black electrical tape to the male pins on the top of the lantern and it did a great job filling space and adding friction so the lid stays on the lantern if you want to hang it.

Models:

All the models used can be found on Thingiverse:

Gothic Lantern

Circuit Playground Electronics Enclosure

Lid for Circuit Playground (I designed and shared this part out)

Looks even better in the dark
Looks even better in the dark

To take things a step further from just the build I decided to write a series of animation/demoes for the lantern to add some fun interactivity to the project and to use as many of the sensors as I could work into a lantern project.

Demo Video:

The above video walks through all of the animations and using the accelerometer to navigate them. (Details below)

Code: 

You can find all of my source code for this project on GitHub here:

https://github.com/BillRainford/Gothic-Lantern

 

Two candles
Two candles

Animations:

The animations/demoes can be advanced by using the X-axis accelerometer which is in line with the USB port. By quickly shaking the lamp in that direction the system will go dark for 2s and then cycle into the next demo. If the demo supports alternative modes a quick shake in the Y-axis will cycle through the modes. (The code also supports using the on board buttons to do the same navigation, but when the lantern is assembled the accelerometer is a lot more fun to use)

  • Flickering Candle — custom modified algorithm to simulate what to me looks like a fairly realistic approximation of a candle. (Flickers, goes dark in places etc.
    • Alternative Modes (Y-Axis) — Can cycle through several alternative colors of flicker
    • Hardware Used — NeoPixels
  • Bug Zapper — simulates an old fashioned electric bug zapper, complete with strobing flashes and satisfying bug zapping sound
    • Alternative Modes (Y-Axis) — None
    • Hardware Used — NeoPizxels and Piezo Buzzer/Speaker
  • VU Meter — like an old stereo this system will light up green, then yellow then red to represent the amount of sound it is hearing, and slowly fade back down to green if things get quiet again. All pixels light up the same color — works great for a room with lots of music playing
    • Alternative Modes (y-Axis) — None
    • Hardware Used: NeoPixels, Microphone
  • Rainbow Cycle — looping animation of rainbow colors swirling around (on video it looks white, but in person is perceptible)
    • Alternative Modes (y-Axis) — Loop speed can be varied
    • Hardware Used: NeoPixels
  • Temperature — Cycles through an animation of Blue -> Cyan -> Green -> Yellow -> Orange -> Red (simulating the range of colors used to represent the temperature in this demo), then strobes white 3 times and then shows the ‘color’ of the current temperature reading. (Blues are cold, Green room temp (68F +/- 4 degrees), Yellow a bit warmer, Orange getting warm and Red is HOT.
    • Alternative Modes (y-Axis) — None
    • Hardware Used: NeoPixels, Thermometer
  • Lamp — default is an animation that quickly cycles through several pre-selected colors. If you use an alternative mode you can keep a given color on for as long as you like
    • Alternative Modes (y-Axis) — Solid colors then back to demo cycling of colors
    • Hardware Used: NeoPixels
Two different animations running
Two different animations running

It was a lot of fun to build this project. If you build one of your own, please leave me a comment or share a make on Thingiverse or similar.

-Bill Rainford
@TinWhiskerzBlog
@TheRainford

 

 

LED Bridge Lamp Base

As I worked out the details of my version of the LED Bridge Lamp by my friend Janis (Opossums) Jakaitis, one of the things I wanted to tweak was the base.

The modifications I focused on were:

  1. Lower the risk — the original base was a very large piece that would take about 25 hours to print and if something failed that would be a lot of time and material to lose so I broke my version of the model into pieces
  2. The slots/vents were slightly asymmetrical so I made my own variant of that so I could print on the side and keep the lines clean compared to printing them vertically
  3. I needed a way to handle height differences in the surface where I’d install the light * *

** The location in my cubicle at work where I wanted to to install this light has two different heights — the metal wall is about 1.5 inches higher than the top of bookcase so I needed a way to compensate for that. My solution will allow you to handle any reasonable height difference you want to tackle.

Here is a finished and an exploded view of the bases: 

Figure 1: All the parts that make up an Enhanced LED Bridge Lamp base
Figure 1: All the parts that make up an Enhanced LED Bridge Lamp base

While my bases look very similar to Janis’ models they were created from scratch but designed to emulate the originals and add a few new features you’ll see as we walk through this post. I also eliminated a few design details like the screw holes (replaced by my magnet solution) and the transition to the cap piece.

Print Details

What did you wind up printing? (Quantities are for what I built, you may need to change them to meet your needs) 

  • Qty 2: Side (side.stl)
  • Qty 2: Side with Power Outlet (SideWithPowerOutlet.stl)
  • Qty 2: Electronics Tray (Electronics_Tray.stl)
  • Qty 1: Base Height Spacer (Base_Height_SpacerV2.stl)
  • Qty 1: Base Height Spacer Tall  (Base_Height_Spacer_TallV2.stl)
  • Qty 2: Magnet Space Filler Block (Magnet_Space_Filler_Block.stl)
  • Qty 2: Center — the core of the base (Center.stl)
  • Qty 2: Cap (cap.stl)
  • Qty 2: Baseplates (BasePlateMamaWithCableHoleV2.stl)
  • Qty 3: Clips (ClipV2Loose.stl)
  • Qty 2: Foot Height Extensions (This STL can be found in Janis’ lamp here)

Material Used: Polymaker Polylite PLA in ‘True Grey’ 

Print Settings:

  • I printed all the side parts with a brim to decrease the likelihood of warping
  • 20% infill, 0.25mm layer height
  • 210C Nozzle Temp

Additional Supplies: 

  • Qty 4: 90lb Neodymium Cup Magnets
  • Qty 4: M4 Flathead Machine Screws
  • Qty 8: M4 Machine Screws (double up the nuts so they don’t back off — or add a lock nut)
  • Qty 8: Hex Button Head Machine Screws to secure base sections to each other
  • Loctite 401 Glue

Build Details / Notes: 

Printing a side of the base
Printing a side of the base

When printing the pieces called out in the print details section above I printed all my pieces with a brim to help reduce or eliminate warping.

Printing the electronics tray with a brim
Printing the electronics tray with a brim

The elements of an assembled base (1 regular side, 1 side with power outlet hole, center, cap, riser and base plate) are designed to fit inside/on top of this electronics tray. The tray is designed to also secure an Adafruit 1/2 size Perma-Proto board which is what I used to house the electronics that control this project. (More details on that in an upcoming post) The tray also provides supports for the height spacer which keeps the magnets in the proper location.

NOTE: You may want to print the tray 1-2% larger in the X and Y dimensions. Otherwise you may find yourself using a fixed belt sander to thin things out a bit. Guess how I know that? 😉 And my machine is really pretty well dialed in.

Electronics Tray Rendering
Electronics Tray Rendering

The height spacers below were designed to align themselves under the electronics tray via the little standoffs you can see in the image below. The height spacer also keeps the magnets secured as the base gets moved around.

Height Spacer
Height Spacer

The height spacer can be extruded to make it as tall or short as you want.  The spacer above is the minimum height as it is the same thickness as the 90lb strength magnets.

Height Spacer (Tall)
Height Spacer (Tall)

As you can see above, extruding this model to make it taller is straightforward. (You can do it by editing the model or in a pinch you can scale the z axis as needed and trim the alignment tabs if they get too tall as a result of the Z scaling)

Magnet Spacer
Magnet Spacer

For taller spacers I also designed a filler block to make up the space between the magnet and the bottom of the electronics tray. The model can also be scaled in the Z axis to adjust the height.

Assembling the base
Assembling the base

The electronics tray also makes a helpful aligner as you glue up the base pieces. I used some small clamps to hold the sides and center together as the glue dries — only takes about 1 minute to dry enough.

NOTE: Be careful that you don’t glue your base into the electronics tray.

In the lower half of the picture above you’ll see the baseplate sitting upside down in the height riser so that I could glue the blue clips in place. Once the clips are secure I flipped the plate over and glued it on top of the height riser block.

Base plate with clips glued in place and glued to the height riser block
Base plate with clips glued in place and glued to the height riser block

NOTE: The base plate on one side does NOT require the clips.

Be sure to test fit your bridge section and the two plates and file as needed to make sure you have a good snug fit. Filing usually meant squaring up the underside of the clip to make sure it squarely engages with the bridge superstructure section.

Testing out the base
Testing out the base

The base plate is glued to the top of the height riser. That assembly is glued to the cap piece (it has a nice indent in there to make alignment easy) and that second assembly is glued to the top of the base (center, side and side with power outlet hole)

Completed base pieces (angle)
Completed base pieces (angle)

You can insert M3 button head screws into the holes shown below to secure the top section of the base to the electronics tray. The screws tap themselves into the plastic and hold well.

Completed base pieces (side)
Completed base pieces (side)

Examining the underside of an assembled base section you can see how well the magnets fit.

NOTE: Use two nuts on top of the screw securing each magnet so they don’t get loose.

I installed the electronics into the taller of the bases and drilled a small hole to allow the USB cable to pass through so I could flash new firmware onto the micro controller after the lamp was installed.

Assembled base with button head screws installed and testing the wiring
Assembled base with button head screws installed and testing the wiring

If you have any questions about building the base, please let me know in the comments section  below.

You can navigate back to the Enhanced LED Bridge Lamp Summary here. 

Take care,
-Bill Rainford
@TinWhiskerzBlog
@TheRainford

 

Adafruit Feather BLE + NeoPixel Lamp

Like any red blooded engineer I like nice designs, shiny objects and blinking lights. One of the projects that burrowed its way into my subconscious and helped push me over the edge into buying a 3D printer earlier this year was the Adafruit Feather BLE + NeoPixel lamp with 3D printed Voronoi Shade that plays some animations by the Ruiz Brothers over at Adafruit. It’s a great addition to any office desk or maker workbench. After playing with the sample code which simply played a short animation when you pressed a button in the app I decided to augment the code to continuously play animations and add a few more to the mix.

Feather BLE light paired with iOS app
Feather BLE light paired with iOS app

You can view detailed step/by step instructions on printing this lamp  here on the Adafruit Learning System.  What follows in this post is a description of what changes/modifications I made to the build and additional functionality I added into the software running on the Bluefruit Feather.

Check out this video showing what I did with the software for this project here:

Software Revision Highlights:

  • Currently selected animation will loop continuously without interruption (Original sample plays 1 animation and stops until another button is pressed)
  • Cleaned up animation library/methods, fixed some issues with Adafruit sample code and finished off some incomplete methods
  • Added additional animations to the up, down, left and right buttons in the Adafruit Bluetooth application

You can find the source code for the demo used in the video here on GitHub.

3D Print complete, not gather up the required electronics
3D Print complete, now gather up the required electronics

Notes on Building This Project: 
I printed the base out of ABS filament and the Voronoi shade from light blue translucent PLA filament. I chose not to glue the shade onto the top ring of the base as I like to be able to show off the electronics. I friction fit the clear disk into the bottom of the lampshade so it stays securely as one piece. I also omitted the battery as I only plan to run the lamp in an office setting wherein I have access to plenty of USB ports.

Solder and assemble the light
Solder and assemble the light

BIG NOTE: As this caused me some headaches and wasted time. In the Adafruit Learning System write-up for this lamp, make sure to follow the Fritzing circuit diagram here and NOT from the step by step photograph here. The photograph shows one of the blue wires going into ‘BAT’ and not the expected ‘3V’. You should be powering the NeoPixels off the 3V pin.  

Flash the firmware and test the rig before final assembly of the case.
Flash the firmware and test the rig before final assembly of the case.

Once I finished all the soldering I fit the board, wires and ring into the bottom half of the base and flashed the firmware onto the device and made sure it lit up and worked as expected.

Lid screwed in place to help secure the NeoPixel ring
Lid screwed in place to help secure the NeoPixel ring

Next up I screwed on the top half of the base and started working on the animations I wanted to use and assigned them to various buttons in the Adafruit ‘Bluefruit’ application.

Running animations
Running animations

Last up was testing the completed lamp. It lights up a dark room more that I expected which is nice and is clearly visible in a well lit room. Some of the animations in the above video are far better in person as the DSLR tends to blend a lot of the mixed colors into shades of white — you’ll have to see it in person by building your own.

Red alert, incoming message
Red alert, incoming message

With the above lamp completed you can also tie it into the IfThisThenThat (IFTTT.com) ecosystem via Adafruit IO.  IFTTT allows Internet of Things (IoT) devices to react to a surprisingly large amount of interesting stimuli — if you get a certain type of email, if your phone shows up on your home wifi network, if an IoT sensor gets a certain reading your device and react to that message and carry out your desired task — its an incredible system and will be the focus of my next post, stay tuned.

-Bill
@TinWhiskerzBlog

P.S. If you build your own variant of this project, please leave a comment and share your thoughts and modifications.