Help on how to choose an IC for a project - Page 1
Forum section: electronics / beginners

author: Megeanu
author_rank: Newbie
timestamp: June 16, 2020, 09:03:34 am
content: Hello everyone,First of all I am a newbie when it comes to electronics. I tried my luck in some very simple electronics projects, but those were just a matter of assembly more than designing it.After watching lots of Dave's videos purely driven by curiosity, I have decided to finally start my own project and help my nephew to finish his board game.While I understand most of the passive electronics components, I struggle on how to choose and find some ICs that would help my ideas into becoming real projects.My question is How should a noob like me learn how to choose simple ICs and is there a database with all sorts of chips size, form factor, functionality or complexity?For example, I want to create a simple soft latching circuit to turn on and off an LED using a coin battery as a power source.I have watched Dave's #262 video but I was aiming to use a very simple IC switch and a push button in order to make the circuit as small as physically possible.This is where I ask for your help. I searched on google for quite some time, but I only got more confused. What kind of SMD switching chip should I use for this simple project? What would be your choice and why? Maybe after reading your proposals things will get a bit clearer for meUntil then, Thank you in advance for your answers and all of you have a good day!

author: Vovk_Z
author_rank: Super Contributor
timestamp: June 16, 2020, 09:43:17 am
content: Turn on and off task may not meed an IC. But if you want IC, I think you may find something you need with NE555 timer.

author: SmokedComponent
author_rank: Regular Contributor
timestamp: June 16, 2020, 10:13:33 am
content: Quote from: Megeanu on June 16, 2020, 09:03:34 amCD4093 (quad schmitt-trigger NAND) sounds nice for the job. Or 74HC4093 for 3V coin cell battery.

author: eblc1388
author_rank: Frequent Contributor
timestamp: June 16, 2020, 10:21:23 am
content: Your project requirement dictates what you can or cannot use to build it.1. Coin cell, 3V nominal, ==> your circuit must works down to about 2V2. Coin cell, limited power capacity, ==> circuit should draw minimal current(ideally zero current) when LED off3. The IC chip output should drive a few mAs, for lighting the LED4. As small as possibleBased on these requirement, I would suggest a toggle latch formed from two inverter gates of a 74HC04, with two resistors and a capacitor, excluding the push button. If you use SMD parts, the overall size can be very small and the design satisfies all remaining constraints.

author: SmokedComponent
author_rank: Regular Contributor
timestamp: June 16, 2020, 10:29:16 am
content: If you really want next to zero power consumption when turned off, you will have to employ a discrete transistor (BJT or MOSFET) to do the power switching (including power to the IC).

