light bulb connected to serial port

I haven't looked at this site in a while but it used to be very helpful:

formatting link

Tom

Reply to
Tom Biasi
Loading thread data ...

Hello. Just for an experiment, I want to connect a light bulb to a serial port and make it turn on and off with intervals and I want to use the pyserial library for this. Could anyone give me some suggestions please?

Reply to
Siraj Kutlusan

a serial port has enough power to operate a LED (light emitting diode) with no external power source needed, if you need more light than that how much do you need?

if pyserial supports toggling the DTR or RTS lines of the serial port they could be connected to the LED via a 1K resistor, (connect the other LED terminal to SG)

larger lamps can be controlled by using the serial port to operate some sort of electrically operated switch... if you need details ask.

Bye. Jasen

Reply to
Jasen Betts

Transitions on the serial port are fast enough, even at 110 Baud (assuming your port will even go down that low), that the persistence of a light bulb's filament will make it appear that the bulb either stays on continuously or barely flickers at all.

If you're serious about doing this, it's much easier to just plug an RS232 breakout box (with LEDs, of course) onto the serial port, connect pin 2 to pin 3, cut the port down to its lowest available speed, and fire away with a Fox or similar test pattern.

I will add that I don't really see the point of doing this experiment, outside of illustrating that there is some sort of activity going on. What, exactly, are you trying to demonstrate or accomplish?

Happy tweaking in any case...

--
Dr. Anton T. Squeegee, Director, Dutch Surrealist Plumbing Institute.
(Known to some as Bruce Lane, ARS KC7GR, 
kyrrin (a/t) bluefeathertech[d=o=t]calm -- www.bluefeathertech.com
"If Salvador Dali had owned a computer, would it have been equipped
with surreal ports?"
Reply to
Dr. Anton T. Squeegee

I do not know electronics very well, so I will ask my friend about this. What do you mean by a 1K resistor? Is this the universal name for what you are talking about?

Reply to
Siraj Kutlusan

I find electronics very interesting, and thought this experiment quite suitable and cheap for a first experiment.

Reply to
Siraj Kutlusan

fairly universal, the full name would be "one kilo ohm resistor, one quatrter watt, 5 percent tolerance "

typically looks something like this

---{#####}--- with coloured bands. red,black,red,,gold ( , is a gap ,, is a wider gap )

Its purpose is to stop too much electricity from flowing through the LED and burning it out, typical serial ports won't destroy a typiical LED rapidly. you could leave the resistor out if you only intend to use the led ocasionally.

--

Bye.
   Jasen
Reply to
Jasen Betts

you

For a 1k resistor this should be : brown,black,red,,gold ( , is a gap ,, is a wider gap )

--DF

Reply to
Deefoo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.