Close

Have You Ever Started a Project on Step 3?

A project log for Pixel Badge (Shitty Pixel)

An oversized WS2812 conference badge and add-on

blinkingthingblinkingthing 04/02/2019 at 17:020 Comments

One of my strengths is being very driven, but one of my weaknesses is not doing enough research ahead of time before jumping into something new full steam.

I got very excited looking at the PCBWay site and slammed through the pcb design process without thinking much about what I wanted in the end. Now I think I need to figure it out. My initial design has 3 LEDs that are directly wired to ground at power, so they're always going to be on. That is boring. I want a little bit of functionality in my add-on. I started looking at 555 / 4017 LED chaser circuits. I wired one up on a breadboard and while I found it a very informative and fun exercise, I wasn't satisfied with the animations I was getting with that circuit. I've moved onto thinking about an Attiny85. Partially because I was still thinking about using WS2812b LED's on this add-on but also because they seem similar to Arduino's and I'm familiar with those. 

Using an Attiny85 I can easily create the animations I want to see with the LED's but I'll also be able to add some sort of unique functionality. I'm intrigued by the aspect of add-on to badge communication. Looking at the DC Darknet badge from 2018, I really like how you an scan for shitty add ons and the badge's OS reports to you the name of the add-on that is plugged in. I only have the Darknet Eggplant add on, so I don't know if this functionality existed with any other badge/add-on combinations. I've read up a bit on AND!XOR's SAO reference and that sheds some light but I'm still not sure about it. 

Something I am a little more sure about is the actual blinking functionality of the add-on. I got a bunch of animations programmed on an arduino with 3 LEDs and then I needed a way to switch between the animations. One of my favorite features on a lot of badges I've seen has been capacitive touch sensing. This seemed like a good way to give the end user a button without adding a button to the parts list. I downloaded the CapSense library, threw a 1M resistor across two pins and was pretty much good to go. 

The circuit works as well as I could want it to. I'm thinking I may have to switch out the CapSense resistor for a different one if the circuit doesn't work as well on the actual board? I will also probably modify some of the LED animations at some point, but I felt comfortable trying to move the programming of an Arduino UNO onto the Attiny85 chips I had ordered. 

To do this I used the Arduino IDE and Arduino UNO as ISP following this guide. It worked really smoothly (as long as you follow all the instructions) ((I tried to go without the capacitor between GND and RESET on the Arduino, didn't work...))

The had to re-arrange which pins I was using for what when switching from the Arduino and Attiny. I ended up using pins 0, 1 and 4 on the Attiny85 for the LEDs as these are PWM outputs. I'm using 3 and 5 for the CapSense circuit and have one pin, number 2, left to try and do something with. I'm bummed that it's not enough for I2C but I still haven't fully wrapped my head around the badge/add-on addressing. 

Now I have my Arduino Sketch running 95% correctly off an Attiny85. Very cool. (One LED isn't behaving correctly in some of the animations but I can handle that). Being that my board will require an Attiny85 now, I'm starting to think about either getting the microchip programmed during the manufacturing process, or adding in a 6 pin ISP header into my design so I can re-flash the boards using some sort of pogo-pin jig down the line. This might be easier than having the board manufacturer program the boards, not entirely sure.

I'm enjoying figuring out this process. My process probably appears a bit haphazard but it's (sort of) working for me.

This MrTwinkleTwinkie stream popped up the other day and was really helpful pointing out how I should've done my board design last week. Between that and the Getting to Blinky 4.0 series by Contextual Electronics I'll be better prepared when I starting desiging the shitty pixel v2 boards in the coming days. 

Discussions