Author Topic: How comes a monostable 555 being more expensive than a 8-pin microcontroller?  (Read 2120 times)

0 Members and 1 Guest are viewing this topic.

Offline technix

  • Super Contributor
  • ***
  • Posts: 3292
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
I am researching the options for a monostable latch, with a delay of a few seconds to a minute. The circuit in question is restricted to through hole components only. I do understand that the usual, cheaper option would be a 555 timer, but the odd thing I found out is that the lone timing capacitor for the 555 can be more expensive than some 8-pin microcontrollers like PIC12F683-I/P or IAP15W105-35I-DIP8, and those microcontrollers are still on the higher end. Now when did capacitors got so expensive, and when did microcontrollers got so cheap?
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 1503
  • Country: mx
For the timing capacitor, I assume that you are talking about a film capacitor. I know that several factories which produced capacitor-grade specialty films have been shutting down, leaving the remaining facilities with the ability to increase the price of the raw material. There was an excellent discussion in another blog which I cannot longer find.

For the second one, you have to thanks (or blame) Moore's law. Silicon chips have literally become dirt cheap.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3292
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
For the second one, you have to thanks (or blame) Moore's law. Silicon chips have literally become dirt cheap.
And along with it brought down the prices of the processor IPs?

The use case required a chain of audio envelope detector - analog comparator - monostable latch (similar to an audio noise gate.) It has occurred to me that if I don't mind a few additional milliamps I can build the entire chain inside that PIC12F683, using the ADC to convert the audio into samples and convert the whole chain into a DSP program. Or if I mind the power draw everything after the analog envelope detector can be absorbed into the PIC (and it stays in sleep mode until the built in analog comparator flipped and triggers an interrupt.)
 

Offline Syntax_Error

  • Regular Contributor
  • *
  • Posts: 204
  • Country: us
I've actually been intrigued by this idea for awhile now: replacing common digital building block chips with low cost micros. I read or watched somewhere (can't remember) detailing the practice of using memory chips like EEPROM as surrogates for various combinational logic such as gates etc including custom functions. It seemed obvious once I saw it, but I hadn't thought of it before.

I know that this is essentially no different than any other form of integration or programmable logic, I had just never considered the specific application of replacing a variety of common logic chips with one or two common-to-all-designs chips (a micro and/or a memory) properly coded. I really like this idea in relation to stocking things to have on hand.
It's perfectly acceptable to not know something in the short term. To continue to not know over the long term is just laziness.
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 3818
  • Country: ca
you need to develop code for them, program them and you need to clock them.
Facebook-free life and Rigol-free shack.
 

Offline Syntax_Error

  • Regular Contributor
  • *
  • Posts: 204
  • Country: us
Yes, true. Pros and cons to everything. And also for many simple applications the internal oscillator will work well enough.
It's perfectly acceptable to not know something in the short term. To continue to not know over the long term is just laziness.
 

Offline NANDBlog

  • Super Contributor
  • ***
  • Posts: 4555
  • Country: nl
  • Current job: ATEX certified product design
you need to develop code for them, program them and you need to clock them.
Yes.

 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3292
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Yes, true. Pros and cons to everything. And also for many simple applications the internal oscillator will work well enough.
My purpose here is simple enough for internal oscillators.

you need to develop code for them, program them and you need to clock them.
Develop the code: should be simple enough if I used a hardware envelope detector. The comparator and the monostable are both built-in peripheral, only some initialization and glue code needed.
Program them: through hole only = DIP chips = socketed chips. Easy enough, not even the ICSP header is needed.
Clock them: internal clock works fine for this.
 

Offline calexanian

  • Super Contributor
  • ***
  • Posts: 1877
  • Country: us
    • Alex-Tronix
555 wan not really made for stable longer timing applications. Variations in the RC circuit will catch up with you particularly with large electrolytic capacitors and high value resistors feeding them. The EX2242 was the preferred solution. It allowed you to use lower value higher stability caps and resistors and included a counter to allow much longer timing at greater stability. I would imagine the 2242 is now considered obsolete. Most modern applications of the 555 do not require a high degree of accuracy and probably have small value components for fast timing so high spec caps and resistors cost very little. a .1uf 16 volt XR7 cap costs a fraction the amount of a 470 uf low leakage timing capacitor. They used to have a special category for timing capacitors back in the day. We used them in our sprinkler timer products. In a tiny micro nowadays you have everything internal and require no external components. for timing and the internal RC oscillator is just as, if not more stable then whatever you could use in the  555 circuit. For cheap things like signal sources for stepping motors where you may have say a .1 us or 1 uf cap and a cheap pot for time control, a sub 10 cent 555 (Just looked at current mouser pricing. 2500+ are sup 10 cents) you would be fine. If you need something accurate, go with a micro. 
Charles Alexanian
Alex-Tronix Control Systems
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 1808
  • Country: ca
The cheap relay timer I bought from china is using a CD4541B. 20c on digikey compared to $1.70 for the PIC in large quantities.
Plus the cost of the timing capacitor of course, but you didn't state which part/tolerance you require for your circuit.

