Generating VPP from USB 5v - Page 1
Forum section: electronics / beginners

author: tridentsx
author_rank: Regular Contributor
timestamp: June 03, 2013, 09:16:59 pm
content: I am trying to design an universal programmer, one of the design objectives I have is to generate the VPP from USB 5v supply.The VPP rail needs to be s/w programmable from 5v - 25v in at least 0.2v steps. I need to monitor the rail for current draw todetect broken or incorrectly inserted devies.Where would you start ? What type of current draw is to be expected from a device thats being programmed ?I have looked at the following circuit and started prototyping using ithttp://learn.adafruit.com/ice-tube-clock-kit/designIs this a good starting point ? are there other alternatives ?I also have looked at the INA226 chip to monitor the rail, is this a good choice ?I have attached a block diagram of the prototype I building. I am very new to electronics so any constructive feedback is appriciated.Regards /// Carl

author: c4757p
author_rank: Super Contributor
timestamp: June 03, 2013, 09:23:35 pm
content: The easiest way, I think, is going to be a boost converter putting out 27V, then a linear regulator like LM317 or LM1117. You can drive the 'adjust' pin using an op amp; it'll put out 1.25V more than whatever you put in. The op amp can be controlled with a PWM DAC (just a PWM output from a microcontroller into a steep RC low pass filter). It's a bit trickier to make the boost converter programmable, but you don't need to. The device will most likely draw no more than 1mA (usually much less), so the amount of heat dissipated in the linear regulator is on the order of "who cares?".TFYP: The voltage divider setting the output voltage usually serves as the 10mA minimum load on LM317. LM1117 has a minimum load of 5mA. If you're driving it with an op amp instead of using a voltage divider you'll need to put a resistor on the output to serve as the minimum load, or else it won't regulate correctly.Hell, at that output current you could use the op amp output directly.I wouldn't bother with a true rail monitor. You don't need to know how much current is being drawn. Just include a current limiter (you can do this with two transistors or so), programmable if you like, set to 2mA or similar, and some feedback into the MCU indicating whether it is actively limiting.You don't even need a boost converter controller chip, since you're just feeding a linear regulator; you can drive a logic level MOSFET or an NPN transistor directly from the microcontroller.

author: c4757p
author_rank: Super Contributor
timestamp: June 03, 2013, 09:25:45 pm
content: What's with the FPGA? That's serious overkill for a programmer.

author: tridentsx
author_rank: Regular Contributor
timestamp: June 03, 2013, 09:48:54 pm
content: Its there for two reasons,1) Adress and data multiplexing to support any device pin out without having to do a lot of software hacks in the MCU.2) VCC level conversion, some FPGA has support of multiple IO banks where the bank facing the MCU could be set to 3.3 volts and the bank facing the device to be programmed can be set to mathc the required VCC level of the device. However my recent thinking is to use 1.8 v logic on the FPGA facing the device to be programmed and together with external voltage translation that converts a progtrammable VCC 1.8v - 6v to 1.8vI dont know any real universal programmer that doesnt use an FPGA/CPLD, I have however played with the thought of using a softcore in the FPGA to replace the MCU but that probably requires a lot more FPGA knowledge than I possess at the moment.Regards /// CF

author: c4757p
author_rank: Super Contributor
timestamp: June 03, 2013, 10:03:48 pm
content: Many microcontrollers can run anywhere from 1.8 to 5V. Just change the whole VCC rail of the programmer to whatever the DUT requires. And just use one of the big 100-144 pin MCUs and you can run one MCU pin to each DUT pin and still have many left over for other tasks. Much less expensive than an FPGA.

author: hlavac
author_rank: Frequent Contributor
timestamp: June 03, 2013, 10:30:13 pm
content: Only the prohibitively expensive (aka export controlled "military technology") fpgas support dynamic reconfiguration, so I think you will not be able to have both softcore and configurable output levels...

author: tridentsx
author_rank: Regular Contributor
timestamp: June 03, 2013, 10:42:09 pm
content: Isn't the voltage for the FPGA I/O bank configured with the bit file loaded to the FPGA ? Couldnt I load different bit files for devices that requires different voltages. I would have to do that anyways to reporgram the multplex so that the address pins and data pins matches between my MCU and the device to be programmed.I have spent a good hour now trying to find a 32 bit MCU with 1.8 to 5.5 v IO and USB interface. Ihaven't found anything. If you have a suggestion please provide it.Thanks Carl

