Kodak G240 Digital Picture Frame

A while ago I got really hacked off with the latest firmware update to my QNAP TS212 NAS box. There’s nothing wrong with the hardware, I’ve had the thing for a while and it’s been absolutely bullet-proof. What QNAP do with their firmware is a disgrace though, I’ve never encountered such a bloated bag of crap in all my life and every release adds yet more features and “shiny” that I don’t need, or even want.

After an update made it virtually unusable something had to change. Luckily, you can install Debian on it, so I did. I haven’t looked back and, to be honest, this is what the device should have been without all that lame bloatware that only retards, or Windows users, could like.

RIght, that got that off my chest πŸ™‚

I’ve been looking longingly at digital picture frames for a while but I’ve never been able to justify the cost for something that might be useless (if I can hack it and use it how I want then it’s useful, if it just displays pictures then I don’t see the point). I found this Kodak G240 on AliExpress so I thought I’d give it a punt for $16, after a bit of research.

Google led me to dpf-ax which seemed to fit the bill, although it wasn’t entirely clear that the device was supported. I decided to go for it anyway, the lure of having a simple display on my NAS box which would tell me what was going on without having to ssh in was just too much.

All I had to do was download dpf-ax and follow the instructions. Apart from installing a few extra packages on my OpenSuSE 13.1 OS there really wasn’t much extra to do. It gave me a brown trouser moment when the first attempt to flash the firmware failed and the screen turned red. That was OK though, the initial connection was via a generic SCSI device (/dev/sde1 for me). This led to the failed firmware update. At that point, just unplugging the device and plugging it back in again gives a digital display in firmware update mode on /dev/usb0. Just start the firmware upload again and it works! Perfectly!

I haven’t had the arsed time to do anything more than change the font size on the patched veersion ofΒ lcd4linux that dpf-ax installs for you yet. Here are a couple of blurry pictures…

On top of the QNAP TS-212

On top of the QNAP TS-212

Blurry close-up

Blurry close-up

I’m quite happy with it. It lets me know what’s going on – even more so once I add disk capacity and anything else I’d like to see on there.

I’ve bought another one of these on eBay (Β£3.95 πŸ™‚ Β + Β£3.99 postage πŸ™ ) as I can see me using one with a raspberry pi at work to have “at a glance” network/cluster/firewall etc. status on my desk. Otherwise I might use it for other “status” display at home, or something. Whatever.

Added: 2014 Oct 27

I seem to have come down with some kind of lurgy so had to leave work early. After a long sleep, I got to thinking about doing something graphical with one of these displays – one of my machines at work falls over about once a week (I’ll be replacing it when I get some time) and the first I know about it is when people start complaining. If only I had a simple display on my desk that alerted me to problems, or something…

Machine/Service Status

Machine/Service Status

Disk usage

Disk usage

Those are actual size mock-ups that I’ve been testing with lcd4linux on one of my displays. It works really well so just need to organise what data I need, how often to get it and what displays to show. There are a whole load of things you can measure and I only really want to see current problems and issues that might become problems soon (disks getting full or “reallocated sector count” getting high for instance).

It hasn’t taken long to put together some python to create these images. I’ll sort something like this out for my NAS box too when I get the chance. Unfortunately I can’t seem to find any more of this particular display at any sensible price but anything based on the ax206 chipset apparently should work – how do you find out without buying one though? Hmmm.

Posted in Uncategorized | Leave a comment

Odds and Sods

Haven’t had much time to do anything too interesting lately, sorting out my garage has been more important. I did get around to 555 PWM timer stuff though and that worked out OK. It’s always useful to have a reason to do something and, in this case, it was to provide a fan speed controller for my mate Chris and hisΒ 50W LED uplighter project.

I didn’t use the circuit I’d found previously, a bit more digging on Google led me to a tutorial on the Dallas Personal Robotics Group site. They provide a really good write up and there’s no point me repeating any of it. Their schematic is:

DPRG Schematic

That’s pretty much what I put together and here it is on test:

555 PWM Board (lower left)

555 PWM Board (lower left)

The LED driver outputs about 36V so I had to knock up a DC buck converter to drop that to 12V for the 555 circuit and the fan. I have a few LM2575-ADJ switching regulators that I picked up from eBay a while ago so I used one of those with the circuit straight out of the datasheet:

LM2575-ADJ, from datasheet

LM2575-ADJ, from datasheet

It seems to work well and it should be just a case of setting the pot to a sensible value that will both allow the fan to startup and not sound like a jet engine.

This also seemed like a good opportunity to dig out my “entry level” JYE Tech DIY Oscilloscope to see if I could get anything useful out of it. I was aiming for a frequency of around 30kHz so C1 is chosen as 470pF. What did I achieve?

Actual frequency (Hz)

