Skip to content

Chris-Johnston/ornament2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xmas Ornament 2025

Another ATTiny404-based LED Xmas tree ornament. This is a continuation of a series of boards I've worked on in previous years: 2024 2023 2022 2021

picture the circuitboard from the front

picture the circuitboard from the back

This year's iteration is still very similar to 2023's circuit, I am once again using red/green bicolor LEDs and unlike 2024 I actually hooked these up to the correct pins in order to have PWM.

I started working on this design in early November, but put off ordering the boards until early December. I paid extra for faster shipping and manufacturing time, but lost time when I was initially shipped an empty package, from the bag being ripped open in transit. Eventually I had 2 batches of boards which had arrived just in time for me to assemble them.

Bill of Materials / Tariff Rant

The price of everything in this project has increased by a significant amount compared to last year. Additionally, because of the shipping mishap and the approaching deadlines, I ended up ordering two batches of these boards, since I had very little confidence in the lost package contents being located and shipped to me intact. (Somehow they still were, so this second batch actually ended up being unnecessary.)

The boards this year are a 3.5" circle, so it is larger than last year, but this is otherwise a pretty simple 2 layer board with not too many vias and drills. A domestic purple PCB manufacturer near me quoted $62.90 for 3 boards (not including shipping). For completeness' sake I also checked how much a volume discount run would run, 30 boards would be $377 (or 21 boards for $440), not including shipping.

I would like to support domestic PCB manufacturing, but my batches of 20 and 30 boards made overseas cost $25 and $31 respectively (with 24 hour manufacturing time too). This number does not include the significant increase in shipping charges due to tarrifs, all in I spent $196 on the two orders to get 50 boards, roughtly $4 per board. Do I need 50 boards? No, but the per-unit price to have a couple more boards than I actually need is worthwhile, and again, I was in a rush and ordered another batch that I didn't need so that something got to me in time.

So yes, if the boards weren't twice as much for half as many, and if I weren't in a time crunch, I would consider it for next time.

That all being said, this is still a pretty cheap thing to build and gift in bulk (~12 boards or more), and each one ends up being a couple bucks in total. I just don't like paying dramatically more from one year to the next. The other components end up totalling $2 per board.

Reference Description Part No. Price per unit
PCB See above $4
C1 1 uf 1206 capacitor CL31B105KAHNNNE $0.041*
D1-D6 1206 Bidirectional Red/Green LED 6 per board @ $0.104*
R1-R6 1206 47 ohm Resistor Generic 6 per board @ $0.009*
SW1 6x6mm Pushbutton Generic
SW2 Slide Switch JS102011SAQN 0.603*
U1 ATTiny404 Attiny404 0.59
B1 CR2023 Battery Holder BH-25C-1 I bought hundreds of these years ago and I'm still going through them.

* Not including Tariff upcharge, which was significant but not broken out per line item in my invoice

Other Differences

  • This year I used affinity designer instead of illustrator, good software (and free to use!), but had some quirks that were very new to me
  • didn't use svg2mod because it was easier to export a jpg instead (because of clipping masks and object layering), and I was hitting a creative block in trying to do everything without rasterizing
  • Redid the board schematic so that I actually have PWM channels now, and a bit of code cleanup (the last used pattern is saved in EEPROM now)

Other

For some reason I was hitting space constraints only when compiling in vscode (using the very unfortunately deprecated Arduino extension for vscode):

.../avr-gcc/7.3.0-atmel3.6.1-azduino7b1/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: address 0x1106 of .../ornament.ino.elf section `.text' is not within region `text'
.../avr-gcc/7.3.0-atmel3.6.1-azduino7b1/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: C:\...\Temp\arduino\sketches\DA23BB867C45E475CA134718F32C5DF3/ornament.ino.elf section `.rodata' will not fit in region `text'
.../avr-gcc/7.3.0-atmel3.6.1-azduino7b1/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: address 0x1106 of C:\...\Temp\arduino\sketches\DA23BB867C45E475CA134718F32C5DF3/ornament.ino.elf section `.text' is not within region `text'
.../avr-gcc/7.3.0-atmel3.6.1-azduino7b1/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: region `text' overflowed by 324 bytes
.../avr-gcc/7.3.0-atmel3.6.1-azduino7b1/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avrxmega3/short-calls/crtattiny404.o:../../../../../crt1/gcrt1.S:315:(.init9+0x2): relocation truncated to fit: R_AVR_13_PCREL against symbol `exit' defined in .fini9 section in .../avr-gcc/7.3.0-atmel3.6.1-azduino7b1/bin/../lib/gcc/avr/7.3.0/avrxmega3/short-calls\libgcc.a(_exit.o)
collect2.exe: error: ld returned 1 exit status
Error during build: exit status 1
IntelliSense configuration already up to date. To manually rebuild your IntelliSense configuration run "Ctrl+Alt+I"

But not when using the normal arduino IDE:

Sketch uses 3448 bytes (84%) of program storage space. Maximum is 4096 bytes.
Global variables use 17 bytes (6%) of dynamic memory, leaving 239 bytes for local variables. Maximum is 256 bytes.

So I will have to upload just using the Arduino IDE apparently. In the future I would like to reconsider this toolchain, but given the constants and the results I stuck with what worked and what I knew.

Kicad screenshots

For reference without the need to pull up the files in kicad first.

picture of the front of the board in kicad

Yes the parts are placed like that intentionally, because it's funny.

picture of the rear of the board in kicad

I didn't necessarily like having to translate between:

  • package pin number
  • PORT(A|B) pin number
  • "Arduino" pin number
  • LED number from right to left but with enough notes it worked out without any issue.

picture of the schematic

About

Attiny404 xmas ornament for 2025.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages