Jump to content
iFreilicht

Iris 16 - Building an RGB power button

Recommended Posts

Posted · Original PosterOP

Technically I'm only building a part of a PC here, but I think it's complex enough to warrant it's own build log. (Mods, if this doesn't fit here, please move it!)

 

So we all know vandal power buttons like these:

 

medium_PV6-series.jpg

They've been used in quite a few mods by now, and I'll use one in my next case, but they are a bit boring. So, what about having a switch like this, but with RGB LEDs that can be individually controlled? That's what I'm working on right now and the plan is as follows.

 

The switch will fit into 16mm holes, have 12 RGB LEDs and a micro HDMI connector on the side that connects to the mainboard headers (PWR_BTN, HDD_LED and USB_2) with a modified micro HDMI to HDMI cable. Everything in the switch will have to be custom. The casing, the ring, the internals, the firmware, everything. I'll also make a small command-line tool for controlling it via USB.

 

Short demo video:

This is a short demo video of three effects on the current prototype.

 

 

Try out the online Visualizer 0.2 here!
MRwxN4N.png


 

 

Uses:

 

This button might be used as a regular button that just lights up in exactly the colour I want it to, but it could also serve as a minimalist clock, as a spinning loading indicator when a webpage is loading or as an Xbox 360 style indicator of how many controllers are connected. The two header connections for the PWR_BTN and HDD_LED mainboard headers are multi-purpose, so if I used multiple of these buttons, I could either control an additional LED with either of them, or perform an action when the button is pressed. The possibilities are pretty vast.

Link to post
Share on other sites
Posted · Original PosterOP

Current status:

2017-06-17: LED rings arrived!

This is what I got, plus leftover parts from the assembly line. Quite a few failed attempts it seems.

GNPXquIl.jpg

 

That first break was so satisfying. I only broke out the unpopulated ones until I have the necessary equipment to test the others.

1zvEw5Hl.jpg

 

Sides come of first. Then the top is removed and the individual PCBs are broken out. I had to use strong pliers for the little bridges between the two rows.

huerfxfl.jpg

 

Something I wanted to avoid: Leftover material outside the perimeter of the PCB. This means manual sanding is required before the whole unit can be assembled. I'll see whether I can fix this.

37Awnnx.jpg

 

Just so you get an idea of the scale. The things are fucking tiny.

23F9E4El.jpg

 

And this is what's left after breaking out one panel. The crossed out ones I'll keep for now, maybe I can troubleshoot the issue that caused manufacturing mishaps myself.

ha4bjiEl.jpg

 

2017-03-16: Please vote for the project name!

I've narrowed it down to three final candidates. One Latin word followed by the number 16 to denominate the hole diameter. The meaning of the word is written in parenthesis. The initial list was almost 70 words long.

 

Vote here!

 

If you have any additional thoughts, please let me know!

 

2016-12-13: First pictures of the model!

 

Alright, here is what I've got so far (more in spoiler):

 

fHAevVql.jpg

 

Spoiler

Front:

Pic1.PNG

 

Back:

pic2.PNG

 

Bottom:

Bottom.PNG

 

Top:

Top.PNG

 

Now, you can see multiple things here, some are a bit more hidden. You can see the general shape, which is is very reminiscent of a normal vandal switch, apart from a few changes. I'll walk you through those features and my reasoning behind them. If you missed any prior discussion in the thread, you can catch up here.

 

Why not something other than a vandal switch?
While some are getting tired of seeing vandal switches used so commonly or dislike that they can't be flush with the front of a case, they have a very nice and minimal front and many still like that aesthetic. Additionally, that makes installation a breeze. Modding a case to take this switch is as simple as drilling a 16mm hole.

 

Why the two flat spots?
These have both an aesthetic and a functional reason. The functional reason is that they make it easier to hold the button in the same orientation while installing it. The aesthetic reason is that it ties the micro HDMI connector in much nicer than if the whole body was round. They also work much better with the set screws in my opinion.

 

