element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Holiday Special 19
  • Challenges & Projects
  • Project14
  • Holiday Special 19
  • More
  • Cancel
Holiday Special 19
Blog The Oreo Ornament: A Christmas Tree PCB
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Holiday Special 19 to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: sharkat
  • Date Created: 13 Jan 2020 4:17 AM Date Created
  • Views 1687 views
  • Likes 3 likes
  • Comments 4 comments
  • holidayspecial19ch
Related
Recommended

The Oreo Ornament: A Christmas Tree PCB

sharkat
sharkat
13 Jan 2020
image

Holiday Special 19

Enter Your Holiday Season Project for a Chance to Win Over $20,000 Worth of Prizes and Gifts to Give!

Back to The Project14 homepage image

Project14 Home
Monthly Themes
Monthly Theme Poll

 

Introduction:

Just short of a year ago, I read an article on hackaday about the art of hiding components inside of a multilayer PCB stack. I immediately was convinced that I had to try this at some point, as I personally love the aesthetics of having PCBs visible in products, and figured this method, termed Oreo construction by the article’s author, could easily lead toward having a PCB be the entire product. Sometime around the end of the summer, I started thinking about making some PCB ornaments for friends and family and realized this could be the perfect chance to try out this technique! I decided to make the ornaments in a Christmas tree form factor, and thus my Christmas tree PCB (which I’m calling the Oreo ornament, after the construction method used), was born!

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

imageimage

 

Construction:

The Oreo ornament is composed of a stack of 3 PCBs.

The base layer (1mm thick) has all of the components on it. It uses 10 serially addressable RGB LEDs (APA102s, often called Dotstars), controlled by an STM32 F030F4. It has clips for 3 parallel AAA batteries on its back and boosts the battery voltage up to 3.3V for the microcontroller and 5V for the LEDs. There are 3 buttons exposed to the user that reset the microcontroller, change the LED mode (see below), and adjust the brightness. Other than the buttons, battery clips, and a few breakout pins for the microcontroller, all of the components are hidden from view. Here’s the schematic in pdf form.

 

image

 

The cutout layer (1.6mm thick) has internal cutouts that surround all of the components, including 10 circular cutouts for the LEDs.

 

image

 

The front panel layer (1mm thick) has circular “ornament” areas corresponding to the LED cutouts, with soldermask and copper removed so that the LEDs can shine through. This method of diffusing the LEDs’ light is often used in PCB badges with reverse mount LEDs, or sometimes in PCB based enclosures.

 

image

 

The three layers are bonded together using a system of stacked THT and SMT pads, which you can see in the above pictures – no mechanical parts necessary! I simply placed solder paste on the SMT pads of one board, stacked the next layer on top with corresponding THT pads, and shoved a fine tip iron into the via.

 

Modes:

I wrote code (Github repo) for a few different display modes, but here’s a brief description:

  1. Statically displays red and gold ornaments (I figured these were the most common Christmas ornament colors).
  2. Breathes all red ornaments (I’ve found that breathing animations are quite popular).
  3. Breathes all gold ornaments.
  4. Breathes red and gold ornaments.
  5. Alternates from blue->green->red, switching every few seconds. I originally just had this as a test mode to confirm that all 3 LED channels were working but ended up liking it enough to keep it.
  6. Uses the HSV color model to slowly fade LEDs between all colors (hues). This is by far my favorite display mode, as I find it really relaxing to watch as the colors slowly shift from LED to LED. I got the idea to fade using HSV from this post, and borrowed its HSV->RGB conversion code as well.

The brightness in each mode can also be adjusted, which is done via the global brightness register of the APA102s. I’m adjusting brightness linearly though, which doesn’t work as well with the breathing patterns as human brightness perception is definitively non-linear. I’m no firmware engineer, and the code definitely doesn’t follow great design practices, but I’m pretty happy with how the overall project functions.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Challenges:

I spent seemingly countless hours working on this project, yet just barely finished it in time for Christmas. There were a lot of steps along the way that I didn’t expect. One of the immediate issues I ran into wasn’t even electrical in nature but ended up taking me quite a while to solve. I drew up the board outline in Autodesk Inventor, tracing over a clipart of a Christmas tree that I liked. After exporting the face as a DXF, I tried importing into both Eagle and KiCad, both of which resulted in very exploded, unusable board outlines filled with myriad issues. I tried a workaround where I imported an STL from Inventor into FreeCAD, then exported a 2D view of that into KiCad. While after this, the board outline looked correct, there were evidently pretty major issues with the import, where the imported DXF contained hundreds or thousands of line segments that overlapped each other. Since KiCad expects a single closed outline to be formed, these “fragments” prevented proper generation of the board outline! I ended up writing a Python script that would take the existing KiCad board outline and delete all of the fragments that weren’t a part of the “true” outline, a time-consuming endeavor that required me to flex a part of my brain I hadn’t used since my college algorithms course. In the future, I’ll probably just opt for simpler board outlines.
 
