why are new problems solved with the technology of 30 years ago? - Page 1
Forum section: electronics / general

author: slburris
author_rank: Frequent Contributor
timestamp: June 27, 2010, 04:08:05 pm
content: Warning, this is a mini rant :-)So I was reading the question and answer section of a recent electronicsmagazine. The question was about building a timer that would providea 2 hour pulse. The questioner thought (correctly) that this would behard to do with a 555 timer. The timing capacitor and/or resistor wouldhave to be huge. Nasty problems with reliability and accuracy.The answer proposed was to make the timing period much shorter,add a 4000 series CMOS 12 bit counter, some logic gates to decodethe terminal count, etc.OK, this makes sense and will work. But this is a solution which madesense in the 1970's!Today, I'd say you should use an 8pin PIC or AVR micro. It can monitorone of its ports for the trigger, set another port active for 2 hours, countdown the timeout, then reset its output. Simple. It takes up no morespace than the original 555. Sounds like a perfect application for aPIC10F200. If you pick the 6pin SMD package, it would take up no morespace than a through-hole resistor. Just don't drop it in the carpet :-)Now I'm not one of those CPU nuts who thinks everything can be replacedwith software. There's definitely a time and a place for real hardware orFPGAs, especially in timing critical or safety critical applications. Buta 2 hour timer is clearly within the capabilities of a simple micro.So then the question is, why is this not a proposed solution? Let's lookat a few possibilities.1) High barrier to entryWell, you do have to buy or build a programmer, but the chips themselvesare cheap. But once you have a programmer, you have opened up lots ofother applications to you.2) Reader not expected to be able to do simple firmware developmentI guess this depends on what you consider the audience for your magazine.I find it hard to believe that anyone getting into electronics these dayswouldn't get into at least simple programming of micros. Am I wrong aboutthis? Is there still such a big divide between hardware and software?How can you be into electronics these days and ignore the rise of themicrocontroller?3) Timer needs to work on > 5V (or 3.3V)This isn't stated in the question/answer, but you potentially have morevoltage choices if you stick with the 555 and 4000 CMOS logic. Somemicros today only run at 3.3V or less.4) Answerer is from pre-micro daysDepending on how old the person who wrote the answer is, he mightbe of the generation of jellybean logic and those solutions might comemore naturally. OK, but then should you be writing for a modern magazine?OK, mini-rant done for this morning, thanks for listening!Scott

author: david77
author_rank: Frequent Contributor
timestamp: June 27, 2010, 04:33:34 pm
content: I think you are right, the solution offered is not the most modern.But: Some people have difficulty programming micros, not only do they not have the equipment but also lack the knowledge of how to write the actual code.I myself would probably use the same way. Just cobble something together from the gazillion of 74xx and 40xx that are lying around. I'm one of the people who have trouble writing code, I do have a programmer for most PIC and AVR's but still I suck at software. So seen from that point of view it is easier and quicker to wire up some counter in hardware.Another but: I'm a hobbyist. I don't do this professionally. I imgaine someone who does electronics for a living and has to make money (money=time) out of it would go the other way. That's the professional who's absolutely familiar with his micros and programing languages.I don't know, but I imagine the answer given in the magazine was aimed at a hobbyist. A professional or somewhat advanced hobbyist wouldn't have to ask in the first place.In summary I think the answer given was OK. It doesn't hurt if you understand your basic logic gates and stuff.David

author: Unknown
author_rank: Unknown
timestamp: June 27, 2010, 04:46:20 pm
content: An issue with micro-controllers is that they have more failure modes: you might have a software bug, or a silicon bug involving timers. It's much less likely that a simple CMOS divider has any silicon bugs. The power usage could also be lower for discrete logic (although I doubt that the old 4000 series is). In commercial settings, writing software, programming the micro in production and testing all cost money. But I agree that using a bunch of logic IC's is old fashioned, anything requiring more than a few gates should be replaced by something like a micro or some sort of programmable logic in my opinion.The person writing the answer probably wanted to stay in the same area as the original question. Going from a 555 to CMOS logic is a much smaller step than from a 555 to some tiny micro.

author: slburris
author_rank: Frequent Contributor
timestamp: June 27, 2010, 04:59:35 pm
content: I guess then I would like to have seen a statement something to theeffect that as your expertise grows, you should consider redoingthe timer with just a tiny micro.Maybe I'm expecting too much for a range of ideas to be presented.But how are people going to grow if they aren't exposed to ideasbeyond their current technical level?Scott

