Wednesday, 30 March 2016

The rest of the components arrive, lights all tested!

It's been a busy week with the caravan and it still doesn't look like we've done that much to it - a lot of behind-the-scenes work went on over the weekens to sort out some of the electrics.  The 240v system has had an overhaul.  There were some interesting choices going on there, like the standard single socket hanging from the underside of the caravan, the discovery that between 1 and 4 sockets were not earthed - I don't know for sure how many because I'm not sure which earth wire was tucked behind the pattress, and decidedly weedy cable used for wiring some double sockets!  I've also started first fix for the 12v extensions for new kit, and the speaker wiring.
Under-cupboard LED strip (in soft focus ;-)

I've now replaced all bar one of the strip lights with LEDs and the ambient light is looking much nicer.  I'm particularly pleased with the kitchenette light, which has gone from being a grotty strip light to a concealed LED strip below the high cupboards.  Just got the toilet one to do, but I'm not quite sure how best to do it, so I might leave it until it's time to decorate.


Anyway, to the real business in hand: the RGB light strip with the Raspberry Pi!  The MOSFETs I ordered finally showed up, which meant I could construct the test circuit on a breadboard. For those that don't know, a MOSFET is a transistor which works a bit like an electronic switch, allowing a lot of current to be switched by a low voltage / current to the gate pin.  It can switch much faster than a relay, so they're ideal for this project, as the LEDs are dimmed by rapidly pulsing the output rather than decreasing the voltage.

The results were a) I didn't blow myself or any of the components up, and b) the lights looked great and the music synchronisation worked really well.  I want to look into the source code to see if the light threshold can be altered, and a delayed fade be introduced if necessary, as some music can make the lights quite strobey, which won't be suitable for everyone.

I also received a wiring header to get the car stereo plugged in.  It seems to work OK, although without a working battery and a charger that doesn't have an emphasis on smoothness means there's a fair bit of hum at the moment.  It seems go pretty loud without distortion, which is all good.  Can't wait to get a new battery!

No comments:

Post a Comment