Selectable power voltage - Page 1
Forum section: electronics / general

author: SpacedCowboy
author_rank: Frequent Contributor
timestamp: March 30, 2022, 04:52:27 pm
content: Hi all,So I was hoping to solicit opinions on what the best way to provide one of a number of voltages as the supply voltage to a bunch of level converters...Here's the concern: I want to have an FPGA read a bunch of GPIOs. Those GPIOs are to be plugged into a variety of other boards, some of which have input/output at 1.8v, some at 3.3v and some at 5v .... So the plan was to have level-changers between the GPIO pins and the FPGA, keeping the FPGA side constant, and letting the voltage on the other side be selectable. Icouldmake it a manual process (jumpers to different voltage regulators) but I'dreally liketo make it automatic (let the board supply a given pin with its own voltage, have an ADC sample that, and figure out which of the supplies to use). Something (conceptually, at least) like:Code:┌──────────────────────────────────┬───┐ ┌───────────────┐│ │ │ │ ││ Microcontroller │ADC│◀──────│ Voltage in ││ │ │ │ │└──────────────────────────────────┴───┘ └───────────────┘│ │ │EN│ EN│ EN│▼ ▼ ▼┌─────────┐ ┌─────────┐ ┌─────────┐ ┌───────────────┐│ │ │ │ │ │ │ ││Vreg 1.8 │ │Vreg 3.3 │ │ MOSFET │◀──────┤ +5vdc supply ││ │ │ │ │ │ │ │└─────────┘ └─────────┘ └─────────┘ └───────────────┘│ │ │└─────────────┴──────────────┴──┐│▼┌───────────┐ ┌───┬───────────┬───┐ ┌───────────────┐│ │ │ │ Level │ │ │ ││ FPGA │ ◀────│3V3│ Changer │VIO│◀──────┤ GPIO input ││ │ │ │ │ │ │ │└───────────┘ └───┴───────────┴───┘ └───────────────┘... where the microcontroller selects which of the 3 voltage regulators to enable. I'm more of a software guy, so I'm not sure if just doing that will work, or if the voltage regulator output of the enabled device will feed back into the other two. If that's the case, would adding a transistor (controlled by the microcontroller) after the voltage regulators help isolate them ?It goes without saying that I'd only have one running at a time, and have a "dead" time of a few ms between switching the current one off and starting the requested one.Or is there a fundamentally better way to do thisI did look into an i2C-programmable voltage-regulator to have one supply that I could change the output of, but I'm not finding any which can output a few hundred mA to supply the level-changers between 1.8 and 5v. I also thought of using an analogue mux after the voltage regulators to "choose one", but couldn't find any which could handle the current. It's entirely possible my google-fu sucks, of courseAny advice gratefully received

author: james_s
author_rank: Super Contributor
timestamp: March 30, 2022, 05:28:55 pm
content: A good start might be to look up the schematic of one of the numerous digitally controlled bench power supplies that are out there. Typically they will use a DAC to produce a voltage that is used to control the regulator circuit. It's fairly easy to use a follower transistor to increase the current capability of a linear regulator.

author: Someone
author_rank: Super Contributor
timestamp: March 30, 2022, 10:30:04 pm
content: Quote from: SpacedCowboy on March 30, 2022, 04:52:27 pmWhy not add some modern conveniences and have that schedule a plan change through your cloud platform /sTranslators can be powered directly from the off boards supply, and some translators will happily accept that entire 1.8V to 5V range directly, or add a tracking regulator if they need more current.Why through an ADC -> micro -> DAC chain?

