Author Topic: Generating VPP from USB 5v  (Read 6998 times)

0 Members and 1 Guest are viewing this topic.

Offline tridentsxTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Generating VPP from USB 5v
« on: June 03, 2013, 09:16:59 pm »

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 to
detect 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 it

http://learn.adafruit.com/ice-tube-clock-kit/design

Is 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
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Generating VPP from USB 5v
« Reply #1 on: June 03, 2013, 09:23:35 pm »
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.
« Last Edit: June 03, 2013, 10:58:04 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Generating VPP from USB 5v
« Reply #2 on: June 03, 2013, 09:25:45 pm »
What's with the FPGA? That's serious overkill for a programmer.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline tridentsxTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Generating VPP from USB 5v
« Reply #3 on: June 03, 2013, 09:48:54 pm »

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.8v

I 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
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Generating VPP from USB 5v
« Reply #4 on: June 03, 2013, 10:03:48 pm »
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.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
Re: Generating VPP from USB 5v
« Reply #5 on: June 03, 2013, 10:30:13 pm »
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...
Good enough is the enemy of the best.
 

Offline tridentsxTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Generating VPP from USB 5v
« Reply #6 on: June 03, 2013, 10:42:09 pm »

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
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Generating VPP from USB 5v
« Reply #7 on: June 03, 2013, 10:57:08 pm »
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.

FT230X 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.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline abyrvalg

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: es
Re: Generating VPP from USB 5v
« Reply #8 on: June 03, 2013, 11:28:23 pm »
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)
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: Generating VPP from USB 5v
« Reply #9 on: June 03, 2013, 11:34:06 pm »
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 consumption
of the IC being read / programmed, with a current limiter as well !!
Hello <tap> <tap> .. is this thing on?
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Generating VPP from USB 5v
« Reply #10 on: June 03, 2013, 11:37:29 pm »
I would recommend 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.

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?

Very good point.

Quote
I'd DEFINITELY have at least 1 to monitor power consumption of the IC being read / programmed

Why - 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.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: Generating VPP from USB 5v
« Reply #11 on: June 03, 2013, 11:55:39 pm »
Quote from: c4757p
Why - 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. 
I 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 stored
profile to a "new" chip. IF repairing / updating either, expensive or vital equipment, it's an extra - confidence test.
Hello <tap> <tap> .. is this thing on?
 

Offline tridentsxTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Generating VPP from USB 5v
« Reply #12 on: June 04, 2013, 01:00:14 am »
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.

My intention is to release everything as open source

I 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 of
the 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
 
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: Generating VPP from USB 5v
« Reply #13 on: June 04, 2013, 02:32:00 am »
Well, that sounds GREAT. I'll be interested on how this project progresses.
Hello <tap> <tap> .. is this thing on?
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 672
  • Country: us
Re: Generating VPP from USB 5v
« Reply #14 on: June 04, 2013, 09:12:36 pm »
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.html


They get +16, +3.3,+5V,+2.5V off of USB using a MC34063 for the +16V.
« Last Edit: June 04, 2013, 09:20:43 pm by ptricks »
 

Offline tridentsxTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Generating VPP from USB 5v
« Reply #15 on: June 04, 2013, 09:31:35 pm »

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.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Generating VPP from USB 5v
« Reply #16 on: June 04, 2013, 10:33:51 pm »
One trick you might use with USB power limits
The 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
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 672
  • Country: us
Re: Generating VPP from USB 5v
« Reply #17 on: June 05, 2013, 10:48:19 am »

Thanks, I will buy the issue and have a look, do you know if the schematic is in part one or part two ?

The schematic is in part one.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf