The Power Of Cogs
User Name
Posts: 1,451
There was a conversation here a few days ago (that I can't locate!) about the superiority of multiple execution units visàvis dedicated hardware and/or interrupts. Someone mentioned that we ought to make a list of examples that illustrate this. While this post may not evolve into that list, there was an example here at Chaos Central that impressed me.
For a particular project, I decided to use a Propeller rather than an NXP ARM chip just because I wanted to help fund P2 development in my own small way. As the project evolved, this turned out to be a better idea than imagined. At one point a 15VDC source for IGBT gate drive was needed. Two pins and one cog ended up making the perfect regulated boost converter.
(A Prop pin via a 1k8 resistor drives the base of a 2-cent BJT that pulls on a 330 μH inductor that dumps through a 3-cent Schottky diode to a small cap. A resistor divider across the cap provides a feedback voltage to the other Prop pin. A few lines of code and the thing provides voltage regulation to within 0.01V across the full range of operating current. The few external components needed were in my junk drawer. The 2-cent transistor was a Fairchild SS8050D that I order by the thousands on eBay.)
I can hardly imagine the difficulty of implementing this on a regular μC without totally trashing the main application(s) running on the same processor. As it was, it was a virtual freebie. Runs perfectly and doesn't impact other code development in the slightest.
For a particular project, I decided to use a Propeller rather than an NXP ARM chip just because I wanted to help fund P2 development in my own small way. As the project evolved, this turned out to be a better idea than imagined. At one point a 15VDC source for IGBT gate drive was needed. Two pins and one cog ended up making the perfect regulated boost converter.
(A Prop pin via a 1k8 resistor drives the base of a 2-cent BJT that pulls on a 330 μH inductor that dumps through a 3-cent Schottky diode to a small cap. A resistor divider across the cap provides a feedback voltage to the other Prop pin. A few lines of code and the thing provides voltage regulation to within 0.01V across the full range of operating current. The few external components needed were in my junk drawer. The 2-cent transistor was a Fairchild SS8050D that I order by the thousands on eBay.)
I can hardly imagine the difficulty of implementing this on a regular μC without totally trashing the main application(s) running on the same processor. As it was, it was a virtual freebie. Runs perfectly and doesn't impact other code development in the slightest.
Comments
That is a cool solution to a problem.
Are you going to take your "sketch" and make it an OBEX entry? This a pretty unique solution - very propelleresque!
It may be the smallest submission in the history of OBEX.
Just a thought, should you use an RC circuit to drive the base to make sure you can't programatically let out the magic smoke?
C.W.
Edit: Based on Chris' concern, I cooked up an optional circuit addition that grounds the base of the switching transistor if the processor pin stays high past an adjustable temporal threshold.