Which way to put diode and will it work? multi-output single input... - Page 1
Forum section: electronics / beginners

author: aries1470
author_rank: Regular Contributor
timestamp: April 04, 2020, 10:40:02 am
content: Hello everyone,I would like to know if the below will work, and which way the diodes will need to face, so only one option /output will be active low at a time.It will be for selecting different resistor values, but only one can be applicable at any one time, but the input needs the resistor tied to ground, while the 4017 is active high, but I need an active low, unless there's another IC available.So I have used an inverter, of which is great, but I can't have the other values going high, as that will cause damage to the charging IC. IC shown is indicative only, all charging IC ILimresistors need to be connected to ground.I have made most of the schematic, and yes, I know the R values are all the same, it's for illustration purpose, I just wanted to know if adding the diodes will work, as I don't want to use a uC and digi-pot.I am attaching an image of the schematic for reference.Thank you.

author: vk6zgo
author_rank: Super Contributor
timestamp: April 04, 2020, 12:50:01 pm
content: Quote from: aries1470 on April 04, 2020, 10:40:02 amI don't think the diodes will work as shown, because ifanyof the outputs are high, that will turn the associated diode on, & put a high on pin (5) of IC6.I'm wondering about "the other way round", (reversing the diodes), so that only the low outputs will turn the diodes on .I think to make that work, though, you would have to hold pin (5) of IC6 high by default, & rely on the previous IC outputs having the capability to sink current through the resistors.I built something similar, but more complex, 30+ years ago, but had to switch components in an existing device, (a commercially made "Wein bridge" oscillator), so ended up using 4066 switches.With them, you would have isolation between the control signals & the actual resistor selection part of the circuit.A problem I found with the 4066s I had, was that returning their control pins to zero volts did not completely turn them off, so if you end up having a package with a bunch of unused sections, they can get quite warm.There was probably a way around this, but I was under time constraints, so I just provided a separate negative supply to turn them off "hard".Another possiblity is to use optocouplers.In both the latter options, you could dispense with the inverter.I found that it is often easier to visualise what will happen with a circuit if you build a real version, (rough as you like), of the particular section, hit it with the appropriate signals, & see if it behaves as you expected.

author: iMo
author_rank: Super Contributor
timestamp: April 04, 2020, 01:19:23 pm
content: What is the R4-R13 range?Btw, you should also add some resistors in series with the LEDs..

author: AVGresponding
author_rank: Super Contributor
timestamp: April 04, 2020, 01:33:55 pm
content: Might it not be simpler to use something like a transistor array on the output? Something like a ULN2003 could be used to pull down the PROG pin using different resistors, and would remove the need for external diodes.

author: aries1470
author_rank: Regular Contributor
timestamp: April 05, 2020, 07:41:05 am
content: Quote from: imo on April 04, 2020, 01:19:23 pmOnly need a single resistor for the led's as only one will be on at any given time ;-)The range for the resistors will vary for the output, as I was going to use the same design for this I.C. from 50mA to 500mA, but also for another i.c. that has 2A capabilities :-)That is why I mentioned that about the resistors, that they are there mostly to show than anything else.

author: aries1470
author_rank: Regular Contributor
timestamp: April 05, 2020, 07:43:39 am
content: Quote from: AVGresponding on April 04, 2020, 01:33:55 pmI was trying to find another counter I.C., but instead of going positive, to be going negative, that is why I used the inverter, and wanted to keep the design simple and easy for service, instead of using a uC with digipot that would be easier to implement, but would need programing. That is why I tried to do it this way.Thank you for the suggestion.

author: aries1470
author_rank: Regular Contributor
timestamp: April 05, 2020, 07:51:45 am
content: Quote from: vk6zgo on April 04, 2020, 12:50:01 pmThank you for your feedback.I guess it would have been nice and simple if there was a 4017 equivalant but instead of the output going high, to be going low, but did not find anything similarThat is why I did it the way I wanted, and wanted something simple to be easily replaced if something failed instead of having to change a uC with a digipot of which would save on space, but wanted the convinience of using LED's instead of an LCD. That was to be used for a more advanced version with 50mA increments but for a larger 2A charging I.C.So, if anyone is aware of an active LOW 10 Decimal counter similar to the 4017, even in the 74 series, I am all ears and eyes.

author: Ian.M
author_rank: Super Contributor
timestamp: April 05, 2020, 08:21:08 am
content: Quote from: aries1470 on April 05, 2020, 07:51:45 amIt wouldn't help, as you need a decoded counter with open drain NMOS outputs, which is almost certainly pure unobtanium. You can't have push-pull outputs, otherwise the high outputs driving their own resistors will conflict with the low one, probably causing the MCP73831 to go into shutdown mode, and you cant use diodes because their Vf will unpredictably lower the programmed current. Similarly BJT outputs are extremely undesirable because of the effect of their Vce(sat) on the programmed current.N.B. the 74LVC1G04 you have is unsuitable - it has a push-pull output. You'd be better off replacing it (and the 74HC9114) with a pair of 74HC05 hex open drain inverters with the two spare gate inputs tied high.A MCU isn't such a bad idea from a serviceability viewpoint if you use an AVR supported by the Arduino IDE and make your code open source, published on a reputable repository. With enough I/O pins, you can 'fake' open drain outputs in software if you want to avoid using a digipot, and drive up to 12 charliplexed LEDs from only four more I/O pins.

author: aries1470
author_rank: Regular Contributor
timestamp: April 05, 2020, 02:42:47 pm
content: @vk6zgoThank you for reminding me of the 4066's.I have found more modern equivalants and some of the same vintage, i.e.MAX313that woud be suitable using two of them plus a twin pack, like theTMUX1121, of which are cheaper too if I use 5 of them.not to mention less current and Low on-resistance.So now, instead of the 74HC9114D, there will be 5x tmux1121. So that technically should work, correct?Does anyone see any problems using this combination?Thank you.