I was gunna use a picaxe ...

meridian

Member
but as my Mum said, 'there is more than one way to skin a cat'.

On the good ship Meridian, we have to show a white light while at anchor. There is a 10W incandescent at the top of the mast, but nearly 60' up in the air isn't where most people are looking.

Anyway, long ago I made one to hang lower down using the tower LED globe sold by Jaycar. It has 5 legs plus 3 on the end., runs on 12V naturally. I also made an automatic switch to turn it off and on at daylight/evening. Mind you, the miniscule power used is a drop in the ocean compared with the 120 - 150 Ah/day. (Still only 1800W, so pretty green household for 2 people). The main incentive for turning it off was to increased the longevity.

The auto switch was simply a PN100 with the LED in the collector, 2.7K resistor to base with the CdS cell base to earth. I couldn't get it to turn off completely but that was OK.

The other day it stopped and in testing with direct 12V I noticed it was noticeably brighter with 12V direct, without the transistor. So I thought 'I know, I'll use a Picaxe'. The '08M can read the ADC from the CdS, and turn on a relay at exactly the value I want. I then looked up the Jaycar catalogue for the specs on 5V and 12V reed relays. The 5v will hang in til 3.5 and the 12v down to 8.4V. I then thought, 'Hang on, the transistor setup will work with that'.

So with resistor wheel in place on the base of the BC548, and with the CdS cell between base and ground, I twirled it around until the relay closed and opened with a slight change in ambient light. Turned out to be 22k.

Now it turns on the relay which gives the LED the full 12V. It is quite sensitive, moving my outstretched fingers over the cell produces a noticable flicker.

All of this was constructed on a small piece of veroboard about 1.5" by .5". The relay probably cost the same as an '08, but I didn't have to worry about sockets, voltage regulation, etc, etc.

The moral is that you don't *have* to use a chip for simple tasks.

paulr
 

premelec

Senior Member
and if you want to send Morse messages with yer lights an 08M is a great choice - and it can send wind speed data and temperature while you have a drink on land... etc... oh I forgot we have GPS cell phones to do all the duties now...
 

fernando_g

Senior Member
Many moons ago, Popular Electronics magazine had a section about DANDY circuits. DANDY = discretes are not dead yet.

The caveat I see with your ultra-simple circuit is that it has no hysteresis...as you have already noticed, light conditions near the threshold values can make the circuit to oscillate (flicker).

If you want to maintain the DANDY circuit, perform a google search on transistor schmitt triggers. With an additional transistor and a couple of additional resistors you can add hysteresis.
 

hippy

Ex-Staff (retired)
It's true, one doesn't have to use a chip but one also has to consider what using one does give over a tradition discrete design.

Usually simplification, the ability to do everything within the chip with software ( as with fernando_g's example for hysteresis ) which can save on more complex discrete solutions, plus modifiability, where operation can be changed purely in software. That can be handy if the light sensor breaks and the replacement doesn't have quite the same characteristics, or you find something needs a bit of tweaking later.

The real difference is that a discrete solution is usually carved in stone, not easy to change and there will consequently be a natural reluctance to change things. With software you can tinker to your heart's delight and always reload the previous 'good code' should you make a dog's dinner of it and you're back to wherever you were, no harm done.

If you're really looking for energy conservation you may want something which can monitor other use, delay its turn on if energy is required elsewhere; an adaptive system. That's usually much harder with discretes, especially if you want even rudimentary 'artificial intelligence'. Once you get into 'do this, if that and this and the other' that's a strong hint you're into a logic solution and that's what programmable chips are good for.

As long as you have a good specification, design to it, and are happy to live with the results then there's no great advantage to a chip design. Where you're not quite sure, a chip and software solution can offer far more flexibility. A discrete design 'is what it is' the day you build it where a chip design has more opportunity to be whatever you want it to become.
 

Dippy

Moderator
Oh yes, definitely.
Personally, I'd use an op-amp based circuit, but the theory holds true: if hardware is good enough, within budget and within capabilities then go for it.

But, so often, when you want to make some minor adjustments then changing a number is so much easier than chaning a component - and often cheaper than a good quality pot.
Horses for Courses - bleedin' obvious , but I think we all knew that... hopefully :rolleyes: ?
 

premelec

Senior Member
Simplicity...

I DO like simplicity and garden lights' circuits are an example - but I also did a design years ago which used NO solid state components [besides a PV charging battery] which would open shades on a solar hot water heater when the sun shone and close when it didn't - the gear motor was loosely mounted so it would flip a reversing toggle switch when it hit the actuation end stop so that the next transition of the SPDT bulb thermostat sensing solar input would drive the motor in the opposite direction. I was really happy to use no relays, transistors etc - not even a resistor...

I think all engineering students should have to have experience on how to find simplest solutions to a particular problem. As Dippy will point out sometimes complexity is the most economic solution - then there is also elegance [whatever that is] in code and hardware - even it it's not initially cost effective [development time...]. Hooray for diversity...
 

manuka

Senior Member
DANDY indeed! There's no doubt that the South Sea's blistering sunbeams,UV & salt spray may significantly age discrete components,LDRs especially. Perhaps Meridian should report back after a sailing season !

FWIW the posting reminded me of an email received ~2003 from an Australian boatie, who'd PICAXEd together a simple solar powered LED beacon. This allowed him to align the vessel into his marina berth against a bewildering array of other harbour lights -he proudly reported "and what's more I programmed it myself".
 
Top