Arduino

From: koswix28 Jan 2015 12:30
To: Chris (CHRISSS) 277 of 542
I'll confess to not really knowing anything about transistors.
From: Chris (CHRISSS)28 Jan 2015 20:30
To: koswix 278 of 542
Not good enough :P

Turns out the eBay listing had it wrong. The tranny should be the other way round.
From: Chris (CHRISSS)29 Jan 2015 13:59
To: ALL279 of 542
I had another play with my LED strip using all 3 colours this time. I had a couple of issues with the PWM library. Pin 11 would only go high or low, nothing in between. Pin 3 (same timer as pin 11) didn't turn on at the same value as the other pins but did output PWM.

I started reading about manually setting the registers. So confusing. I kind of understand what needs to be done just now how.
From: ANT_THOMAS29 Jan 2015 17:47
To: ALL280 of 542
3 shift registers now working.

15 "LED" PWM outputs across 3 shift registers to check they're all communicating correctly. Max will be 24 covering all timezones.



Mains adapter seems to work well too. Initially I thought it was causing issues but I forgot to ground the DC-in to the Arduino.

A BH1750 light intensity board arrived too. Whilst it works great I'm not sure I like what it gives me. The LDR on an analog in pin gives a range of 0-1023, where the outputs seem to make sense, but with the BH1750 you get between 0 - 65534, with daylight only being around 100, now in the late afternoon with the light on it gives ~50. I could only get it to max out at 54612 by shining the flash on my phone at it. An LDR would probably be easier to fit somewhere too.
From: Chris (CHRISSS)30 Jan 2015 20:13
To: ANT_THOMAS 281 of 542
Cool. Lots of wires there :D

I kind of worked out PWM frequencies without using that library. I tried settings the bits of the two registers myself but worked out something wrong, not sure what. Found a website with a list of values to use and set them.

Then I just use analogWrite with the correct bits set and I have a PWM frequency of 3921Hz. It'll be half that if I used an 8MHz device in the atual install though.

And it looks like I can actually get all the pins I want to work correctly.
EDITED: 30 Jan 2015 20:14 by CHRISSS
From: ANT_THOMAS30 Jan 2015 20:23
To: Chris (CHRISSS) 282 of 542
Have you got the RGB strips working with the arduino now?
From: Chris (CHRISSS)30 Jan 2015 21:32
To: ANT_THOMAS 283 of 542
Not yet. I've only tested the small strip with it so far. Need to hack the IR signal too so I can turn it on and off and change colours. And tonight I tested the PWM frequency with a single LED.
From: Chris (CHRISSS)30 Jan 2015 23:57
To: ANT_THOMAS 284 of 542
And how's your world coming along? Are you going to do a variable hole size drilled wooden panel like the page you linked to before?
From: Chris (CHRISSS)31 Jan 2015 00:04
To: ALL285 of 542
Brown and red look too similar on resistors.
From: ANT_THOMAS31 Jan 2015 00:13
To: Chris (CHRISSS) 286 of 542
Still need to wait for a few bits to arrive: protoboard, screw connectors, dip sockets. The code is pretty much done. Comes in at around 20K, so there's room for some extra stuff if want. Though I imagine it'll mainly be on world time setting or all on.

The plan is to basically copy the map I linked with the variable sized holes and use MDF, though the UK isn't very obvious so I might tweak the design. Not bought the MDF yet though.
From: ANT_THOMAS31 Jan 2015 00:15
To: Chris (CHRISSS) 287 of 542
Just remembered I attempted to add an IR receiver to do the same as the button but it didn't seem to consistently receive the correct code from the remote I was messing with.
From: Chris (CHRISSS)31 Jan 2015 02:02
To: ANT_THOMAS 288 of 542
I have a protoboard that came with my Saintmart. Not used it yet. Are the dip sockets for the shift registers?

I kind of feel like I should have some advice for the MDF as I use lots but I can't think of anything right now. Don't breathe it in.
From: Chris (CHRISSS)31 Jan 2015 02:14
To: ALL289 of 542
Different PWM frequencies. 31Hz, 122Hz, 490Hz, and 31kHz.
Attachments:
From: Chris (CHRISSS) 1 Feb 2015 16:20
To: ALL290 of 542
Got most of the functionality working with my LED controller now. Still testing on a breadboard with R, G and B LEDs. And now an IR phototransistor. I can change colours, fade up and down, and that's about it for now.

Ant: not got any problems with picking up the IR codes from the remote.

I think I'll plug in my small test strip to see how it works with that. Then to hack the control box (good thing I have a spare from when I bought another remote) and get it all working properly.
EDITED: 1 Feb 2015 16:21 by CHRISSS
From: Chris (CHRISSS) 1 Feb 2015 19:59
To: ALL291 of 542
And here it is working. I might sort it out it saves the current colour to the EEPROM so that it restores it when the power comes on. Or just make it so the lights are off if the power comes back on.

The ones we have now turn back on when the power goes out, even if it was off. Which is silly. If there's a power cut while we're out the lights will turn back on when it comes back.

Red and green frequency is 31kHz, blue is 62kHz.

EDITED: 1 Feb 2015 20:01 by CHRISSS
From: ANT_THOMAS 1 Feb 2015 20:53
To: Chris (CHRISSS) 292 of 542
That's pretty cool. I think I might buy an RGB LED strip to play with. I still like the idea of making some sort of ambilight thing for my TV. I think originally I thought it would be a bit too difficult but after messing with arduinos more I should be able to do it.

Today and yesterday have mainly been spent trying to replace the wheel bearings on my car.

From: Chris (CHRISSS) 1 Feb 2015 22:16
To: ANT_THOMAS 293 of 542
I'm pretty happy with how it's working out. Just set it up so it's working with one of my pro minis so I can put it in a small box in the wardrobe to power it. Got the power button working now too, forgot about that one.

I am very impressed with the Arduino. I thought I'd be playing around with the Pi far more. Surprisingly easy to get some complex things working.

Have you fixed your bearings?
From: Chris (CHRISSS) 1 Feb 2015 23:26
To: ALL294 of 542
The almost completed project. Just need to make the connections to the Arduino more permanent.

First pic is the oroginal controller.
Then controller with the ICs removed and a couple of cables attached.
Third one is all the wires needed for the Arduino. 5V, ground, RGB and the IR signal.
And fourth is it all wired up. Plug in the 12V transformer and it works :D
From: Chris (CHRISSS) 1 Feb 2015 23:28
To: Chris (CHRISSS) 295 of 542
And one of the path the traces make for the MOSFETs. Took me a while to work out how they were connected up. Strangely there is no resistor on the red connection.
EDITED: 1 Feb 2015 23:28 by CHRISSS
Attachments:
From: Chris (CHRISSS) 1 Feb 2015 23:37
To: ALL296 of 542
And I now have it in the bedroom working. And was it worth it? Definitely. No flickering at all now. Much nicer light.

My colour algorithm needs tweaking though as the colours change a bit when the brightness is changed. White changes to a very greeny colour.