Once I actually had a board outline, I agonized over what features to include (classic scope creep) – at various points, I had planned on having a separate base station PCB that used a wall wart, having programming buttons off of the PCB, various switches, and more. Ultimately, I settled on a relatively simple, standalone design. Unfortunately, by the time I really locked in the features I had little time to do the actual design, assembly, firmware, and bringup.
 
In order to cut down on assembly time, I opted to have my base PCB mostly assembled by JLCPCB’s SMT service. This, however, meant that I had to limit my design to parts that were in their assembly library. While I had to make some interesting design tradeoffs (using a sketchy Chinese boost converter IC, stringing together series power inductors because none of the ones available had a high enough inductance, etc.) there was no way I would have been able to hand assemble the number of ornaments I ultimately made (16!) Even with the assembly service, I did have to hand assemble the APA102 LEDs, the buttons, and the AAA battery clips, a process that required getting a custom stencil with cutouts for the pre-assembled parts, and still took around an hour per board. I used the 2020 version of the APA102s (2mm on each side!), which had miniscule pads with a propensity for either shorting together or not soldering properly – reworking these was a pain, to say the least.
 
This project was also my first time writing firmware for an STM32, which was a big challenge for me. While using CubeMX was in some ways a huge time saver, it also caused a lot of frustration, including one instance where it deleted all of the source code I had written thus far (painful lesson learned: use version control). I also faced issues with the non-form factor prototypes I was using, caused by a combination of software (improperly implemented LED driver code, accidental deletion of interrupt drivers) and hardware issues.
 
You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image
 
However, by December 20th I finally had the code in a workable (though far from final) state!
 
You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image
 
The next night, I was finally able to put together my first fully functional Oreo ornament!
 
image
 

Conclusion:

 

Overall, I had a ton of fun working on this project, and was really excited to get to try several different things that I’ve wanted to do for a while (Oreo construction, using a PCB as a light diffuser, JLCPCB’s assembly service, writing firmware for the STM32). But the most rewarding part was actually handing out these ornaments to friends, family, and coworkers. I got a really positive response, that made all of the late nights in the lab more than worth it.
 

image

  • Sign in to reply

Top Comments

  • sharkat
    sharkat over 5 years ago in reply to dubbie +1
    Thanks! Definitely agree about things taking much longer than expected I think I may have accidentally published before I was done! Let me know if it looks like anything is missing now.
  • sharkat
    sharkat over 5 years ago in reply to dubbie +1
    Thanks for checking! Nowadays with all of the low price PCB fabs targeting hobbyists it's so easy to just whip something up. In fact, a small PCB would probably end up being just about the cheapest front…
  • sharkat
    sharkat over 5 years ago in reply to dubbie

    Thanks for checking! Nowadays with all of the low price PCB fabs targeting hobbyists it's so easy to just whip something up. In fact, a small PCB would probably end up being just about the cheapest front plate you could get! It would be really interesting to try 3D printing as well, especially as different thicknesses could give you different levels of diffusion and such.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dubbie
    dubbie over 5 years ago in reply to sharkat

    Andrew,

     

    All the images seem to be there now and they make it much easier to see what you have done. It is a very interesting approach. I have not yet made any PCBs for my projects yet although it is on my to-do list for the future. I'm not sure I would use a PCB as the front cover but I might 3D print a flat front plate to obtain a similar effect.

     

    Dubbie

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • sharkat
    sharkat over 5 years ago in reply to dubbie

    Thanks! Definitely agree about things taking much longer than expected image
    I think I may have accidentally published before I was done! Let me know if it looks like anything is missing now.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dubbie
    dubbie over 5 years ago

    A good project with lots of good ideas. I have been thinking of making a Christmas ornament for several years but never successfully got around to it at Christmas. From your experience of starting in September I might have to start now to have a realistic expectation of having something ready for December 2020.

     

    Dubbie

     

    PS I think you may have forgotten to insert some of your videos.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube