Sunday, 8 November 2015

Testing a resin cast guitar neck

Already we've discovered that our one-piece cast-resin neck isn't going to be hardwearing enough to use as a playable guitar (even just scraping a taught guitar string across the frets causes tiny little shavings to peel off).

But the smokey-black finish does create a very impressive finish! At BuildBrighton this week, we took our RGB LED lights and our black resin-finish fingerboard and quite literally stuck the two together.


The dark resin completely obscured the underlying PCB but the LEDs were plenty bright enough when illuminated, giving a really impressive finish. The "twinkle" sequence, with fading LEDs, was particularly nice!

Friday, 6 November 2015

Resin cast guitar neck part IV

Undeterred by the setbacks of the previous casting, we were determined that casting a guitar neck has got to be far easier than building one from scratch. Since the whole point of creating a custom guitar neck is to put our "guitar tutor" fret lights behind it, a solid wood neck is out of the question (though it wasn't until we'd already bought a new controller board for our desktop CNC and half-built a milling rig to try it anyway).

Sure, we could probably route some channels in the back, and add some holes in the front and let the LEDs shine through. We could probably even fill the holes with coloured resin and  sand it all smooth - but ultimately it would still look like what it was; a wooden neck with a load of holes drilled into it.

What we were after was a quick and easy way of creating a repeatable fingerboard. Which led us to ask "how hard is cured resin?"

Since the major problem with our last resin casting attempt was the fret wires (the bubbles were also a problem, but that was down to poor application when filling the mould, not because of the actual idea) we started to ponder - what if we cast the entire fingerboard, with the frets as  part of a single-piece of resin?

There seemed only one thing to do; we already had a mould with indentations for frets - instead of putting fret wire in and pouring resin on top, why not just fill the entire mould with resin, and see how it turns out?

Bubbles are a concern, but with a bit of care, we should be able to eliminate them. We dashed off to the local art suppliers and paid through the nose for some "craft casting" epoxy resin and some compatible glass-based ink. We added the tiniest bit of black dye to the two-part resin while mixing it up, then poured it - extra slowly - into the mould.


The whole thing looked like a large inky puddle. But as the resin poured from the mixing tub, we could already see it taking on the slightly translucent, grey-black appearance. If we could shine our LEDs through that, it would look great!

After 48 hours we tried to turn out the mould.


Maybe it was the dye additive (although the craft shop was insistent it was compatible with the - overly expensive - resin kit we'd also bought). Or maybe this particular resin needed more than 48 hours to cure properly. Maybe it's because we didn't add any fibreglass this time. But it was quite alarming when the entire fingerboard bent along with the rest of the mould - similar to how a stick of rock bends after you've sucked one end, forgotten about it, and left it in the window for about eight weeks.

This one was going to take a little longer to cure than our first attempt!


After another two days to cure fully,  the black fingerboard turned out relatively solid. Even after all this time, the "back" (or top, as it was when cast in the  mould) feels a little bit tacky if left in one place for any length of time!

The level of detail captured, however, is incredible.
On our original fingerboard, we'd placed some pencil crosses, as we had originally planned on drilling and CNC milling the actual wood. Not only has the silicone mould captured the grain of the wood on the surface (we're still split as to whether this is Really Cool or A Bit Shite) it even captured the pencil markings (the pencil marks are not gouges in the wood, just very faint lines - almost invisible now of the wooden original).

We're going to have to leave this for another few days to go off fully, before fixing it to a guitar neck and seeing if cast-resin frets are actually playable (or whether they just wear off after a couple of two-step string bends!)

Full colour guitar LED neck with WS2812B RGBs

While we've been casting and waiting for resin to go off, we've also been looking at our guitar LED system. It works quite nicely, but it somehow seems to be lacking that "wow" factor. Or maybe it's just because until now, we've not really come up with anything "new" - just recreated existing guitar light systems, like the FretLight guitar.

It was while pondering how to really make our effort stand apart from the crowd, that someone suggested a full-colour RGB system.

The good old WS2182B RGB LED. To this day, I can't bring myself to call them "neopixels". I think the idea of "neopixels" along with the Arduino plug-n-play style approach to coding is pretty limiting in a lot of respects. Neopixels are what WS2812B LEDs become when sold through the Adafruit store. But I can't help but make the distinction - in much the same way an AVR ATMega328P microcontroller is not an Arduino (even though it is used in most Arduino Uno boards).

Anyway, with all that out of the way, we finally settled on using an AVR (and, yes, the pre-built FastLED libraries for Arduino) to drive an array of RGB LEDs. But that's only because when I shared my PIC-based code to do the same thing on a 32Mhz 16F1825 a few of the nerds said "if you built it in Arduino, we could share code" (although "share code" doesn't mean "work together on this project" as I often expect it to, and more often means "give me what you've done, once you've written and debugged it, and I'll make demands on what else I want it to do in the future" - but that's a whole other rant about why I personally don't usually bother much with building projects on the Arduino platform!)