author: Zero999
author_rank: Super Contributor
timestamp: June 27, 2010, 05:30:53 pm
content: I would've chosen the CD4060 because it needs no programming and both the oscillator and timer are on the same IC.I'm pretty sure that old CMOS logic as much, or less power than an MCU which is just constructed from a newer form of CMOS.I need to get into PICs, I built a programmer a couple of years ago but I've not managed to get it working for various reasons. I'm tempted to buy a USB programmer but I think I'll give it one more go.

author: Simon
author_rank: Unknown
timestamp: June 27, 2010, 05:47:52 pm
content: I think we are coming to a sad time where nobody will know how to do something unless they use an MCU, this is sad because it means that people will no longer have an understanding of basic electronics and will loose the practicality of design and design tricks. I can say this after comparing something i am trying to replace for a mates can with my yes unfinished version, I have had to implement so many things and even using an MCU has not made it care free because of basic circuit solutions and issues. The original solution ? it was a couple of "relays" with a clever combination of windings, it is so simple but provides such intricate functions as voltage and current control and temperature correction, amazing for a couple of relays, and to replace that I'm not even done yet !

author: Zero999
author_rank: Super Contributor
timestamp: June 27, 2010, 07:54:09 pm
content: Analogue circuits will still need op-amps which requires some knowledge of hardware.MCUs aren't always cheaper, my local supplier sells the CMOS 4060 for much less than any PICs. Fair enough you do need more external components for the 4060 but it's only two resistors and one capacitor but it still works out less than the PIC.http://www.rapidonline.com/sku/Electronic-Components/Integrated-Circuits/Logic/4000-Series-CMOS-logic-family/77018/83-0390http://www.rapidonline.com/Electronic-Components/Integrated-Circuits/PIC-Microcontrollers/PIC12F-PIC16F-8-bit-Microcontrollers/72928

author: Simon
author_rank: Unknown
timestamp: June 27, 2010, 08:07:30 pm
content: yep, there is so much you can do with op amps that a lot of knowlege about what you can do with op amps will be lost to most people s they will implement it in hardware, I could have done my project with a dual op amp and a dual comparator, I did it with an MCU, it was more flexible because i can change software parameters instead of parts

author: EEVblog
author_rank: Unknown
timestamp: June 27, 2010, 08:59:03 pm
content: In addition to all the above, some of the electronics magazines are (or were) very reluctant to offer microcontroller solutions because they took away from the "electronics" aspects of the hobby, and it can take more column space to publish the full solution.i.e. if you present a circuit using junkbox parts then all you need is the schematic and a small explanation and the article is complete and the reader can learn something.But it can be argued a micro solution is not complete unless you publish the full source code in the article, along with operational flow charts, heavily commented, and/or explain how the program works, options for programming the chip etc etc.Dave.

author: Zero999
author_rank: Super Contributor
timestamp: June 27, 2010, 09:35:05 pm
content: Quote from: Simon on June 27, 2010, 08:07:30 pmFrom memory your design didn't need any op-amps, just comparators and only used a couple of op-amps for convenience's sake.Now try to build a circuit which uses a microphone to trigger an event when the sound level exceeds a certain level; amplifying the 10mV signal from the mic to a usable level for an ADC isn't going to happen without an op-amp.I'm often surprised at the ICs I've found inside consumer products, for example, I have an electric foot warmer which has an internal timer. The internal thermal fuse went so I looked at the controller board to see if there was anything wrong there and to my surprise, I found a CD4541 timer and an LM324 quad op-amp.

author: Simon
author_rank: Unknown
timestamp: June 27, 2010, 10:05:17 pm
content: cost often dictates part choices, my design required a differential opamp setup to sense the current in a 0.001 ohm resistor, I replaced that too with a premade high side current sensing chip but the whole thing could have been done with two opamp stages (diff amp + further amplification) and two comparators, onefor current and one for voltage control, it would have meant that I'd have to swap parts instead of update the software.

author: NiHaoMike
author_rank: Super Contributor
timestamp: June 27, 2010, 10:26:18 pm
content: Aren't the modern 4000 logic chips better than the early ones? For simple applications, hard wired logic is often the way to go.If you really want to look at some outdated technology in a modern device, take a look at HVAC. A recent (5 years old or so) A/C I repaired was very simple in terms of electronics. No semiconductors at all in the outdoor unit and the only IC in the indoor unit is a 339 for the fan timer. A few dozen dollars worth of parts for a compressor inverter would no doubt significantly increase efficiency.