author: Ian.M
author_rank: Super Contributor
timestamp: June 16, 2020, 10:59:37 am
content: A NE555 timer would be the worst possible choice for this application (low voltage latching electronic power switch). Its minimum Vcc voltage is 4.5V, and it will drain several mA from the battery all the time. Also, it would need a rather complex circuit to get a single button toggle action as its far better suited to seperate On and Off buttons.A CMOS '555' timer clone (e.g. S.T's TS555) would solve the high minimum operating voltage problem and reduce the quiescent drain to under 200uA, but that's still a bit high for reasonable life from a coin cell, and it doesn't help simplify the single button toggle circuit. No CMOS '555' clone will do any better as to implement '555' compatible functionality they need an internal resistive divider to provide the 1/3 and 2/3 Vcc reference voltages for its Trigger and Threshold comparators, and allow those thresholds to be modulated by the Control voltage input.Probably the physically easiest way for a hobbyist to make a very small latching power switch circuit would be with a low pin count CMOS MCU that can run over the whole battery voltage range, and an external MOSFET. The MCU handles the toggling action, and provides the pullup resistor for the button and also robust push-pull driver to the MOSFET, so no extra components (except possibly a decoupling cap) would be required. Choose any MOSFET with a suitable current and Rds_on rating and a max. Vgs threshold voltage less than half the battery voltage. It would be hard to do better without a dedicated soft power switch IC, which may be difficult for a hobbyist to find and obtain in small quantities. Which MCU to choose depends on which (hardware) programming tools you already have, or can very cheaply and easily obtain. Of course, if you have near-zero aptitude for programming, *ANY* MCU is a bad choice.Ebcl1388's solution can be refined a bit by using specialist low gate count logic to shrink the physical size. e.g.74LVC2G04Quote from: SmokedComponent on June 16, 2020, 10:29:16 amEven a discrete transistor will have a non-zero leakage current. It all comes down to how much quiescent current you can tolerate. A good rule of thumb is the quiescent current in uA should be less than the battery capacity in mAH divided by 100, which means it uses approx 9% of the battery capacity per year when off. That's good enough that you can forget it in a draw for >50% of the battery shelf life, and it will still have a reasonable amount of charge left.Incidentally the 74LVC2G04 I just suggested has a typical quiescent current of only 0.1uA. Worst case is 4uA, but you can bet that's at its max. supply voltage of 5.5V and temperature of 125 deg, so the odds are very much in your favour that it will be under 2uA, and probably under 1uA when running from a coin cell at reasonable ambient temperatures.Of course a *GOOD* reason to use an external MOSFET is if you need more current than the logic chip can reasonably provide. That may have to be determined experimentally unless you can find a datasheet with comprehensive output voltage vs current graphs. If you go with Ebcl1388's original 74HC04 solution, you could put five gates in parallel for a five times higher output current capability.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 16, 2020, 01:21:51 pm
content: Don't overlook the simplest solution, no circuit at all!There may not be enough selection in push-on-push-off switches for the shape and size you're looking for, but it might be worth a look anyway.If using logic gates, keep in mind the switch needs to be debounced. When closed (and sometimes when opened too), the contacts make and break multiple times within a few milliseconds. Debouncing usually just amounts to using a resistor and capacitor to filter the action. (If eblc's intended circuit does what I think it does, this is effectively done by the resistors and capacitors in it. Just a matter of using the right values.)Tim

author: eblc1388
author_rank: Frequent Contributor
timestamp: June 16, 2020, 02:08:17 pm
content: Quote from: T3sl4co1l on June 16, 2020, 01:21:51 pmThe capacitor forms a temporary memory to enable the inverters to change state. Contact bounce does not affect the operation of the circuit.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 16, 2020, 02:42:55 pm
content: If that were true, it wouldn't work at all! The key is as I said, using a large enough time constant -- 100k into 0.1uF is more than adequate.Tim

author: eblc1388
author_rank: Frequent Contributor
timestamp: June 16, 2020, 03:05:53 pm
content: The two inverter takes a total of less than 200ns to settle into the new bi-stable state.Does any contact bounce happens within such short time interval?

author: Ian.M
author_rank: Super Contributor
timestamp: June 16, 2020, 03:30:21 pm
content: The time constant must be sufficient for any bounce not to be seen as separate switching events and the ratio of the timing resistor to the positive feedback resistor must be great enough for the first inverter input to remain at a valid logic level if the switch is held down. LTspice sim attached.

author: Vovk_Z
author_rank: Super Contributor
timestamp: June 16, 2020, 11:34:26 pm
content: Quote from: Ian.M on June 16, 2020, 10:59:37 amYou are totally right, that's my fault (I worked with 555 a very long time ago).

author: Ian.M
author_rank: Super Contributor
timestamp: June 17, 2020, 12:47:57 am
content: Don't beat yourself up over it!A '555' timer is a reasonable choice if you are switching 12V from a wallwart. I've even suggested something similar back in 2016:https://www.eevblog.com/forum/beginners/on-and-off-power-switching-circuit/msg1036270/#msg1036270although I did suggest using a CMOS 555. Due to that thread's requirement to mount the switches several meters from the circuit, noise pickup would have made many of the 'classic' low power latching switch circuits unreliable, and one also had to comply with a current limit even during fault conditions to make the wiring intrinsically safe.

author: eblc1388
author_rank: Frequent Contributor
timestamp: June 17, 2020, 01:09:45 am
content: Your LTspice simulation is always inspiring.I added similar contact bouncing at the closure of the switch too, where the inverter state changing occurs and changed the two Schmitt triggered inverters into normal inverters to reveal the circuit does not rely on Schmitt triggered input characteristic to combat contact boucing.

author: Ian.M
author_rank: Super Contributor
timestamp: June 17, 2020, 02:05:23 am
content: Be careful with LTspice's digital gate primitives. If you don't specify a suitable per-instancetripdtthey can give totally misleading results ignoring other time related parameters! Seehttps://www.eevblog.com/forum/projects/ltspice-gate-parameters/You may want to try a more realistic gate model. Philips have a transistor level one for their 74HCU04:Code:* A hopefully real transistor level based model of the 74HCU04. The model* comes directly from philips. http://www.philipslogic.com/support/spice/* This a unbuffered inverter which is often used in LC or crystal oscillators.* Inverter, unbuffered* Original Philips model used..SUBCKT 74HCU04 A Y VCC VGND vcc1={vcc} speed1={speed} tripdt1={tripdt}*Rin A A1 200*Cin A1 VGND 3p*XAY A1 Y VCC VGND 74HC04_INV0XAY A Y VCC VGND 74HC04_INV0.ends**.SUBCKT 74HC04_INV0 2 3 80 90*IN=2, OUT=3, VCC=80, GND=90XINP 20 25 50 60 74HC_INP0NXOUTP 25 30 50 60 74HC_OUTPNL1 80 50 6.87NHL2 60 90 6.87NHL3 2 20 5.97NHL4 30 3 5.97NHC1 50 90 1.5PC2 60 90 1.5PC3 20 90 1.5PC4 3 90 1.5P.ENDS*.SUBCKT 74HC_INP0N 2 3 50 60*IN=2, OUT=3, VCC=50, GND=60R1 2 3 100MP1 3 50 50 50 MHCPEN W=20U L=2.4U AD=100P AS=100P PD=40U PS= 20UMN1 3 60 60 60 MHCNEN W=35U L=2.4U AD=260P AS=260P PD=70U PS= 20U.ENDS*.SUBCKT 74HC_OUTPN 2 3 50 60*IN=2, OUT=3, VCC=50, GND=60R1 2 4 100MP1 3 4 50 50 MHCPEN W=360U L=2.4U AD=400P AS=400P PD=10U PS=180UMN1 3 4 60 60 MHCNEN W=140U L=2.4U AD=200P AS=300P PD=10U PS=130UR2 4 5 50MP2 3 5 50 50 MHCPEN W=360U L=2.4U AD=400P AS=400P PD=10U PS=180UMN2 3 5 60 60 MHCNEN W=140U L=2.4U AD=200P AS=200P PD=10U PS=130UR3 5 6 50MP3 3 6 50 50 MHCPEN W=360U L=2.4U AD=400P AS=400P PD=10U PS=180UMN3 3 6 60 60 MHCNEN W=140U L=2.4U AD=200P AS=200P PD=10U PS=130U.ENDS************************************************* NOMINAL N-Channel Transistor ** UCB-3 Parameter Set ** HIGH-SPEED CMOS Logic Family ** 10-Jan.-1995 *************************************************.Model MHCNEN NMOS (+LEVEL = 3+KP = 45.3E-6+VTO = 0.72+TOX = 51.5E-9+NSUB = 2.8E15+GAMMA = 0.94+PHI = 0.65+VMAX = 150E3+RS = 40+RD = 40+XJ = 0.11E-6+LD = 0.52E-6+DELTA = 0.315+THETA = 0.054+ETA = 0.025+KAPPA = 0.0+WD = 0.0 )************************************************ NOMINAL P-Channel transistor ** UCB-3 Parameter Set ** HIGH-SPEED CMOS Logic Family ** 10-Jan.-1995 ************************************************.Model MHCPEN PMOS (+LEVEL = 3+KP = 22.1E-6+VTO = -0.71+TOX = 51.5E-9+NSUB = 3.3E16+GAMMA = 0.92+PHI = 0.65+VMAX = 970E3+RS = 80+RD = 80+XJ = 0.63E-6+LD = 0.23E-6+DELTA = 2.24+THETA = 0.108+ETA = 0.322+KAPPA = 0.0+WD = 0.0 )

author: eblc1388
author_rank: Frequent Contributor
timestamp: June 17, 2020, 02:50:04 am
content: Quote from: Ian.M on June 17, 2020, 02:05:23 amHow do I add the triptd parameter to each gate instance? Adding it resulted in "Unknown Parameter" error.

author: Ian.M
author_rank: Super Contributor
timestamp: June 17, 2020, 03:19:55 am
content: Errr.... its spelttripdtnot triptd!

author: eblc1388
author_rank: Frequent Contributor
timestamp: June 17, 2020, 04:31:30 am
content: The tripdt is the correct one. But I saw that you subsequently changed it in the quoted link above Reply#3 so I just follow along.

author: Ian.M
author_rank: Super Contributor
timestamp: June 17, 2020, 05:03:01 am
content: Looks like *I* need this correction in the topic I linked:Quote from: Ian.M on June 17, 2020, 03:19:55 amMy dyslexia strikes again.Thank you for drawing it to my attention.Per-instancetripdtis documented underA. Special Functionsin the help file, but its not obvious as its buried in the body text, not in the table, (which only includes parameters directly affecting the gates output characteristics).

author: SL4P
author_rank: Super Contributor
timestamp: June 19, 2020, 05:50:11 am
content: The OP is an interesting question...For example, I was lucky enough to start learning around the time the first generic ICs were being released.In those days we had thick paper data books that we could pore over for hours, and go back daily, weekly, until I had a vague understanding of most basic elements.My fundamental electronics understanding came from a childhood hobby (batteries, bulbs, switches, crystal sets etc.), and then working in an industry with fabulous high-end equipment and technical manuals. Just browsing & reading, you begin to see patterns and repetitive blocks.The next step was simple amplifier kits and so on, followed by TTL logic.Microprocessors, then a few years working in the computer hardware industry.Software and field support for well known companies... and it just kept going.Because electronics is inside everything nowadays, and often just an unknown black chip.... You need to figure out which direction you’re planning to go (for now)Study and understand - then you can choose what you want to learn.If you’re into microcontrollers, it’s hard to go past things like the Arduino, because they introduce you to the bare bones but give you a lot of tools to play with.Don’t be tempted to start with bigger (Pi) boards or PC programming etc, because you’re getting too far away from the actual electronics and learning how the bits go together.

author: ebclr
author_rank: Super Contributor
timestamp: June 19, 2020, 07:52:14 am
content: One very cool IC to play around is CD40106 or 74HCt14 you can do a lot of thing with this ic, and some diodes, resistor, and capacitorsThings Like oscillator, timers, PWM, sequencer, It's a cool play for newbies

author: exe
author_rank: Unknown
timestamp: June 19, 2020, 01:04:57 pm
content: There are cmos versions of 555 that work down to quite some voltage, likehttps://www.ti.com/lit/ds/symlink/lmc555.pdf.

author: Ian.M
author_rank: Super Contributor
timestamp: July 22, 2020, 05:47:04 am
content: Discussion of Eblc1388's inverter latch circuit and further sims continue here:https://www.eevblog.com/forum/beginners/going-slightly-mad-simple-tristate-buffer-not-properly-driving-output/msg3148998/#msg3148998

author: Zero999
author_rank: Super Contributor
timestamp: July 22, 2020, 07:52:58 am
content: Quote from: T3sl4co1l on June 16, 2020, 02:42:55 pmQuote from: eblc1388 on June 16, 2020, 03:05:53 pmHe's right. In order for the circuit to work, the RC time constant needs to be much longer, than the switch bounce time. If you reduce the capacitor to 100pF you'll find it'll change state, as the switch bounces.