Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

Buy Site Supporter Role (remove some ads) | LPF Donations

Links below open in new window

FrozenGate by Avery

silly microcontroller question

Joined
Jan 20, 2008
Messages
1,724
Points
0
I've never really worked with microcontrollers before, and I'm not 100% on the basic principles of electronics, so pardon my ignorance if this is a dumb question.
Is there a way to digitally control resistance via a microcontroller?

I thought it would be a neat idea to have a set of "up" and "down" buttons on a driver to adjust current in say 10mA increments.
 





they make components called digital potentiometers, it's basically a small chip with a ton of resistors inside it connected to a bunch of transistors and assorted logic, you power the chip and apply a direction signal (up or down) and a clock signal to move the virtual wiper

short answer: yes
 
you could also program a microcontroller to pulse a transistor on and off to get an average current, then smooth it out with an inductor and capacitor.
in effect it would be a 'buck' smps

but it would take a lot of programming experience to get it to work.
 
The easiest thing to do is use the digital pot. They're not too expensive and have decent resolution. Many use the SPI protocol, so it'll be helpful to find a microcontroller that supports that natively. You may also wish to use a non-volatile version so it remembers its setting when you power down.
 
woop said:
you could also program a microcontroller to pulse a transistor on and off to get an average current, then smooth it out with an inductor and capacitor.
in effect it would be a 'buck' smps

but it would take a lot of programming experience to get it to work.


AKA, PWM ;)
 





Back
Top