Using Arduino PWM for constant-current drive

The always excellent Circuit Cellar Magazine has a nice article by Ed Nisley. Arduino PWM vs MOSFET Transconductance describes his characterization of Arduino PWM outputs for the constant-current drive of MOSFETs. His application is LED drive, but you could use the knowledge anywhere, including a programmable current sink. Now Circuit Cellar is a paid-subscription magazine, so I can’t link to free article, but maybe their lawyers will let me take a picture of a picture in the print magazine, to which I am a long-time subscriber.


This photo of the board Ed Nisley used to develop his constant-current source tells you it is not some Spice simulation or a theoretical track. This is a sure tip-off that Ed knows what he is writing about.


This scope shot also reassures you that Ed is not venturing forth some opinion on how the hardware and firmware works, it is proof positive he built this stuff and that it really works. I scratched off the readouts to make sure this is fair use and not a violation of Circuit Cellar’s copyrights.

Analog Guru Paul Grohe taught me that you should always look for pictures of real hardware in articles, and that if the curves are ”too pretty” they are probably marketing BS instead of real data. That is the great thing about this article; it’s got both pictures and data that tell you that you can trust the content.

There is another interesting article in the March 2014 Circuit Cellar issue. It’s about an outfit called ImageCraft. They make a C compiler with an IDE (integrated development environment) for Atmel AVR and ARM Cortex-based MCUs. Now I am a fan of Atmel’s free Studio 6 IDE, but feel free to use whatever IDE you prefer to write the code for your projects.

Now I can’t show you these articles on-line, since Circuit Cellar is a subscription print magazine. You have to give them 50 bucks a year to get it. You can get it as a digital pdf if you want to save trees. Its $85 a year for the both print and digital versions. There are large discounts for two- or three-year subscriptions. Best of all, you can give them something like $225 and get every single issue in history on a thumb drive. Then with your combo subscription you can add your monthly pdf to the archive thumb drive, and still have the print edition to impress your friends and boss.

1 thought on “Using Arduino PWM for constant-current drive

  1. Ed

    Thanks for the good words!

    That Hall effect LED driver project has a long backstory, collected in a post showing the original hairball:

    The PCB version in the column achieved first light late last year:

    You’ll find bits & pieces of that circuitry scattered all over my blog, with plenty of photos & scope shots showing that, yeah, it really worked that way… [grin]



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s