Electronics (alt.electronics)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to alt.electronics
Bill
 
Posts: n/a
Default Random LED's

Does anyone know a good and simple way to have 4 LEDs blink in a random
pattern
  #2   Report Post  
Posted to alt.electronics
Chris Head
 
Posts: n/a
Default Random LED's

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My preference for a simple way would be to use a PIC microcontroller
(pick your own preferred type here), and put something like a linear
congruential generator on it (see Wikipedia - generating a number
requires just a multiply and an add, if you let M be a power of 2).
Once you generate an 8-bit output, use the upper 4 bits for your LEDs
and throw away the lower 4 bits (the lower bits of a linear
congruential generator have awful randomness). With an appropriate
PIC, you can do this with literally nothing but the chip, a power
supply, the LEDs, and the current-limiting resistors. Something like
the 16F627A/16F628A/16F648A have a built-in oscillator and can run
from 3 to 5.5 volts, so 3 AA batteries would power the whole system.
You can also get the 16LF variant (instead of 16F) which can run down
to 2V, so you could use only 2 batteries. I'm not familiar with the
10F series, but you can probably find a 10F series PIC that'll do the
job just as well, and the 10F series have only 8 pins where the
16F648A has 18, so you'd use a lot less space.

On the other hand, if you've never done any microcontroller work, it's
a big job to get started.

Chris

Bill wrote:
Does anyone know a good and simple way to have 4 LEDs blink in a random
pattern


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEpV5U6ZGQ8LKA8nwRAsImAKCW85gdinFiqOYMKAY5Eh Wi79aFSQCg2hmQ
lJudkoQiFCsaV/+3sVF81cQ=
=7fyc
-----END PGP SIGNATURE-----
  #3   Report Post  
Posted to alt.electronics
Chris Head
 
Posts: n/a
Default Random LED's

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Unfortunately a schematic won't help. A PIC is a type of
microcontroller, so you have to write code and then burn it into the
chip. Writing the code requires a computer and programming knowledge,
and burning it into the chip requires specialized hardware (a
programmer). If you HAD these resources already available, a PIC would
be both easy and cheap. If you have to acquire any of the above, it
will be either difficult, expensive, or both, and I would suggest a
different approach (at this point I stop being able to help you, since
I don't know off-hand another way to solve your problem).

Chris

Bill wrote:
[snip]

I have never used a PIC, do you have a Schematic?



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEpY8W6ZGQ8LKA8nwRAvvLAJ4sq1XVWn3Q9Phcq7oI21 ljWLW7TwCfUxnR
TSJ8ifdPee+umeAY0XWMxC4=
=ErIR
-----END PGP SIGNATURE-----
  #4   Report Post  
Posted to alt.electronics
John Fields
 
Posts: n/a
Default Random LED's

On Fri, 30 Jun 2006 10:11:57 -0700, Bill wrote:

Does anyone know a good and simple way to have 4 LEDs blink in a random
pattern


---
Learning to cross-post might be a good start.



--
John Fields
Professional Circuit Designer
  #5   Report Post  
Posted to alt.electronics
Tater Schuld
 
Posts: n/a
Default Random LED's


"Chris Head" wrote in message
news7dpg.85747$I61.65769@clgrps13...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My preference for a simple way would be to use a PIC microcontroller
(pick your own preferred type here), and put something like a linear


cripes, why have the guys spend hundreds of dollars in development tools for
a single application.

simple solution, get 4 blinking LEDs, wire them in parallel. after an hour
they'll be random enough.




  #6   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 1
Default Random LED's

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Heh... because if you already HAVE the tools, because you do OTHER
things with microcontrollers, then it's only a few dollars, and the
solution is very small in terms of space taken up. I did say that if
you don't already have the tools and knowledge this probably isn't a
good idea.

Chris

Tater Schuld wrote:
"Chris Head" wrote in message
news7dpg.85747$I61.65769@clgrps13...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My preference for a simple way would be to use a PIC microcontroller
(pick your own preferred type here), and put something like a linear


cripes, why have the guys spend hundreds of dollars in development

tools for
a single application.

simple solution, get 4 blinking LEDs, wire them in parallel. after an hour
they'll be random enough.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFErI8q6ZGQ8LKA8nwRAgM7AKCE/zcMkvmCTj76XMDPCk2cButDEACgnlMi
rKrXvFCsQVp+S0/9UQv3rR4=
=MWp9
-----END PGP SIGNATURE-----
  #7   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 2
Default Random LED's

Bill wrote:
Does anyone know a good and simple way to have 4 LEDs blink in a random
pattern

I need some parameters. How random? Is the frequency of LED flashing to
be low enough that it doesn't look like a blur to the eye?

Probably the best simple method, if you don't have a uP development
setup, is to have a 4-bit counter feeding the 4 LEDs (via current
buffers probably), and a high frequency (1MHz?) clock feeding it via a
gate so that it gets clocked for roughly 1mS and then sits with the
4-bit output reached for roughly 50mS, then counts again. So long as
the counting time is varying slightly (a 555 timer might be variable
enough by itself, but I'd suggest adding some simple radio output into
the timing - ask me if you need a circuit).

Mark.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing a car globe with a series of LEDs slepax Electronics Repair 5 August 15th 05 03:49 AM
OT - 386 code Cliff Metalworking 40 January 24th 05 05:47 AM
High Efficiency LEDs? Shannon H. Electronics Repair 4 September 2nd 04 07:59 PM
High Efficiency LEDs? Shannon H. Electronics 2 August 29th 04 07:26 PM
Wednesday's Random Lottery Numbers for 28 January, 2004 The Random Lottery Number Generator UK diy 77 February 9th 04 05:26 PM


All times are GMT +1. The time now is 07:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"