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. 

Friday, 22 December 2017

Damp

After Second Bass I decided to update my amp. My trusty 200W Class B amp does a great job as a practice amp when the 40W valve amp isn't going to be heard, but I felt there was "space" at the top for something else.
After a previous place of work got into financial difficulty, I found myself the proud owner of some industrial PSUs. These were destined for large Automated Test Equipment installations and were 800W units giving 48V at around 16A each. The idea of putting them to use in a bridge amplifier felt like my duty in these modern times of recycling...
The original intention was to design a Class D amp and put the tricky Class D modulator stuff inside an FPGA. I used an Altera Cyclone 4 device running at 200MHz, but the trade-off between simple PWM resolution and speed didn't look promising. I made a low level output stage and the results sounded (to my ears) like a badly tuned radio. I expect this is officially known as intermodulation distortion, but it was never going to cut the mustard.
To combat this fundamental problem the world of DSP promises much but when it comes down to details most is hidden away as proprietary information. The best chance of success was to use a sigma-delta topology which has similarities to SACD. After blowing a few sets of MOSFETs up I eventually had to resort to the tried and tested International Rectifier IRS2092 (now owned by Infineon). This may not be perfect, but with careful attention to layout (especially the dc offset protection monitor in my case!) and avoiding the usual grounding pitfalls it has performed admirably, albeit always making a weird weeeep noise when it is switched on.

The preamp has two separate inputs A and B, a compressor and a parametric EQ stage before the volume control. The controls were constrained by only having five excellent solid aluminium knobs that really needed to be used. The six controls are Gain A, Gain B, EQ frequency, EQ boost/cut, master volume and compressor level. Seeing as six controls and five knobs don't align properly, the compressor gain has to share the same knob as Gain B using a dual gang pot. Most of the time I use Channel A and on the rare occasions I need both channels, the compressor can be easily switched out if it misbehaves. The other switch mutes the output from the master volume which is handy at gigs to ensure no nasty noises build up between sets without having to twiddle anything else.

The Digital Amplifier working name was shortened to D-Amp and eventually just "damp". Maybe not as good as moist, but considerably better than fetid or stagnant.
I tried a resistive power test once it was built. I cobbled together some wirewound resistors to give 8ohms and then plunged them into water to keep them cool. Electricity - water - safety - blah blah - don't try it at home etc. I got to over 400W before the resistors burnt out! Before they let go, the amplifier was definitely happier at higher frequencies such as 1kHz and not so keen on 20Hz. This may be down to the amount of reservoir storage capacitance available, or the power supplies hitting their 20A current limits earlier than I'd hoped, but with real bass guitar signals it has so far belted out nothing but a good solid wall of sound. Or eaten watts and poohed bass as I have heard it put ;-)

The front is smoked perspex with a drilled aluminium panel behind. This allows the control fixings to be concealed, the (very noisy) PSU fans to be vented front and rear discreetly and the opportunity to put some eye-candy LEDs on the front around the master volume control. The ring shaped WS2812B LED board was sourced from a popular online auction site along with a simple controller. I was so pleased with these LEDs it made me ponder on another use for them...

Monday, 11 February 2013

Orange Overload

 
After the two weeks was up, the lacquer was lightly rubbed down with wet'n'dry paper, rubbing compound and T-cut which gave a pretty good high-gloss finish. There's a few not-so-good areas but from any reasonable distance it looks great. The bright orange is so intense that the camera gets saturated. According to Kia-Ora, it's too orangey for crows, and apparently too orangey for Nikon's too!
 
 
 
The jack socket doubles up as a strap button. An extra hole was drilled to allow the E string bridge to be earthed. As the nut is aluminium, it should earth all of them in a roundabout way.

 
There are no plates over control cavities on this guitar as it would spoil the organic curves. The pickup selector switch is fitted underneath the pickup and accessible from the rear (the bagel!). No other controls are needed - it's very minimalist...

 
The pickup was then fitted to (a) pickup the string vibrations and (b) cover the dodgy woodwork and shoddy soldering.

 
Now for the artistic shots. Chewie got me some orange Neon strings for my birthday, so this was the time to whip'em out. They really are the icing on the cake! 

 
You can't beat a good angle shot...

 
Much better than straight photos...

 
The white strap matches the fretboard.

 
I'm getting the hang of not overloading the camera now. It's a case of standing further away and using the zoom lens. Simple really, s'pose.
 
 
Here it is, hanging together. It still hasn't snapped.

 
After a bit of settling in, the strings seem to stay in tune for at least a few hours. I'm pleased that the stainless steel re-inforcement has worked well as the strings can be tuned quite independently. I'm still getting used to the Delano Xtender pickup as I cannot decide on the best switch position. There is plenty of top end, but without sounding lacking anywhere else. It's a good place to start, and I'll have to give the 4x10 cab full beans with it soon ;-)


Tuesday, 22 January 2013

War paint




Painting is tedious.

Sanding is tedious.

Sanding down paintwork doesn't figure very highly in my list of favourite things to do, but it is a necessary step along the way. The water-causing-cracks-problem behind me, I took the opportunity to add a bagel-like shaped feature behind the pickup so that I can add a pickup switch. This three position switch will give humbucker-series / single-coil / humbucker-parallel. This tonal variation may prove very useful seeing as there will be no other controls.






