Shop OBEX P1 Docs P2 Docs Learn Events
The Power Of Cogs — Parallax Forums

The Power Of Cogs

User NameUser Name Posts: 1,451
edited 2013-10-01 11:15 in Propeller 1
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. :)

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2013-10-01 10:43
    "The POWER of COGs" - literally!

    That is a cool solution to a problem.

    Are you going to take your "sketch" :lol: and make it an OBEX entry? This a pretty unique solution - very propelleresque!
  • User NameUser Name Posts: 1,451
    edited 2013-10-01 10:53
    Thanks, Rick. Perhaps I should. The 'schematic' could just be ASCII art in a comment section at the top of the listing.

    It may be the smallest submission in the history of OBEX.
  • ctwardellctwardell Posts: 1,716
    edited 2013-10-01 10:54
    The Power of COGS compels you, the Power of COGS compels you...

    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.
  • User NameUser Name Posts: 1,451
    edited 2013-10-01 11:15
    'Tis a good idea. If this were being done with an ARM or AVR, with the μC busy doing other things at the same time, it would be a moral imperative. In this case, with a dedicated COG, and with there being control advantages of having the μC in charge of pulse width, I'll probably stay with this approach for the time being. But I'm going to consider the matter carefully. The suggestion is most appreciated!

    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.
Sign In or Register to comment.