What do the two slots do?
They each serve a different purpose. The one at the front grants access to a DIP switch that allows the user to free up one GPIO pin as explained in the previous post. This allows extending the functionality of the switch without opening the switch. The one at the back is an unfortunate necessity. When disassembling the switch, one has to insert a small slot screwdriver or other stiff flat object there before pulling out the internal assembly.

 

What are the set screws for?
Holding the whole thing together. To disassemble the button, only those two screws have to be removed. Then the whole internal assembly can be pulled out the bottom of the button. This allows access to the two resistors which are in series with two of the GPIO pins. These resistors can then be swapped out to accommodate different external LEDs or to use the EUSART bus on P4 and P5. (To use the I2C bus on P1 and P2 one only has to flick the DIP switch, no modding required) You can see that one screw is showing on the bottom. I'll see whether I can fix that, but right now the screw is too close to the bottom for that to work.

 

Why use a micro HDMI connector?
This connector (also called HDMI Type-D) is the only one for external use that has enough pins and is small enough to fit the button. It is also small enough to potentially fit a smaller 12mm version of this button. It carries a USB2.0 signal and five GPIO signals, which requires at least nine pins. There are a few pins left over, which could be used in a future version with a better Microcontroller for even more GPIOs.
Using a connector like this over directly connected wiring has multiple advantages for modding. It makes it easier, cheaper and safer. If the stock cable isn't the right length, right colour or you need different terminating connectors on the other end, you can just get a micro HDMI cable for 5 bucks and modify that to your hearts content. There's no risk of damaging the button by soldering and you don't even have to open it.

 

What are the 12 slots on the top for?
Those direct the light from the twelve independent RGB LEDs to the top. They are very visible in these pictures, but the actual cover ring will be frosted and I will do some testing beforehand to make sure that the slots don't show when the button is turned off and the separate LEDs lights don't bleed into each other inside the ring when turned on.

 

What is the purpose of those weird shapes at the bottom?
They serve alignment purposes. Some animations on the switch might be dependent on orientation, so the switch needs to know where "up" is. Usually it will consider the triangle to be "up", but if that is not desired (for example if that orientation would block the connector), one can set in the software which of the lines is the top one. Unfortunately, there's no space for an accelerometer inside the switch with the current manufacturing techniques I'm using, so this is has to be done manually.

 

Final thoughts
Of course, all of this is in flux and subject to change, but apart from a few small internal things that need to be changed I'm quite happy with the current status of the button. The next step would of course be a prototype, but I doubt that I'll make it to that stage this year. I'm also dreaming of replacing part of the internal structure with a flex-rigid assembly, which would free up a lot of space that is used by board-to-board interconnects at the moment, but prototyping that can be extremely expensive compared to a regular multi-PCB assembly.

 

Thanks for reading, let me know what you think!

 

2016-12-11: GPIO pin layout!


So, I was thinking a little. There was one GPIO left on my MCU, and it bugged me that I didn't utilise it. Today I found a way to do exactly that. Behold, the new GPIO layout:

PaTrMNO.png

 

It's not final, but I confirmed that this fits onto the PCBs and into the casing. So, we gained one more pin and I found a DIP switch that allows to decouple P1 from the button.

So, what does this mean?

 

Well, when flipping the DIP switch (for which the casing needs to be opened), the button is connected to GND on one side, so it can still be used normally when connected to the PWR_SW_P pin of the mainboard. Now P1 and P2 are a completely independent pair of IO pins, which are connected to the internal I2C signal processor. (Incidentally, you can also use P3 and P4 for EUSART, but that would still require replacing the 330R resistor with a 0R jumper.)

But that's not all.

This video from this great build shows a fading effect for the HDD LED. With now 5 pins, you can either flip the DIP switch, use P1 and P2 for reading the HDD signal out and P3 and P4 for driving an external LED, or you could leave everything as it is, and just set P2 and P4 to read the HDD signal and P3 to drive an external LED on some external ground. While the circuit used for the effect in the video isn't very complicated, it's nice to have this integrated into the button.

 

