Showing posts with label leds. Show all posts
Showing posts with label leds. Show all posts

Friday, 27 April 2018

Lighting Up

A tinted perspex f-board is going to be supported along each edge by some carbon extrusions. This will give me a 'tunnel' under the f-board where the LEDs can be positioned. Although missing from the WorldSemi datasheet, the WS2812B devices I sourced measure about 1.7mm high. They will be soldered to a 0.8mm thick PCB, with decoupling capacitors on the other side which should end up as around 3.5mm thick overall. The carbon extrusion is 4mm square which gives 0.5mm of wiggle room.

The neck width at the nut is 38mm (1.5"). With a pair of 4mm extrusions supporting the f-board, this leaves a tunnel width of 30mm. At the other end of the neck the width is 63mm (2.5") leaving 55mm of tunnel width. To keep the display consistent, I need to use the same quantity of LEDs across the width along the whole length of the neck so they will have to fan out. Although 30mm should in principle allow six 5mm LEDs, I want one of the modes to simulate traditional marker dots which will be down the centreline of the neck. This requires an odd number, so five LEDs across the width of the neck it will be. This gives a device-to-device pitch of 6mm at the nut. At the other end of the neck, the device pitch will be about double that.

Along the length of the neck, I cannot achieve the same pitch as I will need to get my soldering iron in there! After juggling some dimensions around, I have decided that a 7.5mm pitch is more realistic in the other direction. For a 21-fret, 34" scale neck and a display length of 600mm this requires 80 LEDs in each row, giving a total of 400 LEDs!

Each LED can take a maximum of 50mA (also missing from the datasheet) when all three colours are driven together. For 400 LEDs running at full beans, the guitar's 5V supply will need to provide 20A and the LEDs will collectively dissipate 100W!!! Ouch! At best this will cause it to go out of tune, at worst its a fire waiting to happen! 

The prospect of running this beast off a battery is a non-starter. The size and weight of a battery capable of 2-3 hours operation is not something I want to be lifting all the time whilst playing. It's going to need power sent down the lead. 

After further consideration, the maximum current is unlikely to happen as I'll be deciding how many LEDs are on at any one time, and also white isn't that interesting, so I will be more likely to be running single colours or combinations of two. So 2/3 of the colour, and maybe 1/2 of the LEDs are usually off gives a better (safer?) estimate of around 7A of current consumption. The neck should only(!) be dissipating 35W in that case which is barely a small fire. 

With some major design criteria understood, its back to the fun stuff. I bought a microchip PIC24EP256MC202 and a 8x5 device WS2812B test board to prove the concept. The PIC is a 16bit device and runs at up to 70MHz, but still has a DIL package for development. The 8x5 board needed a bit of hacking to get it from 40 serially connected LEDs to five lots of 8 serially connected LEDs. The PIC can be used with the Microchip's MPLAB X IDE software (free!) which provides a C compiler environment and makes coding for larger projects easier than trying to do it all in assembler. 

After pinching some code to get me started (thanks Robin!) I was able to get a line of LEDs lighting up in different colours. This proved I had the right pins connected and the logic the right way up. After that I wanted to control the five rows of LEDs more-or-less simultaneously. I didn't want an obvious ripple effect causing the bottom right LED to be noticeably lagging the top left. The WS2812B datasheet shows the critical timing is the width of the high pulse. A short high is seen by the LED as a zero, whereas a long high is seen as a one; after that the timing is more relaxed. During the relaxed time period I start to send data to the next row. The overall effect is to write to a column of five almost in parallel before moving on to the next five. After spending some time debugging with the oscilloscope, it finally started clocking out patterns taken from an array. Bingo!

The LEDs are so bright I had to cover the 8x5 board with tinted perspex so the phone camera didn't saturate too much. The development board can be seen on the right with a red PicKit3 programmer sticking up. It works! I'm excited! Still a way to go though...

Saturday, 24 March 2018

It must be a sign