I did a bit of reading up on t'internet and white undercoat is recommended for fluorescent paintwork. 

 
I then realised, after refinishing the body a second time, that the headstock is a different colour due to the white undercoat.


Painting is tedious.

The headstock was also re-finished to make it match. Both parts were then lacquered with a polyurethane based coationg that promised to be heavy duty and suitable for alloy wheels. It smelt just like a tin of wood varnish, but it does seem tougher than the original acrylic lacquer. Actually I was very pleased that the white undercoat did make a difference as the orange colour is now much brighter. Every cloud has an orange lining!

Another two week wait to allow the lacquer to harden and then it is ready to be flattened down again. This time I used the bare minimum of water with the 1200 grit paper, 2500 grit followed by rubbing compound and finally T-cut. It looked pretty good in most places, but I noticed a few areas where I had rubbed through the lacquer and it was flaking at the edges. D'Oh!

Painting is tedious.

I knew the flaking had to be dealt with before it started to spread everywhere, so the surface was roughened up slightly and a few more coats of PU lacquer were applied.

I now need to wait for another two weeks because "Painting is tedious".


Unless you're painting bagels...

 

Saturday, 1 December 2012

The Learning Curve

I put on four or five coats of bright orange spray paint and allowed it to dry for a few days. I then lightly sprayed two coats of glitter paint to give the flat orange colour some added sparkle before putting on another half-a-dozen coats of clear acrylic lacquer. The can said allow two weeks before using rubbing compound! It was looking really good, but it was a long wait before I could do anything else to it.

I was starting to get quite excited about nearly completing the bodywork. All this waiting for solvents to evaporate is quite tedious, but a necessary evil. During this fortnight I took the opportunity to see how the pickup fitted. I had to enlarge the hole in the centre to allow some space for the cables, and drill three fixing holes.

As the lacquer had dried to a bobbly finish, I got the wet'n'dry 1200 grade out to get the surface smooth again. I rinsed it down and set to work with 2500 grade. Definitely promising. Another rinse and out came the rubbing compound. A good dash of elbow grease later (rinse!) and I'm onto an old bottle of T-cut which will provide the final polish. Wow! It looked really shiny, but it has got a bit wet throughout the process. I was so pleased with the result, which was multiplied by the fact that I wouldn't be messing about with sandpaper, paint & polish any more. I shook the drips off and brought it back indoors to dry out as the garage gets a bit damp this time of year (especially when I'm throwing water about).

The next morning I noticed the central heating had stopped working. I did a bit of prodding about, and eventually it became apparent that the previously very noisy pump was now really really quiet. This is not a good sign. I went to work and took a detour on the way home to get a new C/H pump. All I had to do was isolate the valves each side of the pump and swap'em over. Of course, like any good soap opera, the ending can always be predicted. The valves were seized onto the pump, so the system had to be drained and the valves replaced. The new valves were fitted and then it became evident that they were shorter than the old ones. I looked online for 22mm / 1.5" BSP valves but no-one specifies how long they are! So the next day it was an early start off to B&Q for 7am, get some 22mm yorkshire style elbows and get the blowtorch on the go. Warmth by 8:45!

After the central heating escapade, my attention returned to the bass body, so I picked it up to admire my good work and congratulate myself on a cracking job when I did indeed notice some cracks appearing. I was understandably annoyed by this. The water I used to rinse the paintwork had soaked into the wood grain where it was exposed (neck joint, jack, pickup and screw holes) and caused it to swell in places. Capilliary action works incredibly well on maple (so it would seem) and there was little choice but to let it finish drying out and have to start remedial work. Gutted!




To minimise the risks of the same thing happening twice, I'm attacking the problem on different fronts. The bare wood has been given a diluted coating of PVA to seal it and the cracks have been filled with wood glue. I ought to spray the neck pocket with a coat of paint or two. The majority of initial sanding (400 grade?) will be done dry. If I have to resort to wet sanding later, then I'll use a damp cloth to remove most of the residue. Of course, once I get to the painting, I'll still have to wait two weeks for the lacquer to harden. I'm so impatient!



Sunday, 4 November 2012

Sanding Equals Dust

Sanding is quite dull. You take some paper with miniature rocks stuck to one side and rub it a few times against your piece of tree. This enhances the look of the wood inversely proportional to the ache in your arms. In the meantime everything gets a liberal coating of dust.
 
Some of the larger gaps had to be built up with polyester car-body filler and smaller holes with knifing putty. Both of these products are quite uncontrollable (in my hands), but I threw in a bit more sanding to compensate.
 
 
If wood dust isn't sufficient, sanding through layers of paint and filler gives several different colours of dust. I tried light brown, white and two or three different shades of grey. Not fifty though - it's the wrong sort of curves.
 
 
Perhaps a camouflage paint job would have been an idea? This shows the high-spots and low spots left by the straight grinder. Then I did some sanding.
 
 
A lot of the time it is difficult to see any improvement. Whilst waiting for signs of progress it is worth doing some sanding to pass the time...
 
After a bit more sanding, most blemishes are blended in fairly well. This process could carry on almost indefinitely, but I'm not a stickler for absolute perfection. A few more coats of Filler / Primer and I reckon it's nearly ready for the top coat to be applied.
 
  
 Strangely, the filler primer is a light brown / orange sort of colour. Looks promising...
 
 
I think six bolts should be enough to keep the neck on.