http://www.ti.com/lit/ds/symlink/cd4541b.pdf
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 2568
  • Country: it
i have transitioned from "let's do it with chips because i don't know better" to "let's do it with MCUs because it's more straightforward and i have more flexibility" to "let's do it with chips again so i don't have to program them and i won't be bothered for the firmware in X years"

again, pros and cons with everything
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 30597
  • Country: au
    • EEVblog
Yes, true. Pros and cons to everything. And also for many simple applications the internal oscillator will work well enough.

Then the problem is that the internal oscillator usually isn't quick (4MHz for example) and that limits the speed of the substitute "logic". Even the fastest micros wouldn't be able to match the most simple 74HC logic.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4814
  • Country: gb
Now I’d do it with a PIC because I have the current knowledge, skills and tools set up to do it that way. On solderless breadboard, I can do a blinky in under 10 minutes including programming from scratch.

From about 15 to 40 years ago I would’ve used a 555. In the mid 70s I knew the pinouts, schematics, rule of thumb values and equations off the top of my head. I could’ve breadboarded a 555 in a similar time. Unfortunately, I don't have quite the photographic memory I once had for the 555!

(I replenished my 555 stock about fifteen years ago, but I really don’t think I’ve ever using any of them).
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 5832
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
I don't use low end PICs very much, but the mid to high end ones are capable of clocking up to pretty much their rated operating frequency using the internal oscillator.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 8181
Then there's Microchip's CLC (configurable logic cell), which can handle just about any four input, single output logic function in under 25ns.   There are 8 and 14 pin PICs with four CLCs, and other goodies like a NCO, a 16 bit gated timer, an 8 bit timer that supports various monostable modes and the CWG which can generate complementary outputs with deadtime to prevent H-bridge shoot-through, all in a $0.70 chip.   Once your code sets up the required logic functions it can just spin in an idle loop, leaving the hardware to handle the logic, or it could be reading the ADC and updating timer limits to let you control its timing with a pot or two.   

e.g PIC16F15313 (8 pin) or PIC16F15323 (14 pin)

The only disadvantages compared to dedicated logic, are the price, the limited number of inputs and the limited number of logic cells, which mean you cant implement functions with more than a 4 bit data path or more than 4 data inputs, and the setup time from power-up or reset to when your code has finished configuring the logic.
« Last Edit: August 02, 2018, 12:37:36 am by Ian.M »
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4814
  • Country: gb
Then there's Microchip's CLC (configurable logic cell), which can handle just about any four input, single output logic function in under 25ns.   There are 8 and 14 pin PICs with four CLCs, and other goodies like a NCO, a 16 bit gated timer, an 8 bit timer that supports various monostable modes and the CWG which can generate complementary outputs with deadtime to prevent H-bridge shoot-through, all in a $0.70 chip.   Once your code sets up the required logic functions it can just spin in an idle loop, leaving the hardware to handle the logic, or it could be reading the ADC and updating timer limits to let you control its timing with a pot or two.   

e.g PIC16F15313 (8 pin) or PIC16F15323 (14 pin)

The only disadvantages compared to dedicated logic, are the price, the limited number of inputs and the limited number of logic cells, which mean you cant implement functions with more than a 4 bit data path or more than 4 data inputs, and the setup time from power-up or reset to when your code has finished configuring the logic.

Peripherals like these are precisely what keeps me using the 8 bit devices.

Some other peripherals I've used recently include the PID peripheral (aka "math accelerator") in some PIC16F161x devices for use in a roll-your-own SMPS, and the zero crossing detector in, of all things, an RFID reader. I have a handy handheld device that uses a filtered harmonic of the NCO as a weak VHF signal source.

A couple of weeks ago I needed a 12.288MHz source, and a way to multiplex two tri-statable SPI streams without contention. As jitter and accuracy weren't paramount, I used an 8 pin PIC16F18313 with its NCO for the 12.288MHz source, and the CWG with CLC to do the non-overlapping tri-state controller. Once the peripherals were initialised, the core itself just sat in a loop doing nothing. So, in some scenarios, you can reduce parts count too.

 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 3808
  • Country: us
Quote
you need to develop code for them, program them and you need to clock them.
I never got far with logic chips and the like by the time I decided it would be better to learn to use a microcontroller, even at least learning basic code and making it do simple logic stuff (albeit higher latency).

I figured it would save me from having to stock tons of different logic chips and counters and the like. And from having to relearn the datasheet for each chip every time I used it. But it just ends up being traded for different problems. Now I have dozens of obsolete micros from past projects, which I can't be bothered to use, anymore. And instead of having professional datasheets in 5 seconds of googling, I have to dig through my own archives to find poorly documented spaghetti code. 
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 10478
  • Country: us
  • DavidH
I've actually been intrigued by this idea for awhile now: replacing common digital building block chips with low cost micros. I read or watched somewhere (can't remember) detailing the practice of using memory chips like EEPROM as surrogates for various combinational logic such as gates etc including custom functions. It seemed obvious once I saw it, but I hadn't thought of it before.