And additionally you can also drive an external switch input now. For example, if you wanted a double press on the button to reset the PC, that's now possible as well, without sacrificing any other functionality.

 

Pretty good increase in features for a single additional component if you ask me.

Link to post
Share on other sites
Posted · Original PosterOP

First PCB done:

 

nDxtSOfl.png

 

This is the top PCB with twelve LEDs, the button, six resistors and a board-to-board connector. It took a long time to get to this point. I first layed out the whole PCB in eagle and then realised that there was a better way of connecting the LEDs that would increase brightness, but that required four layers. Eagle can only do two in the free version, so I had to redo all the footprints in KiCAD and start from scratch.

 

The casing is already done as well, it looks just like a normal vandal button from the outside. I'll probably have to remodel it, though, the current solution for closing it isn't very secure.

Link to post
Share on other sites
8 minutes ago, iFreilicht said:

Current status:

 

nDxtSOfl.png

 

This is the top PCB with twelve LEDs, the button, six resistors and a board-to-board connector. It took a long time to get to this point. I first layed out the whole PCB in eagle and then realised that there was a better way of connecting the LEDs that would increase brightness, but that required four layers. Eagle can only do two in the free version, so I had to redo all the footprints in KiCAD and start from scratch.

 

The casing is already done as well, it looks just like a normal vandal button from the outside. I'll probably have to remodel it, though, the current solution for closing it isn't very secure.

If you found some way to mass produce these you could probably make a fair amount of money off these. Also, welcome to these forums :P


Spoiler
Spoiler

