Skip to main content
Topic: PicProgrammer v2 for BusPirate v4 Development (Read 38400 times) previous topic - next topic

PicProgrammer v2 for BusPirate v4 Development

For the SMPS - the goal would be 3.3volts to ~18volts output, maybe clamped at 24volts? The idea is an adjustable output for different PIC/AVR/EEPROM programming voltages. Also handy if you need an inconvenient bias voltage for some reason :)
Got a question? Please ask in the forum for the fastest answers.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #1
Can't we do with 5V USB input? Also what do you think about current requirements?

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #2
[quote author="tayken"]Can't we do with 5V USB input? Also what do you think about current requirements?[/quote]
USB delivers at least 4.01 V, guaranteed, and that voltage should be enough to generate any voltage using an inductor and switching boost regulator. Problem is that the power would be limited to well under 2.5 W, but I guess that's understood.

I wonder whether a DAC output could be mixed in the feedback loop of a boost regulator to allow PIC control of boost output voltage. There should be an example circuit somewhere...

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #3
I assumed 3.3v so we could get the widest range of values, including 3.3-5v. Indeed, it is only intended to be a programming voltage (pic uses 1uA or something small of 9-13v), bias voltage, or reference, not a serious current source.
Got a question? Please ask in the forum for the fastest answers.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #4
[quote author="ian"]it is only intended to be a programming voltage (pic uses 1uA or something small of 9-13v), bias voltage, or reference, not a serious current source.[/quote]
I assume you mean that the programmed part is not a serious current load, or current sink, right?

I don't think that a 9 V to 13 V "reference" would be appropriate (overkill?), but a regulator or any other voltage should be adequate.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #5
[quote author="rsdio"][quote author="tayken"]Can't we do with 5V USB input? Also what do you think about current requirements?[/quote]
USB delivers at least 4.01 V, guaranteed, and that voltage should be enough to generate any voltage using an inductor and switching boost regulator. Problem is that the power would be limited to well under 2.5 W, but I guess that's understood.

I wonder whether a DAC output could be mixed in the feedback loop of a boost regulator to allow PIC control of boost output voltage. There should be an example circuit somewhere...[/quote]
OK, so lets assume input voltage between 4-5V, am I right? Lets say current draw will be 1uA at 13V, so output power is 13uW, not that much. But lets design the converter for a higher current output. just in case.

Dave has some new videos on EEVBlog, there he is using (at least will use, just watched part 1) PWM from a uC as reference, feedback. That was one of my ideas for DP SMPS, I'll watch the remaining ones and probably it is possible with some buffer 4 filter.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #6
Yes, the PIC just needs the 13-9v to go into programming mode, there is no real actual load.

There is a demo somewhere where I used the BP PWM and ADC to do a PWM up to 80 or 90 volts :) I also ahve an instruct able with spreadsheets for calculating all the parts of a simple uC driven booster.
Got a question? Please ask in the forum for the fastest answers.

Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #7
I couldn't find your demo but found this.

Also a link to Instructables.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #8
[quote author="ian"]The bottom line, I think an eventual update of the Bus Pirate will need a fet and coil for a SMPS, and a way to switch it :)[/quote]

Yes, this is really what the adapter board needs, variable, firmware controlled Vpp. For anyone writing software/firmware this feature is something that I recommend strongly that you plan for, even if it is not currently used. It will save a lot of work later on.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #9
Here's the SMPS demo:
http://dangerousprototypes.com/2009/12/ ... y-6-parts/
Got a question? Please ask in the forum for the fastest answers.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #10
Thanks Ian, I guess we can put a series resistor on ADC pin to get some sort of feedback and run a closed loop for adjusting the duty cycle accordingly. It can be a very good add on for v4 or we can include this on v5. :D

I'll work out some part values and get them when I'm in Akihabara next time.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #11
[quote author="tayken"]Thanks Ian, I guess we can put a series resistor on ADC pin to get some sort of feedback and run a closed loop for adjusting the duty cycle accordingly.[/quote]
Do you plan on voltages over 5 V ?  If so, then you'll need a voltage divider instead of just a series resistor.  Also, if VUSB drops below 5 V then the ADC input won't accept 5 V, so you might still need the divider.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #12
Ithink somewhere in SVN this is a firmware that does the feedback. I have no idea where though :)
Got a question? Please ask in the forum for the fastest answers.

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #13
[quote author="rsdio"][quote author="tayken"]Thanks Ian, I guess we can put a series resistor on ADC pin to get some sort of feedback and run a closed loop for adjusting the duty cycle accordingly.[/quote]
Do you plan on voltages over 5 V ?  If so, then you'll need a voltage divider instead of just a series resistor.  Also, if VUSB drops below 5 V then the ADC input won't accept 5 V, so you might still need the divider.[/quote]

Actually the bp already has a voltage divider (2x10k) so when you add a series resistor of 20k the range would be 13v2 instead of 6v6.

I dunno how fast the feedback/control loop is but is a small switcher ic not an better option. You need to set it once and forget about it. The voltage divider could be some resistors and a 4066 to switch them.

datasheet: http://www.fairchildsemi.com/ds/FA/FAN5331.pdf

Re: Re: Where to got a PicProgrammer adapter for BusPirate?

Reply #14
Feedback/control loop can be run as an interrupt. I have used them before: ADC interrupt sets a value in PWM duty cycle. Or ADC interrupt can write the reading to a buffer and PWM interrupt can read the buffer to change duty cycle. I've used first one before with position control problems and they were pretty fast. We won't have a changing current demand and it is pretty small, so that won't be a problem IMO.

Switcher IC is good but then we don't support arbitrary voltage levels. Also it uses more pins (lets say one each for different voltages) whereas feedback just uses 2 pins (ADC and PWM)