Actual frequency (Hz)

Not quite! That should still be a high enough frequency not to annoy older ears though. Here are a couple of waveform shots:

"Sort of"  Square Wave

“Sort of” Square Wave

Zoomed in

Zoomed in

That’s much “squarer” than I expected. Can’t see that the fan’s going to mind much! So, that’s done, I’m sure I’ll find out how well this works at some point.

While I had all my stuff out, I decided to modify a few of the really cheap 5V output DC boost converters I’ve been picking up from AliExpress. They’re fine (and you can’t make anything like them for anywhere near the price) but come with a USB “A” female output connector:

Blurry picture

Blurry picture

They’re pretty handy and will chuck out 5V quite happily from a couple of AA batteries – I’ve found them useful to generate 5V to power 1W LEDs placed in cupboards for instance.

I’ve always thought that they would be more useful if the USB connector was, er, optional. And it is πŸ™‚ – well, if you hack it off with your snips and solder wires on instead…

Slightly modified 5V boost converters

Slightly modified 5V boost converters

It’s useful to have a few around in that format. Luckily the chunky corner pads for the USB connector aren’t connected to anything (I expected them to be grounded) so they make for great strain relief.

I’m currently waiting for some 3V3 boost converters from CISECO which are about Β£5 each! Haven’t found any equivalent from AliExpress and, even at Β£5, I still can’t buy the bits and make my own any cheaper. I was going to buy a surface mount radio module from CISECO and design a circuit board to use some of my pile of ATmega328 chips but, again, it was much cheaper and easier to just buy their RFu-328 product which ticks all the boxes. Looking forward to those turning up then I can start to unleash wireless sensors all around the house, in the loft, in the garage, whatever. I’ll start small though… and I do need one to controlΒ some Xmas lights that I’m planning for the porch (controller and PSU will have to be in the loft).

Onwards and, er, whatever…

Posted in Uncategorized | Leave a comment

LED Dimming – nothing to see here, yet, move along…

I recently picked up some 5m 12V white LED strips. Luckily, I disposed of one quickly but I still have one left that I feel I have to do something with πŸ˜›

So, I was playing with a 10W LED a while ago and I still had the tiny45 & power mosfet sitting on the breadboard next to my bench PSU. Not very exciting but, it still works πŸ™„