Yukuru (Main rig): i5-6600k @ stock | Silverstone AR04 | iGPU (Godawful) | 1x8GB G-Skill Ripjaws DDR4-2800 (Running 2133) | ASRock H110M-STX | 128GB Plextor M6S + NAS | Delta 120W Power brick (Thanks @iamdarkyoshi) | Custom Case (Build log| MSX

Spoiler

Blast From the Past (Disassembled and decommissioned as of the 7th of December, 2016, you will be missed): Asus A8Js | C2D T7200 @ 2GHz | Nvidia Go 7700 512MB DDR2 | 2x1GB DDR2-667 Kingston RAM | Hitachi TravelStar 5K160 160GB 5400 HDD | Win7 Pro

Spoiler

Laptop: MacBook Pro 13.3 inch late 2013 model i7-4558U (2C/4T @ 3.3GHz Turbo) Intel Iris 5100 graphics (1200MHz boosts) 8GB DDR3-1600 Soldered on 2560 x 1600 display (Looks very nice)

Spoiler

Box (Brother's Rig): Xeon X5450 | Alpine 11 Pro Rev. 2 | Asus P5G41C-M LX | Asus GT 730 2GB Passive | 2x2GB Noname (DDR2-667) | Crucial BX200 240GB + 320GB HDD | Aerocool Strike-X 500W | Win7 Home Premium

Spoiler

Spiky Box (Sister's Rig, needs upgrades): i7-4790 | Cooler Master Seidon 120V V2 | Asus Z97 Sabertooth Mark I | KFA2 GTX 560 Ti EX OC | 2x4GB Crucial Ballistix DDR3-1600 | 1TB Seagate Barracuda | Corsair CX600 | Aerocool Xpredator X3 Red/Gold edition (My old case) | MSX 

 

USEFUL LINKS:

PSU Whitelist PSU Tier list F@H stats | Mining Ethereum

 

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, TheRandomness said:

If you found some way to mass produce these you could probably make a fair amount of money off these. Also, welcome to these forums :P

Thanks! I've actually been lurking here for a while, mainly been active on other forums, but I'm really excited about this project and wanted to share it :)

 

I am trying to design for high- and low- volume manufacturing alike, but I feel like this button would be costing quite a bit more than most would be ready to pay for it. Especially the milled aluminium casing will cost quite a bit to make. Anyhow, I want to get it done first, then we'll see about selling them. ;)

Link to post
Share on other sites
2 minutes ago, iFreilicht said:

Thanks! I've actually been lurking here for a while, mainly been active on other forums, but I'm really excited about this project and wanted to share it :)

 

I am trying to design for high- and low- volume manufacturing alike, but I feel like this button would be costing quite a bit more than most would be ready to pay for it. Especially the milled aluminium casing will cost quite a bit to make. Anyhow, I want to get it done first, then we'll see about selling them. ;)

Well, I'd buy one for a little case mod I have planned.. (0.7 litre case!) Also, this is technically in the right forum (you are building something and it is a log but it could also go in the case mods/other mods subforum. 


Spoiler
Spoiler

Yukuru (Main rig): i5-6600k @ stock | Silverstone AR04 | iGPU (Godawful) | 1x8GB G-Skill Ripjaws DDR4-2800 (Running 2133) | ASRock H110M-STX | 128GB Plextor M6S + NAS | Delta 120W Power brick (Thanks @iamdarkyoshi) | Custom Case (Build log| MSX

Spoiler

Blast From the Past (Disassembled and decommissioned as of the 7th of December, 2016, you will be missed): Asus A8Js | C2D T7200 @ 2GHz | Nvidia Go 7700 512MB DDR2 | 2x1GB DDR2-667 Kingston RAM | Hitachi TravelStar 5K160 160GB 5400 HDD | Win7 Pro

Spoiler

Laptop: MacBook Pro 13.3 inch late 2013 model i7-4558U (2C/4T @ 3.3GHz Turbo) Intel Iris 5100 graphics (1200MHz boosts) 8GB DDR3-1600 Soldered on 2560 x 1600 display (Looks very nice)

Spoiler

Box (Brother's Rig): Xeon X5450 | Alpine 11 Pro Rev. 2 | Asus P5G41C-M LX | Asus GT 730 2GB Passive | 2x2GB Noname (DDR2-667) | Crucial BX200 240GB + 320GB HDD | Aerocool Strike-X 500W | Win7 Home Premium

Spoiler

Spiky Box (Sister's Rig, needs upgrades): i7-4790 | Cooler Master Seidon 120V V2 | Asus Z97 Sabertooth Mark I | KFA2 GTX 560 Ti EX OC | 2x4GB Crucial Ballistix DDR3-1600 | 1TB Seagate Barracuda | Corsair CX600 | Aerocool Xpredator X3 Red/Gold edition (My old case) | MSX 

 

USEFUL LINKS:

PSU Whitelist PSU Tier list F@H stats | Mining Ethereum

 

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, TheRandomness said:

Well, I'd buy one for a little case mod I have planned.. (0.7 litre case!) Also, this is technically in the right forum (you are building something and it is a log but it could also go in the case mods/other mods subforum. 

Oh cool, that sounds like something I'd want to see! Got a log already? If not, send me a link when you're starting.

Ok thanks for clearing that up. :)

Link to post
Share on other sites
3 hours ago, TheRandomness said:

Well, I'd buy one for a little case mod I have planned.. (0.7 litre case!) Also, this is technically in the right forum (you are building something and it is a log but it could also go in the case mods/other mods subforum. 

0,7 L WUT!?

With a Pi or a Nuc, or what?

My planing goes for a 4,8-5 L case ... atm ... with included PSU an R9 Nano and a nice little i7 :D  will start my Log in the next couple of days.

 

EDIT: Follow this btw

Link to post
Share on other sites
7 minutes ago, Narnash said:

0,7 L WUT!?

With a Pi or a Nuc, or what?

My planing goes for a 4,8-5 L case ... atm ... with included PSU an R9 Nano and a nice little i7 :D  will start my Log in the next couple of days.

With a COM express module and some magic. Now, let's stop derailing the thread :P


Spoiler
Spoiler

Yukuru (Main rig): i5-6600k @ stock | Silverstone AR04 | iGPU (Godawful) | 1x8GB G-Skill Ripjaws DDR4-2800 (Running 2133) | ASRock H110M-STX | 128GB Plextor M6S + NAS | Delta 120W Power brick (Thanks @iamdarkyoshi) | Custom Case (Build log| MSX

Spoiler

Blast From the Past (Disassembled and decommissioned as of the 7th of December, 2016, you will be missed): Asus A8Js | C2D T7200 @ 2GHz | Nvidia Go 7700 512MB DDR2 | 2x1GB DDR2-667 Kingston RAM | Hitachi TravelStar 5K160 160GB 5400 HDD | Win7 Pro

Spoiler

Laptop: MacBook Pro 13.3 inch late 2013 model i7-4558U (2C/4T @ 3.3GHz Turbo) Intel Iris 5100 graphics (1200MHz boosts) 8GB DDR3-1600 Soldered on 2560 x 1600 display (Looks very nice)

Spoiler

Box (Brother's Rig): Xeon X5450 | Alpine 11 Pro Rev. 2 | Asus P5G41C-M LX | Asus GT 730 2GB Passive | 2x2GB Noname (DDR2-667) | Crucial BX200 240GB + 320GB HDD | Aerocool Strike-X 500W | Win7 Home Premium

Spoiler

Spiky Box (Sister's Rig, needs upgrades): i7-4790 | Cooler Master Seidon 120V V2 | Asus Z97 Sabertooth Mark I | KFA2 GTX 560 Ti EX OC | 2x4GB Crucial Ballistix DDR3-1600 | 1TB Seagate Barracuda | Corsair CX600 | Aerocool Xpredator X3 Red/Gold edition (My old case) | MSX 

 

USEFUL LINKS:

PSU Whitelist PSU Tier list F@H stats | Mining Ethereum

 

Link to post
Share on other sites
Posted · Original PosterOP
12 hours ago, Snooli said:

What LEDs are you using? I don't think more than 2 layers should be needed.

1.5mm x 1.0mm SMD RGB LEDs.

 

As I said, the PCB was done with just a double-sided board, but that only allowed me to drive two LEDs at a time. The housings (which contain 3 LEDs each) have a maximum power dissipation of 35mW. Driving a single LED at ~7mA (a good margin below maximum current) already generates 22mW of waste heat. So per housing, I can only drive one LED at a time. With the old double-sided setup, 2 LEDs at a time means 18 full cycles to drive all 36 LEDs (an each LED is also BA modulated for brightness), so each LED could be let at most 1/18th of the time, resulting in 1/18th maximum brightness.

 

To alleviate this, I staggered the common cathode connections across five to six LED housings at a time, so that I can drive five to six LEDs each time. This means that only 7 full cylces are needed to drive all LEDs because I can drive five to six each time. But this is absolutely impossible to do with two layers. Seriously, it can not be done. 3 layers is the absolute minimum for this setup, and with the minimal track width from my manufacturer, I can't go below 4 even. Not to mention the fact that the board-to-board connector on the backside of the board would limit me to one layer in that area, which is even less possible.

 

6 hours ago, KrMaH said:

Damn! Awesome project! Good luck!
Also: subbed!

Thank you very much!

Link to post
Share on other sites
Posted · Original PosterOP

Second PCB complete

R6ViXoQl.png
Second PCB with microcontroller and oscillator circuit is complete. There's enough space for three more 0603 components in case I forgot something and I managed to get everything routed on just two layers. It's about as small as it could get, 12mm x 9.96mm. And with it being rectangular, I could route everything at 45° angles which makes it look rather neat and made the process much easier.

 

The bottom connector isn't routed as I didn't finalise the pinout for the HDMI socket yet. That's the next step.

Link to post
Share on other sites
On 8. 11. 2016 at 9:54 AM, iFreilicht said:

1.5mm x 1.0mm SMD RGB LEDs.

 

As I said, the PCB was done with just a double-sided board, but that only allowed me to drive two LEDs at a time. The housings (which contain 3 LEDs each) have a maximum power dissipation of 35mW. Driving a single LED at ~7mA (a good margin below maximum current) already generates 22mW of waste heat. So per housing, I can only drive one LED at a time. With the old double-sided setup, 2 LEDs at a time means 18 full cycles to drive all 36 LEDs (an each LED is also BA modulated for brightness), so each LED could be let at most 1/18th of the time, resulting in 1/18th maximum brightness.

 

To alleviate this, I staggered the common cathode connections across five to six LED housings at a time, so that I can drive five to six LEDs each time. This means that only 7 full cylces are needed to drive all LEDs because I can drive five to six each time. But this is absolutely impossible to do with two layers. Seriously, it can not be done. 3 layers is the absolute minimum for this setup, and with the minimal track width from my manufacturer, I can't go below 4 even. Not to mention the fact that the board-to-board connector on the backside of the board would limit me to one layer in that area, which is even less possible.

 

Thank you very much!

For some reason, I thought you were using adressable LEDs... not sure if they are made in this size though.

Link to post
Share on other sites
Posted · Original PosterOP
On 18.11.2016 at 1:14 PM, Snooli said:

For some reason, I thought you were using adressable LEDs... not sure if they are made in this size though.

 

Well, addressable LEDs are all the rage, especially in keyboards, so it makes sense to think about those first. But as you say, they are way too large for this application. The "dumb" ones I'm using are 1.5mm x 1.0mm, the footprint is of course a little larger, and those just barely fit onto the PCB when using sane clearances between them and the tracks. I believe the smallest addressable RGB LED is the SK6812mini at 3.5mm x 3.5mm, so more than six times the size of mine. Normal LEDs in that area are 5mm x 5mm. 

Link to post
Share on other sites
Posted · Original PosterOP
PCBs done!
AQ3iASBl.png
kNfSe5yl.png
 
The first one didn't change too much, the second one is more interesting. You can see two 1210 footprints for hand-soldering, which will be unpopulated normally. Why did I include them? Good question! You see, the button will have four GPIO (General Purpose Input/Output) pins. GPIO1 and GPIO2 are usually used to read the HDD LEDs status, GPIO3 and GPIO4 are connected to the button. But they also have secondary functions. For example, they can be used to drive regular LEDs like the ones on front panels pre-installed in cases. The button can also be read out by the MC. For these purposes, there are inline resistors on GPIO2 and GPIO4 of 330 Ohms. This is what ATX mainboards have and it's a good value for driving most through-hole LEDs. But, if the resistors aren't needed or a different value is desired, one can open the switch and install other resistors in parallel or SMD bridges to bypass the resistors completely. 1210 can be soldered by hand quite well and they are very cheap. So yeah, I over-engineered it a little.
 
So that's all three PCBs complete now, at least the individual ones. Now I've got to panelise them. With the two you see here, that's not going to be that hard, I already added straight edges for V-grooving. The top one with all the LEDs is going to be a different story, that one will need routing and mouse-bites. Once I'm done with that, I can ask my manufacturer and assembler for a quote.
Link to post
Share on other sites
Posted · Original PosterOP

Firmware Prototype!

 

As I wrote earlier, the button has four GPIOs, which are labelled SW0, SW1, HDD0 and HDD1. With the stock firmware, these pins have the following functions:

SW0 and SW1 can either be connected to the PWR_SW pins on the mainboard, or to an external LED. In both cases, the internal button can be read out by the firmware.

HDD0 and HDD1 can either be connected to the HDD_LED pins on the mainboard or to an external LED or to an external button/switch that can then be read out by the firmware.

All those functions are hot-plug capable and polarity invariant. Hot-plug capability means that no reboot or changing of settings is required to activate those functions. Polarity invariance means that these functions work regardless of which way you plug the connectors in. For this to work, the firmware monitors those GPIOs and changes the output depending on the results. Basically, it can detect what is connected to it and which way around.

I just now tested this with my current PC and an Arduino. Everything works just as expected. It's not that easy to show, but maybe this demonstrates it somewhat sufficiently.

 

And this is what the microcontroller sees:

 

MBg0WSe.png

 

It tracks button presses, LED polarity, HDD indicator activity and PWR_SW sense connection. All with less than 140 lines of code.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.


×