author: SpacedCowboy
author_rank: Frequent Contributor
timestamp: March 30, 2022, 11:16:35 pm
content: Quote from: Someone on March 30, 2022, 10:30:04 pmGenerally, I've found that if it is at all possible for things to be screwed up, they are going to be screwed upMaking it auto-detect the voltage doesn't seemtoomuch of a stretch...Quote from: Someone on March 30, 2022, 10:30:04 pmYep, that's fair. One thing I neglected to mention is that I also want it to be usablewithoutthe user plugging in a "personality" board, so having the ability to just wire up with fly-wires would be a useful 'plus'. In that case, the controlling application would get to set the voltage-levels for the inputs/outputs.Quote from: Someone on March 30, 2022, 10:30:04 pmSee above for the sans-plugin-board reason. Also because the micro is already there for other reasons, and I have spare GPIOs on it, so it's handy, and I hate to see GPIOs go to waste on boards

author: SpacedCowboy
author_rank: Frequent Contributor
timestamp: March 30, 2022, 11:18:42 pm
content: Quote from: james_s on March 30, 2022, 05:28:55 pmThanks, that's a good idea - I'll take a look. I was hoping for something a little less complex, given I don't want such fine-tuning of the voltage, but it certainly bears a good long look

author: james_s
author_rank: Super Contributor
timestamp: March 30, 2022, 11:23:12 pm
content: Well you could look at the schematic for something like the Willem eprom programmer and see what it's doing to select the programming voltage, IIRC it's just connecting different resistors to an adjustable regulator. I bet it would work to take something like a LM317 and use transistors to ground one of a selection of resistors in the bottom of the sense divider.

author: pqass
author_rank: Super Contributor
timestamp: March 31, 2022, 12:15:34 am
content: See attached but using an adjustable LD1117.https://www.digikey.ca/en/products/detail/stmicroelectronics/LD1117ADT-TR/669247Also, you should probably make sure the output is off or at least starts off at the lowest output voltage during power-up. ie. have pullups on all the bases (to select the lowest parallel resistance) then having the MCU force all by one transistor off.

author: Someone
author_rank: Super Contributor
timestamp: March 31, 2022, 01:41:56 am
content: Quote from: SpacedCowboy on March 30, 2022, 11:16:35 pmSo you bias the tracking regulator (amplifier, could be an opamp in voltage follower for many applications) sensing at this external reference pin to your preferred (or programmable) voltage with a high impedance. If the external device plugs in and provides a voltage it takes over.ADC -> DAC is just adding more error/complexity.Sure you can then readout the voltage and have some UI/debug, but its more things to go wrong (possibly damaging things!). Doing it because you can is just adding cost in implementing and cost of goods.

author: SpacedCowboy
author_rank: Frequent Contributor
timestamp: March 31, 2022, 03:20:52 am
content: Quote from: pqass on March 31, 2022, 12:15:34 amOk, that looks fantastic - simple, pretty cheap and the part is even available<--- Important in this day and age!Thank you very much

author: Ian.M
author_rank: Super Contributor
timestamp: March 31, 2022, 06:12:35 am
content: Its worth looking at theLT3080regulator. It uses a single resistor to 'program' its output voltage, (100K per volt), and its output actually tracks its SET pin voltage. Therefore all you need to do is connect its set pin to target Vcc and it will match the target voltage. Switch in various resistors, e.g. 330K for 3.3V, which can simply be done with open drain CMOS outputs, and you can use it without a target Vcc connection. Note that it has a 1mA min. load current, and 1K between target Vcc and SET would be advisable to protect it during fault conditions (which adds a 10mV offset - not an issue), and you'll probably need 100pF to ground right at the set pin for stability with long target Vcc connections.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: April 01, 2022, 02:30:30 am
content: @SpacedCowboy,Rather adjusting the IO voltage, have you considered using an analog comparator with open-collector output to deal with the variable voltage?This is a concept. How fast is the IO that you want to measure?Jay_Diddy_B

author: SpacedCowboy
author_rank: Frequent Contributor
timestamp: April 01, 2022, 03:13:00 pm
content: Quote from: Jay_Diddy_B on April 01, 2022, 02:30:30 amThis is a good idea, but some of the signals are likely to be in the 10's of MHz, possibly(possibly)stretching up to 100MHz, but we'll see how that turns out. At the time of design (since this is supposed to be a generic board) I don't know which signals will be fast and which will be slow, either.