author: saturation
author_rank: Super Contributor
timestamp: June 28, 2010, 11:27:46 am
content: A designs if driven by its parameters, unless you specify what you need explicitly you just overdesigning it:What is the accuracy of the clock? What type of pulse?TTM? Is this just a single custom circuit? Can we get it ASAP with whatever tools the designer knows best and has at hand, if you know uC and another is all analog, then speed to finish the prototype determines the winnerDesign for lowest production costDesign for optimum power consumption, line powered, battery ?Design for reliability, form factor, size and weight or MILSPEC abuseetc.,If for example we need a clock to send any pulse width after a timed interval, I'll just buy a preassembled clock, you can get them for $2 delivered from eBay, or save time and go to Chinatown and get one with 'Hello Kitty' on it, with an LCD screen and controls, then modify it, because mass produced it will cost LESS than if I buy all the parts individually and make one. Learning a circuit technique is one thing, making a solution for a client is another.You will likely need to modify the alarm circuit to change the oscillator output to a single shot pulse, but if a pulse train is OK, then you solve the problem.

author: Zero999
author_rank: Super Contributor
timestamp: June 28, 2010, 12:02:30 pm
content: Quote from: saturation on June 28, 2010, 11:27:46 amHow would you do that?An MCU?Or would it be quicker and easier to use a logic IC?Does the clock use two button cells or one? It's hard to tell from a picture, it looks like two but it could be one.I've not seen an MCU which will run down to 1V, although I could be wrong - I admit I don't know much about this.To me, the most sensible option would be to use a low voltage CMOS logic IC to make a monostable which gives a pulse when the alarm sounds.There are plenty of applications where an MCU would be overkill and would expensive, i.e. if you just want alternate flashing LEDs, threre's no point in using an MCU. Sometimes electronics are not needed at all, for example bimetal switches are still pretty common when precise temperature control is not needed.

author: NiHaoMike
author_rank: Super Contributor
timestamp: June 28, 2010, 01:21:25 pm
content: Quote from: Hero999 on June 28, 2010, 12:02:30 pmhttp://atmel.com/dyn/products/product_card_v2.asp?part_id=4523And every cheap calculator has a microcontroller that runs from one 1.5v battery.

author: Zero999
author_rank: Super Contributor
timestamp: June 28, 2010, 01:53:31 pm
content: Quote from: NiHaoMike on June 28, 2010, 01:21:25 pmI've seen that before, it uses a boost converter which is cheating.I've seen plenty of calculators, watches and cheap electronic games which run off 1.5V and don't have a boost converter, they probably don't use an MCU but an ASIC consisting low voltage CMOS gates.

author: saturation
author_rank: Super Contributor
timestamp: June 28, 2010, 07:28:12 pm
content: If you use the Chinese clock I showed, a CMOS quad NOR gate works from 3-18V. I'm not sure the design need is a 2 hour long pulse or a pulse sent after a 2 hour period.For a pulse after 2 hours:Make an RS latch from 2 gates to convert a pulse train from the alarm into a single latched output at Q, fed at S. Tie R & S inputs to ground with a 1Meg Ohm resistor to insure the inputs are initialized 0 on power up.With the last 2 gates make a single shot multivibrator fed by Q. Feed output U2 to the RESET input via a capacitor, and use the RESET input RC time constant to set a delay > 30 seconds, or U2 output will pulse train for ~ the duration of the alarm.Quote from: Hero999 on June 28, 2010, 12:02:30 pm

author: Zero999
author_rank: Super Contributor
timestamp: June 28, 2010, 10:57:36 pm
content: Quote from: saturation on June 28, 2010, 07:28:12 pmYes, that's the kind of thing I would suggest.You need to consider the minimum voltage, for example, if they're two cells a you need a CMOS IC which will work down to 2V so the HC series is best, if you want it to work off a single cell, you need low voltage CMOS gates i.e the 74LV02 which will work down to 1V.http://www.datasheetcatalog.org/datasheet/philips/74lv02.pdf

author: saturation
author_rank: Super Contributor
timestamp: June 28, 2010, 11:09:11 pm
content: Yes, that family is a better choice. As for using a MCU for this, you can do it too, its a question of which is faster to build at the time, and I guess which will fit that clock caseThe PIC family MCU will operate to 2V.Quote from: Hero999 on June 28, 2010, 10:57:36 pm