So having agreed to "share code" and use the Arduino platform, we set about building a RGB LED matrix to replace our shift-register based, single-colour LED guitar board(s).


The great thing about the WS2812B LEDs is that they are easily daisy-chained, making laying out the circuit board quite easy - even for etch-at-home, single-sided boards.

As the LEDs could end up drawing a bit of current (each one up to 60mA at full 100% white brightness) a single, snaking power line is unlikely to be able to handle the current requirements. So we redesigned the board, added some through-holes and ran some big wide copper strips up the back!

Big, wide, copper strips are connected to the front of the circuit board....


...by using some 1mm PCB rivets and plenty of solder!

A bit of Arduino-style copy-and-paste coding, and the LEDs were soon lit up

(so far we've only soldered up six out of a possible nine "frets" or columns of LEDs, but enough to prove that the concept works - the circuit design is then repeated across a number of sections to create one, large, fingerboard-length circuit.)

We added an LCD screen and rotary encoder, and built a simple menu system to allow the user to select from a number of options, including setting the brightness, the default LED colour, serial baud rate and so on.

We also added a serial/I2C eeprom chip, so that we could store multiple "patterns" to display on the LEDs. A simple protocol allows us to define a 16-colour palette, and then display any pattern (or image if you want to think of them like that) on the LEDs. Here's an early development version being tested:




Current functionality includes:
  • change overall brightness
  • set the key and scale type (major/minor)
  • change between midi and serial data mode
  • set serial baud rate (most common baud rates supported)
  • load and display patterns from external eeprom
  • play "twinkles" animation
also included (but not shown in the video) are:

  • allow two or more patterns to be displayed on top of each other
  • change between full-colour and monochrome (single, default colour, mode)
Colour patterns and images are currently stored on an external eeprom chip and are displayed by selecting them from the menu. Image/pattern data can also be sent to the device via serial at a number of different baud rates - this would allow an animation to be controlled by an external device (PC or other microcontroller) and sent to the guitar fretboard, allowing interactive, animated patterns to be displayed along the neck during a performance.



Thursday, 5 November 2015

Resin cast guitar neck part III

After leaving for a few days to cure fully, we took our resin neck out of the mould to inspect how it had turned out. It was certainly a learning experience!

The stiffness of the board was very good. Although resin has a reputation for being very brittle, the added fibreglass gave it a solid, strong feel. The finish, however, was not so good.



There were large air bubbles throughout the length of the neck, and at differing depths. Because the resin was "clearcast" even bubbles in the centre of the neck thickness were clearly visible.



Some of the frets were also completely encased in resin (and a couple almost completely encased, except where an air-bubble exposed a small part of the fret wire, completely destroying the appearance of a nice, clean, shiny wire!)



But worst of all, some of the frets had shifted while the resin was being added to the mould. This is ultimately a killer for the idea. Because the frets had twisted around, there were no longer equally spaced to 1/12 along the length of the neck. If this fingerboard were are put onto a guitar, the intonation would be all over the place!


(this photo was taken after a later experiment, adding dyed resin to the back, so see if we could create a "smoky glass" effect. It didn't work!)

In short, resin casting the fingerboard seemed like a good idea at the time. But in practice, it gives very inconsistent results, and would be very difficult to replicate consistently. Back to the drawing board.....

Resin cast guitar neck part II

Following on from our rubber mould-making last week, after leaving the silicone a good four days to cure fully, it was time to actually add some resin and cast some shapes!


After removing the original fingerboard from the silicone mould, we quickly found a weakness in our design. The rubber mould could easily be flexed and twisted along it's length; meaning a slightly banana-shaped fingerboard was very easily created - even if unintentionally.


To get around this, we put the fingerboard back in the mould, then used some contact adhesive to glue the silicone mould to a flat board - the idea being that after removing the fingerboard, the mould should stay - roughly - in the right shape.

Before filling the mould with resin, we removed the fret-wires from the original fingerboard and placed them, tine-side up (smooth curved side down) into the indentations in the bottom of  the mould. The resin should set around the tines, ensuring that each fret wire is completely and securely embedded into the final resin fingerboard.

With the mould prepared, Jake (the resident BuildBrighton surfboard maker) made up some two-part epoxy resin and added chopped up strands of super-fine fibreglass webbing. A thin layer of resin was poured into the mould, then a long, thin, strip of fibreglass, then more resin - more fibreglass, more resin and so on, until the mould was completely filled.


The resin takes a good 24 hours to cure fully, so at the end of another slightly-more-productive-than-usual BuildBrighton "nerd night" we left the resin to go off in its own good time.

Wednesday, 4 November 2015

Guitar tutor - chord chasing

Following on from our guitar tutor shift-register-LED project, after some discussion (and the usual "musical differences" that accompany any discussion involving two or more musicians) we've been adding some extra functionality to our firmware.

So far, the light-up fretboard shows a scale, pattern or chord in a specific key. And while simply playing the same old scale over an entire progression won't ever sound too offensive, it can quickly become a bit "boring" for the listener. True musical expression comes from playing with the underlying progression. i.e. you actually need to take note of which chord you're playing over, and adjust your melodic phrasing accordingly.

So for "chord-chasing" sequences (where you play from a scale that matches the dominant chord being played at any one time) we've put some "shortcut" buttons on our microcontroller, to select the relative second, third, fourth, fifth and sixth chords from the dominant key (which is dialled in at the start of the song). For anyone not familiar with music theory, let's assume that we're playing in the key of A (major).

  • This means that our root chord or primary chord is A major.
  • The second chord (or, in music notation, the II chord) is B minor (two frets up from the root).
  • The third chord (or the III chord) is C# minor (two frets up from the II chord).
  • The four chord (IV) is D major (this is probably familiar to anyone who plays classic blues sequences, or pop songs that follow the "three-chord-trick"
  • The five chord (V) is E major (pop songs and most blues progressions follow the I-IV-V rule)
  • The six chord (VI) is F# minor (two frets up from the V chord)
  • The seven chord (VII) is G# diminished (although this is rarely used; Peter Green's "Need Your Love So Bad" is one of a few blues songs to actually make use of the diminished sound).

On our guitar body we will eventually have seven buttons. This allows the player to "dial in" the primary key that they are playing in (let's say A major for now). When they hit the first button, the corresponding scale (A major) can be displayed (although for guitar solo playing, perhaps the A major penatonic scale might be preferable).

As the song continues, maybe the IV chord comes along. Instead of the player having to work out which chord this is, stop playing and dial in the new chord, they can simply hit the fourth button. The firmware will work out the relative "fourth" chord for the key and display the appropriate scale/pattern (in this case, D major).

This allows the player to quickly see all the relevant notes not just for the key that they are playing in (after all, we can all blast an A minor pentatonic scale over any song in the key of A) but also to match the tonal qualities of the underlying chord sequence - a way of producing harmonious music that actually fits with the song being played, and not just a load of widdly-widdly scale-shredding!

Casting a resin guitar neck for display LEDs

After successfully trialling our LED guitar tutor, we looked into putting a fingerboard back over the exposed LEDs and circuit boards. It proved to be more difficult and more fiddly than we'd anticipated. In fact, after drilling the original fingerboard (and making a mess of it in the process) we figured it'd be easier/better to create the entire thing from scratch.

Originally this was going to involve CNC routing a new piece of rosewood, with precision cut holes for the LEDs, perfectly spaced slots for the frets and pockets on the reverse for the PCBs and shift registers to fit into. And then Jake had a great idea....

Jake works with surfboards and has done quite a bit of resin casting. Using resin (and fibreglass sheets, where appropriate, to strengthen the resin) Jake suggested making a cast of the entire fingerboard. Because the resin is completely clear, we could embed the LEDs into the reverse of the resin while it sat in the mould. Once set, simply wire the LEDs and fix to the remaining guitar neck/body assembly.

At first we weren't entirely convinced about an entirely cast, resin neck. After all, we've no idea how quickly resin frets might wear down, nor how they might stand up to repeated pressure from a guitar string. Jake had a second, great idea:

After making the mould, and before pouring the resin, we place the wire frets into the mould (with their tines facing upwards). Then, when the resin is poured over the top, it sticks to the underside of the fretwire and holds it perfectly in place.

After a first layer of resin has been poured, we can place a printed pattern inlay actually inside the fingerboard, with the LEDs behind it (the inlay is not so opaque as to block the LED light when it is illuminated). Lastly, another layer of resin is poured over the top (remember we're working from the front of the fingerboard, towards the back) and the LEDs embedded into the fresh layer, while still wet.

So while all this sounds good in theory, there's only one way to know for sure if it'll work - and that's to give it a go!

We had some silicone left over from an earlier casting experiment. It wasn't brilliant, but would do for a test piece. After all, we're only using a guitar neck we've got lying around, to prove the idea works - we'll probably buy a new neck and fingerboard to make a "final piece" if it does, indeed prove to be workable. So the first thing to do was create an enclosure for our mould. This was made with a few offcuts of wood:



We didn't have a massive amount of silicone to play with, so made the enclosure quite close to the fingerboard. Ideally we'd have liked a bit more room around the fingerboard, to create a larger bulk of silicone, once dried, but this will just have to do!

Then a really critical part - to seal all the edges, to stop the silicone from seeping out while it is drying. We used Play-Doh and squashed it into every join where wood meets wood:


And finally, mixed up the silicone with the catalyst, and poured it in!


Rather than just dump the whole lot over the top, we poured the silicone into one corner of the enclosure and let it slowly spread to cover the rest of the fingerboard naturally. It may have been because the silicone was quite old, but it was really thick and gloopy, took ages to spread, and seemed to have a large number of air bubbles in it.

While pouring, we constantly tapped on the framework, to encourage the air bubbles to the surface (and to pop). The whole pouring process took a good ten minutes. Now the mould is likely to take at least 24 hours to cure properly. More photos to follow......