[embedplusvideo height=”600″ width=”800″ editlink=”http://bit.ly/1l4E3Yw” standard=”http://www.youtube.com/v/s24USeoZs84?fs=1&vq=hd720″ vars=”ytid=s24USeoZs84&width=800&height=600&start=&stop=&rs=w&hd=1&autoplay=0&react=1&chapters=&notes=” id=”ep7997″ /]

It’s all very “meh” really. I have decided though to eschew the digital route and use the venerable 555 timer, and a pot, to provide a “dimming solution”. I need to do better at analogue so this seems a good a place to start as anywhere. Stay tuned for much frustration and blowing stuff up πŸ˜€

I have found a circuit that, it is claimed, doesn’t suffer from the frequency changing as the voltage does. That’s here.

Here’s the schematic:

From a (quick) look last night it sounds like this won’t work. However, I think the people saying that are missing the point. It has an oscillator to set the frequency, not an R-C circuit which would have frequency problems. It looks easy to build and should be interesting enough to diagnose (well, for me this is much more about the journey than getting to the destination in the shortest possible time). I know I haven’t got the same value oscillator or pot and I’ll be at 12V, not 6V, so there should be some figuring out to do.

I’ve also seen a circuit that uses 2 x 555 timers to give a constant frequency PWM where you can vary the duty cycle easily. Unfortunately, I don’t have a 1110 timer :mrgreen: but I do have one (or more) 556 kicking about if I need them.

Sad I know, but it sounds like fun to me…

Posted in Uncategorized | Leave a comment

And we’re back…

…with a fairly trivial little project to “let there be light”.

Been “moving” house. Long story, can’t be bothered going there, but it’s kept me from doing anything for quite a while. After much faffing, we’re buying the “bungy” we’ve been renting for the last 5 years – contracts are exchanged, completion is but days away, so time to get back to bodging stuff πŸ™‚

We have a cloaks cupboard that is dark – the way the door opens you just don’t get any useful light and there’s no power in there to do anything with. In past properties I’ve bought battery powered IR sensor lights to job this job. Problem, they are utter shite as the IR sensor uses current, all the time.

Here’s my new solution…

1W LED bead, and friends

1W LED bead, and friends

That’s a 1W LED bead with an AMC7135 constant current driver and a bit of bodgetastic soldering (only one of the caps is “needed” – personally, I really don’t think you need any here, but I’d got them out and they’re small so it was “use it, or lose it”).

So we need power, and something to switch the thing on and off. That’s not hard, is it…

Say no to PIR

Say no to PIR

All very simple stuff. The battery box has a 5V boost converter on the back of it. The micro-switch triggers the whole lot. And hot glue holds everything together, as it should.

Had a bit of an oopsie in that I was a bit too generous with the hot glue for the switch so I’ve bollocksed the switch – there’s a bit of hot glue that’s got into the actual micro-switch. The end result is it takes a few seconds to switch on when you open the cupboard door. Easy enough to hack the whole switch off and replace it tomorrow, with a bit less glue obviously 😳

It’s good to be back doing stuff. Especially with the “new, improved” man lab πŸ™‚ I packed everything away because we were going to buy somewhere else – that didn’t work out. It’s been a great opportunity to rearrange everything and have more space and easier access to all my stuff. Looking forward to getting on with all the things I want to get on with.

Posted in Uncategorized | Leave a comment

10W 9-12V LED

Another arrival from China πŸ˜†

This thing is bright, very bright! I had an initial play using the bench psu to limit the current to around 1A – it seemed to drop about 10V at that so all within spec, even if it does get a bit toasty.

I’ve been playing with the AMC7135 350mA constant current drivers (for instance, to configure a 1W bead to light up the understairs cupboard at work). One thing you can do with those is connect them in parallel to get more current. In this case, 3 x 350mA = 1.05A which ought to be near enough.

3 x AMC7135 + "the beast"

3 x AMC7135 + “the beast”

In the above photo (I know, it’s not the best photo ever) you can see the 3 x AMC7135s on a SOIC adapter board and the LED mounted on a heatsink (which is then sat on an old CPU heatsink just to get it up and into the draft of the little 12V fan at the top of the picture).

That all works fine but I’d like to use one of these on my computer desk since the lighting in the man lab is fairly crap. I’ve got an old ATX PSU on that desk so the power side is ok, I wouldn’t want it on full blast all of the time though.

It’s not entirely clear if you can use PWM to switch the AMC7135 fast enough to control LED brightness. I gave it a go and my conclusion is that you can’t. That needed another solution – switching a FET in-line with the LED ground. I’m using an ATtiny45 for this – eventually it will have “+” and “-” buttons to control the brightness in (say) 10 steps, for now I’m just varying the PWM from a duty cycle of 0% up to 100% and then back down again. That should let me see if it works or not.

Firstly, I tried to use a chunky IRFU9024 power MOSFET. That worked but it got very hot, very quickly so it was time for some more learning. The problem was that the 5V of the Attiny isn’t driving the MOSFET fully on so it’s just acting as a large (and expensive) resistor. It needs to be fully on or fully off to not dissipate power (therefore heat) so that component wasn’t going to work well.

Luckily, I still have some logic-level power MOSFETs kicking around (Infineon IPS135N) so I could just substitute this smaller MOSFET for the larger one. These are fully on by the time you reach 2.2V so absolutely no problem there and this one doesn’t even get warm.

Tiny45 (left), logic level MOSFET (right) and "demo" LED

Tiny45 (left), logic level MOSFET (right) and “demo” LED

That all seems to work just fine. I need to think about a chunky heatsink and/or fan to keep the LED and the AMC7135s cool. I’ll also require some kind of flexible arm to mount everything on so it’s not a done deal yet. At least all the “proof of principle” stuff is done so I know it works before I start trying to put it all together.

Here’s a video…

 

Posted in Uncategorized | Leave a comment

LED bits and pieces…

1206 SMD LEDs

I picked up some 1206 SMD LEDs the other week, they’re bound to come in handy. One of my pet hates is when I get some or other board with SMD LEDs on and the maker has read the LED datasheet. Yup, it’s all in spec but I don’t like getting blinded every time I power up the board. To that end, I wanted to get a good idea of what resistor values would be appropriate with these LEDs rather than just “correct”.

Here’s all the data I have on them:

Forward voltages @ If = 20mA

Forward voltages @ If = 20mA

Standard resistor values would be 150Ξ© for Red and 100Ξ© for pretty much everything else. I tried those to confirm that they were eye-burningly bright. And they were.

That's better...

That’s better…

I’m using 4.7kΞ© with red, white and blue, 10kΞ© with green and 2.2kΞ© with yellow. That seems to give light that’s bright enough to see, even on a sunny day, without blinding me. Having these little boards setup also lets me play with these values so I can customise them for any application.

1W LED “Beads”

I’ve had some of these for a little while now and so I decided to blat a few (it turned out to be 8) onto a bit of prototyping board, just for the hell of it. I’d noticed before that both LED and resistor (2W 6.8Ξ©) got pretty hot so I wanted to see how a bunch of them got on together. Here’s the board:

LEDs and Resistors

LEDs and Resistors

It’s a bit bright! Although it only draws about 7.5W rather than the 8W I was expecting. Have you got your shades on?

Sunrise!

Sunrise!

The proto board gets fairly toasty but I have run it for about 8 hours without any ill effects. That’s not long enough though and I think I’m going to have to do something to dissipate the heat when I use these in anything more serious. I’m not happy with the mahoosive resistors – which also get pretty hot – so I can’t see this combination being much use for anything.

AMC7135 LED Driver

Had a 100 of these turn up in the post this morning – tiny SOT-89 packages that can sink a constant 350mA.

AMC7135 Pinouts

AMC7135 Pinouts

Coincidentally πŸ˜‰ that’s exactly the current for the 1W LED “beads”. Had to have a play with one of these…

AMC7135 bodged on to an adapter board

AMC7135 bodged on to an adapter board

The datasheet for these is confusing! Well, not really but I got confused by “Out” and the 1W LED I put onto the board got a bit dead. Never mind.

Here comes the sun...

Here comes the sun…

According to my bench PSU it is pulling around the 350mA as advertised. The AMC7135 is pretty toasty, as is the LED but no smoke so far. It’s a much neater solution than those enormous resistors but will still need to sort out some kind of heatsink. I’ve got a fan on my desk and that’s gently wafting air around – if I turn it off then everything feels hotter and the current goes down as the AMC7135 starts to limit things to stop itself burning out.

I need to test this but I believe that the Vdd signal to the AMC7135 can be PWM from a micro-controller. It’s just acting as a switch and the voltage through the LED is separate. If that’s the case then it should be possible to run the LEDs at 12V (say) whilst providing PWM control from an ATtiny45 (or similar) to act as a dimmer. Will try this soon, what can possibly go wrong?

Posted in Uncategorized | Leave a comment

Transistor basics

Being fairly new at this I can’t say I’ve quite got my head around transistors yet. I keep letting the smoke out 😳

I want to use some SMD transistors with the next LED board I put together so I need to figure out if they’ll work first before getting the boards made and generally faffing about. Time to display my ignorance and try an experiment to see just how far I can push them. In this case, “them” is the BC817-40:

BC817-40 SOT23 on adaptor board

BC817-40 SOT23 on adaptor board

I’ll use a couple of my simple 5 x led boards for testing with the transistor driving all the leds for “white”. That’s these then:

Is it up to the job?

Is it up to the job?

The following tables are taken from the datasheet:

Maximum ratings

Maximum ratings

Characteristics

Characteristics

So, as I understand things…

  • The transistor will be fully saturated so I don’t need to worry about P_{tot}
  • The base resistor will have approximately (5-0.7) = 4.3V across it
  • Minimum current gain, h_{FE} = 40
  • For 500mA, I need at least 500/40 = 12.5mA at the base
  • I can’t exceed 200mA at the base so we’ll aim for 50mA
  • That means I need a base resistor of 4.3/0.05 = 86\Omega
  • So, 100Ξ© should be “close enough for government work”

That seems too easy, let’s see what happens πŸ˜†

Ok, it’s been running at 500mA for an hour now and the transistor isn’t even warm. The PSU says it’s sitting there at 5V, 500mA so that looks like a winner. That’s a single BC817-40 running 30 leds (effectively) whereas I’ll be using 3 of them on the 5×5 led boards so they only have to run 25 leds each. What can possibly go wrong? πŸ™„

I’m bound to have missed something. I know that the 500mA I’m seeing is probably a coincidence since the leds are nominally 20mA each. The resistor values are (obviously) slightly higher than the calculated values so I think that would explain that.

I’m not sure if I should use a resistor to limit the collector current – don’t think so since the planned load is a maximum of 500mA but with some to knock off for the resistors being slightly too large on each led.

I reckon I’ll go ahead and knock up the 5×5 boards in Eagle and and get the initial batch of 5 made up. The plan is to use these as “mood lighting” but they really are just steps on the way to something more elaborate with microcontroller and IR receiver (or wireless) on board for remote control. It’ll take a while to get there as I’ve got a lot to learn, hence the small steps and “numpty” posts like this where I have to figure out what must be “obvious” to people who know this stuff properly.

Still, no smoke, that’s good for me and transistors πŸ˜†

Update

Well I slept on last night’s result and awoke to realise it wasn’t totally conclusive. I had proved to myself that using a current limiting resistor on the base of the transistor kept the magic smoke inside where it belongs. I hadn’t proved that not using one didn’t 😈

So, off with the resistor, make a direct connection to the base and…

Result!

The leds came on, but only for a very short time. RIP little BC817-40, sacrificed in the name of science πŸ˜›

It’s definitely dead but there was no smoke. I guess they can’t really fit much smoke into something so small though…

Posted in Uncategorized | Leave a comment