Shop OBEX P1 Docs P2 Docs Learn Events
HELP! Dimming lights with Stamp! — Parallax Forums

HELP! Dimming lights with Stamp!

ErsatzzzErsatzzz Posts: 2
edited 2006-10-24 21:22 in Learn with BlocklyProp
Hi all,
I'm new to the Stamp module and I'm trying to find a way that I can program a flashlight battery to flicker in and out as well as dim in and out using the Stamp.· I can do the flickering in and out with the stamp, but I can't seem to dim the bulb unless it is a LED (which are too directional and not bright enough for my purposes).· I was also hoping to run the system off of a battery source-Does anyone know how I can dim incandescent bulbs electronically?· Or must I use a potentiometer?· If I use a potentiometer, how can I program it electroncially as opposed to a mechanical sequence?
Thanks!

Comments

  • ZootZoot Posts: 2,227
    edited 2006-10-24 21:16
    Depending on the voltage and wattage of the bulb, the easiest thing is probably to have a Stamp PIN drive a transistor (or several transistors) which in turn light your light bulb. Do a search at the forums for things like "driving a relay", "driving a lightbulb" and you will turn up many examples of one and two transistor circuits for doing just that.

    Once you have a lightbulb that can be turned on and off with a Stamp PIN, then you need to write a program that will dim it. There are a number of ways to do this, but the one easy way to start would be to use the PWM command to send a rapid series of "on/off's" to the PIN -- the ratio of "off" to "on" time will give you different light intensities.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-24 21:22
    This is a duplicate/cross post, please refer to the original at the link below.

    http://forums.parallax.com/showthread.php?p=611887

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.