Before programmable logic became available, ROMs, PROMs, and EPROMs were sometimes used to do exactly this.  A 4k x 8 asynchronous memory produces any 8 outputs from any 12 inputs.



As far as the original question, packaged IC costs depend on silicon area, pin count, and testing time.  Analog ICs are limited to larger process geometries so they do not benefit from increasing integration.  Microcontrollers do benefit from increasing integration so their performance for a given cost increases followed Moore's Law although for them that ended more than 10 years ago because increasing integration is limited by the need to support floating gate memory like EEPROM and NOR Flash.  Unlike microprocessors and logic, microcontrollers cannot be produced on the most advanced dense processes.  Still, that was enough for the smallest PICs and AVRs to get down to "jelly bean" prices.
 

Offline boB

  • Regular Contributor
  • *
  • Posts: 132
  • Country: us
    • my work www

Could also use something like a Silego (owned by Dialog Semi now) Greenpak device.  They're about 40 cents each but have a pretty fast internal oscillator of around 20 MHz maximum and also plenty of FPGA like logic and some other programmable goodies.  They come from the factory programmed for that price too, I believe.
We are using those for a new project that needed some glue logic.  We're not using the internal oscillator though.  We do actually use a 555 in one of our product PCBs.
I don't know what 555s cost these days.  Thought they were like 10 cents in quantities ?

boB
K7IQ
 

Online AndyC_772

  • Super Contributor
  • ***
  • Posts: 3523
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
I did a job last year which required a couple of comparators, on a tiny PCB which would withstand 125 deg C.

A PIC was the best option commercially. It runs code which programs the I/O registers at power-up, then sits in an endless loop.

It's amazing how tenaciously some people like to hang on to their ideas about how things used to be done. Using a programmed device isn't "cheating", it's simply how this kind of thing is done nowadays. Other than analogue functions (eg. 4052) and specialist I/O, I can't remember the last time I used a 74 series logic chip. The cost is all in the packaging, board space and assembly; what's actually inside that SO14 package really doesn't matter at all. (Add 10p for programming if you really want).

I'm not sure I've *ever* actually used a 555 timer in a commercial product. There's always some little corner of a microcontroller or FPGA available instead.

Offline technix

  • Super Contributor
  • ***
  • Posts: 3292
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog

Could also use something like a Silego (owned by Dialog Semi now) Greenpak device.  They're about 40 cents each but have a pretty fast internal oscillator of around 20 MHz maximum and also plenty of FPGA like logic and some other programmable goodies.  They come from the factory programmed for that price too, I believe.
We are using those for a new project that needed some glue logic.  We're not using the internal oscillator though.  We do actually use a 555 in one of our product PCBs.
I don't know what 555s cost these days.  Thought they were like 10 cents in quantities ?

boB

555's themselves are a cent a dozen here, but the single capacitor required for a 1-minute delay with reasonable reliability draw is the kicker.
 
The following users thanked this post: boB

Offline In Vacuo Veritas

  • Frequent Contributor
  • **
  • !
  • Posts: 319
  • Country: ca
  • I like vacuum tubes. Electrons exist, holes don't.
I did a job last year which required a couple of comparators, on a tiny PCB which would withstand 125 deg C.


Damn was that one of Treez LED drivers?
 
The following users thanked this post: tooki

Online AndyC_772

  • Super Contributor
  • ***
  • Posts: 3523
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
 :-DD

Poor guy, but at least he'll be heading for pastures new soon.

IIRC it was monitoring something on an engine or gearbox. The primary design criterion for many of my boards is the highest ambient temperature they'll withstand before dying.

Offline CopperCone

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • *knock knock*
I did a job last year which required a couple of comparators, on a tiny PCB which would withstand 125 deg C.

A PIC was the best option commercially. It runs code which programs the I/O registers at power-up, then sits in an endless loop.

It's amazing how tenaciously some people like to hang on to their ideas about how things used to be done. Using a programmed device isn't "cheating", it's simply how this kind of thing is done nowadays. Other than analogue functions (eg. 4052) and specialist I/O, I can't remember the last time I used a 74 series logic chip. The cost is all in the packaging, board space and assembly; what's actually inside that SO14 package really doesn't matter at all. (Add 10p for programming if you really want).

I'm not sure I've *ever* actually used a 555 timer in a commercial product. There's always some little corner of a microcontroller or FPGA available instead.

I think that leads to people bitching that the code is difficult to change, so you get trapped. In a company that means more people, mandatory debugging, firmware complications/strains forming due to product line modifications,, it can turn into a real night mare as I saw when you have too many firmware strains and you wanna do a migration. I saw little changes causing the main control function of the device going crazy before (on cramped code where in my opinion a single MCU was doing too much).

And the failure modes of a MCU are greater (soft fails) then any hard logic like a 555.
« Last Edit: August 02, 2018, 07:05:19 pm by CopperCone »
 

Online AndyC_772

  • Super Contributor
  • ***
  • Posts: 3523
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
It's just a different way of thinking. That particular PIC *is* a dual comparator.

Don't think of it as a programmed device at all; just think of it as a compact, high temperature device, a bit like an LM293 but with a longer part number.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf