Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Looking for a cheap way to sawtooth LED's  (Read 1297 times)

0 Members and 1 Guest are viewing this topic.

rackoon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 715
  • Last login:May 14, 2024, 01:12:10 pm
  • I EAT PENCILS!
Looking for a cheap way to sawtooth LED's
« on: October 05, 2009, 06:01:21 pm »
Is there a cheap way to sawtooth LED's?  :dunno

I know I could get a controller board from suppliers for 29 to 44 bucks.

Heck, I bought some rope light for my son's room a few years back for $20, and it had a  dial for blinking, sawtooth, and constant.

I just want a simple manual way for my cab special effect lights to do somthning but stay on.  :dizzy:
They treated me like an animal and that's what I became.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Looking for a cheap way to sawtooth LED's
« Reply #1 on: October 05, 2009, 07:16:12 pm »
If you're feeling all DIY, this is a great starter application for a microcontroller.  Something like an Arduino would make this pretty easy.  You may need some biggish transistors depending on how many LEDs you want to drive, but those would be the only external parts to most uC dev boards (other than a power supply, of course) needed.

There are also products like the LED-Wiz if you want a more "already built" type thing.

Beretta

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 798
  • Last login:December 20, 2021, 02:11:30 pm
Re: Looking for a cheap way to sawtooth LED's
« Reply #2 on: October 06, 2009, 05:07:14 am »
well, cheapest way to interface to some leds would be using the printer port..

each data pin could handle about 20ma.. roughly 1 led.. otherwise you'd need to use a transistor.

im not sure how to go about it but you could get the saw effect using PWM (pulse width modulation).
Anyone got change for a dollar?
PLEASE HELP NEED Fastmame .70 and .9* releases

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Looking for a cheap way to sawtooth LED's
« Reply #3 on: October 06, 2009, 03:43:19 pm »
Cycling the parallel port fast enough to introduce PWM effects without flicker is doable, but kinda CPU consuming.  The PWM will also have some variability that may be visible due to OS scheduling issues.

The programming in basically identical to what you'd be doing on a microcontroller, but you're using your PC's CPU and the parallel port for I/O.  Many microcontrollers actually have dedicated hardware for this (often referred to as an "output compare" unit or "PWM" support on their timers), so the program might actually consist of "set everything up then go to sleep".

Current ratings on PC parallel ports vary.  Most are good to 10-25mA sink, but may only be able to source 5-10mA.  You can use some transistors to increase this dramatically with very little complexity.  Of course, many PCs these days lack parallel ports entirely.

If you just wanted to turn them on and off, parallel port is nice and easy, but for PWM effects, it can get a little rough.  Certainly doable, but I'm guessing you've got better uses for those CPU cycles.