author: c4757p
author_rank: Super Contributor
timestamp: June 03, 2013, 10:57:08 pm
content: Quote from: tridentsx on June 03, 2013, 10:42:09 pmFT230X USB-UART opens up the range of MCUs you can use to anything with enough pins, the right voltage range and enough RAM (so hundreds of them). $2 for the USB interface chip plus $4-6 for the MCU equals still much less than an FPGA, and packed with peripherals like an ADC that you may find useful and that the FPGA will not have.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: June 03, 2013, 11:28:23 pm
content: Time ago I did a major reverse engineering of my UP-1024P (http://www.up48.com/english_site/), so maybe this info will help somehow: main parts are Cypress FX2 (USB 2.0 HS data path), 2x Xilinx Spartan-2 driving/sensing "io" type pins and a sandwich of boards containing 3x256 transistors switching any of 256 pins to GND/Vcc/Vpp. The switchers are accessed by FX2 via 4 long shift registers (loaded once after each device type change), FPGAs are connected in slave parallel mode to FX2's fifo port (reset and configure after device type change). There are 2 programmable voltage sources - Vcc and Vpp, both consisting of a boost, linear regulator and op amp driven by PWMs implemented in a small cool runner cpld. I can find more details in my work archive tomorrow.The major advantage of FPGA over high pin count MCU is speed (linear decreasing with pin count increasing for MCU and not depending on pin count at all for FPGA)

author: digsys
author_rank: Unknown
timestamp: June 03, 2013, 11:34:06 pm
content: This subject has come up before in these forums, and the sticking point was - are you going to write the 1,000s of profiles yourself?There are cheap() programmers out there, some have even been hacked. Or is this a learning thing? in which case .. wish you well !!I use the INAxxx chips in many designs, even dedicated programmers. I'd DEFINITELY have at least 1 to monitor power consumptionof the IC being read / programmed, with a current limiter as well !!

author: c4757p
author_rank: Super Contributor
timestamp: June 03, 2013, 11:37:29 pm
content: Iwouldrecommend an FPGA-based solution for a 256-pin device - a 256-pin programmer is definitely non-trivial. Exactly how complex do you plan on making this? An MCU could easily handle a DIP-40 ZIF socket or something, but things are going to get complicated if you want 256 outputs.Quote from: digsys on June 03, 2013, 11:34:06 pmVery good point.QuoteWhy - what would you do with this information? I can't really imagine why a simple current limiter wouldn't be enough, and it's also easy to have just a digital input to the MCU saying the current limit has activated so it can shut down and complain.

author: digsys
author_rank: Unknown
timestamp: June 03, 2013, 11:55:39 pm
content: Quote from: c4757pI run a CURRENT profile of each IC that goes in for reading / programming. I've picked up MANY sus chips in my time from comparing the storedprofile to a "new" chip. IF repairing / updating either, expensive or vital equipment, it's an extra - confidence test.

author: tridentsx
author_rank: Regular Contributor
timestamp: June 04, 2013, 01:00:14 am
content: Quote from: digsys on June 03, 2013, 11:34:06 pmMy intention is to release everything as open sourceI also aim to make the h/w flexible enough so supporting new chips can be done by a s/w engineer. I don't intend to write 1000's of verilog programs to support every chip out there.My thinking is to write drivers for JTAG/SPI/I2C etc .. and a verilog file for each of those serial interfaces where I in s/w in the MCU can define which pin of the interface is connected to what pin on socket,I also intend to write some basic driver for some of the chips that I use the most and document it very very well. That way its easy for someone to add support for new devices.Its a learning exercise but its also a way to make sure that devices can be read in the future, I don;'t expect that twenty years down the line there will be programmers readily available that can read some ofthe old proms I have in for example my arcade collection.I already have a lot of cheap programmers all of them non functional either due to the buss standard is not available on new computers, for example ISA interface or new O/S is not supported by the S/W.Another issue is Linux/OSX support.Regards /// Carl

author: digsys
author_rank: Unknown
timestamp: June 04, 2013, 02:32:00 am
content: Well, that sounds GREAT. I'll be interested on how this project progresses.

author: ptricks
author_rank: Frequent Contributor
timestamp: June 04, 2013, 09:12:36 pm
content: EPE has a universal programmer for PIC and AVR starting in the may/2013 issue. May want to look at how they conquered some of the issues.Hint: lots of fets !http://www.epemag3.com/proj/0513.htmlThey get +16, +3.3,+5V,+2.5V off of USB using a MC34063 for the +16V.

author: tridentsx
author_rank: Regular Contributor
timestamp: June 04, 2013, 09:31:35 pm
content: Thanks, I will buy the issue and have a look, do you know if the schematic is in part one or part two ?For now I have started prototyping the s/w in c++ and Qt5.0 framework, it should be easily portable between platforms.

author: C
author_rank: Super Contributor
timestamp: June 04, 2013, 10:33:51 pm
content: One trick you might use with USB power limitsThe time spent programming will probably very short compared to the time the device is connected connected to USB. Draw a safe amount of current from USB and boost it to a higher voltage storage cap.C

author: ptricks
author_rank: Frequent Contributor
timestamp: June 05, 2013, 10:48:19 am
content: Quote from: tridentsx on June 04, 2013, 09:31:35 pmThe schematic is in part one.