It was a dark and wet day at Guildford train station. Platform 5 is one of the few places in the world to be more than 10 metres from a Costabucks. On the one hand I could run up & down the stairs, join the queue, decide exactly which type of (basically all the same) beverage I wanted before returning with my prize, or I could just sit there and make do with a faint aroma wafting across from Platform 1. If the train were to arrive and depart whilst I am on this quest then it won't be just the milk that will be frothing.

To aid my naturally poor decision making ability, I glance up at an information display to see how much time I have to play with. I notice the sign full of LEDs displaying the next train and the stations it will stop at.



I start to count how many dots in the characters and wonder how they are multiplexed. I think about how much processing is done behind the twinkly lights and if it uses as much energy in one hour as a kettle boiling one cup of water to make instant coffee at home. I decide that Costabucks will probably survive without my patronage and before I know it, the train arrives.

Later that day I actually get round to practising a song (for one band or the other!) and I look at my dark fretboard and think wouldn't it be great if it had lots of LEDs on it. I've never seen a bass guitar with an LED sign on the fretboard. There really isn't enough room for it and it's a silly idea. Unfortunately I'm the sort of person that believes these are exactly the right reasons for building one anyway.

I have a reel of 800 RGB LEDs sitting in the cupboard (Everlight SAGBB7C). These use the standard 5050 SMD package with 6 pins. Each led will require its own driver channel and for any decent sized display that's a lot of complex-stuff-to-go-wrong to be installing inside a bass neck. 

The WS2812B LEDs used on my 'damp' project would be ideal. The same 5mm square SMD package, but this time only 4 pins. Power, ground, data in and data out. They use a clock-less serial data stream based on high and low mark space ratios giving 1's and 0's. The main bonus here is that apart from the LEDs themselves, there doesn't need to be much else in the neck - ie less-to-go-wrong-where-I-can't-fix-it. The downside is that these are NOT sitting in a cupboard, so it's more on the shopping list.

I want this bass to look reasonably normal when its off, so I'm going to purchase a jazz bass style body and neck online and pop a few RGB LEDs in along with the control circuitry. With multi-coloured action going on, this Jazz Bass has ended up with the name Jelly Bean before it has even begun. 


With confirmation of my mental age out of the way, it's time to work out how it is all going to hang together. Some prototyping is going to be needed up front before I spend serious money on the body as I need to prove that a (simple to solder) Microchip PIC will be able to control separate daisy chains of LEDs in parallel. There are many other devices out there which may be more suitable but I already have a PICkit3 programmer, so it's PIC or bust. 

Monday, 26 May 2008

Stripping In The Blue Light District

The Ibanez body is quite a dark brown color. I thought it was a solid paint finish for many years, but if you take a fresh look there is definitely a decent bit of woodgrain going on underneath a heavy lacquer.

The bass is a lawsuit model dating from the mid-seventies and has had some remedial work carried out already. The original Gibson three-post style bridge was replaced (quite rightly) and a thumbrest was ditched. The holes left were filled with wooden plugs and under the dark lacquer the repair work was practically invisible. The bizarre shaped cutout that looks ideal for storing ice-lollies was hidden away under a scratchplate.







Half way through the paint stripping and Chewie & me are wondering if perhaps we have been a little bit hasty. It is looking quite rough now. Talking about different new paint finishes keeps us going...



Once the paint stripper has done its chemical nastiness, we attacked the surface with sandpaper. It was like trying to sand glass. At this stage other uses for the body were found, such as the latest in guitar-inspired lingerie...






It took power tools and some good old fashioned grunt to shift whatever was still clinging to the wood, but evetually the mist started to clear. The paintjob had been hiding quite a nice veneer. The body could now be seen properly and was constructed from five layers of differing thickness hardwood (plus two [ash?] veneers), with the grain direction changed on alternate layers. With the contouring on the body these layers show up as go-faster-stripes. When the hardware gets bolted back on, this is really going to look smart.





Back in the land of fboard lights, the plastic dots have been shaped using 6mm and 8mm formers. The dots have been glued into the board and here are the results:







Funny how turning the lights on makes the wood get darker...