EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: cdevidal on September 10, 2020, 12:58:30 pm
-
I'm trying to build a giveaway product that randomly blinks two LEDs on AAAs or a coin cell every ten-twenty seconds or so. They would look like a pair of predator eyes. Requirements:
* Cheap.. a part costing $1 would likely be way too expensive
* Uses common parts which JLC carries (https://jlcpcb.com/parts/)
* Less than 3 volts
* Blink two LEDs at the same time
* If possible, requires no programming
This is not for cryptography, so it is not essential that it be a very good random circuit. Pseudorandom is adequate.
I've searched around, no luck. I guess a tiny PIC or opamp circuit? I'd rather not use a PIC (price and programming) but if I have to, I have to.
-
This circuit could work if the flashes can be slowed, and since they're software-timed, they probably can. Cheap, simple, 3V, carried by JLC. Requires programming though, so a hardware solution is preferred.
https://cpldcpu.wordpress.com/2019/09/28/a-led-candle-based-on-the-3-cent-mcu/
https://gist.github.com/cpldcpu/aa103568cd30d851d814072fabe5d0a4
https://hackaday.com/2019/04/26/making-a-three-cent-microcontroller-useful/
-
There is no combination of any circuits which will slowly randomly flash a led at low power which will compare to the Padauk 3 cent MCU.
Just a comparator or opamp, or more than 1 transistor goes beyond a 3 cent chip.
Learn a little C language programming and put the 1 time investment into getting the Padauk 3 cent MCU to work.
You will have control of the speed as well as blink duration in software control as well as a few spare IOs and ADC which can be utilized for other functions.
Even Microchip's cheapeapest 'PIC' @ 42 cents USD each can do the job and still compete, yes cheaper than mounting a bunch of discrete linear components to make an uncontrolable low frequency blinker.
(The PIC is flash re-programmable while the Padauk is one time program.)
-
This might work for you... just a quad op-amp and some passives:
https://www.researchgate.net/publication/309351711_A_simple_chaotic_circuit_with_a_light-emitting_diode (https://www.researchgate.net/publication/309351711_A_simple_chaotic_circuit_with_a_light-emitting_diode)
Article also has an example implementation. Might also require a bi-polar supply -- haven't read through it completely yet.
The download was free, so I'm attaching the PDF.
-
Here's another idea:
http://www.creative-science.org.uk/chaotic_leds.html (http://www.creative-science.org.uk/chaotic_leds.html)
Parts count is a lot more, but it offers opportunity for user interaction through the switches and pots.
The full design calls for four oscillator blocks and 6 bi-color LEDs, but just two oscillator blocks and 1 bi-color LED might be impressive enough.
-
Gentlemen... start your (search) engines.
There is such a thing as a self blinking LED.
vroom vroom :)
Here is 1:
https://lighthouseleds.com/pre-wired-leds-1/animated-pre-wired-leds-flashing-rgb-auto-blinking/12v-5mm-pre-wired-flashing-leds.html
-
There is such a thing as a self blinking LED.
But do they blink randomly?
I'm trying to build a giveaway product that randomly blinks an LED ...
Or is there a simple way to modulate such an LED's blink rate - perhaps by coupling two blinking LEDs?
-
There is such a thing as a self blinking LED.
But do they blink randomly?
I'm trying to build a giveaway product that randomly blinks an LED ...
Or is there a simple way to modulate such an LED's blink rate - perhaps by coupling two blinking LEDs?
For most people they blink once a second. To a time nut, sure, they blink randomly :)
-
Gentlemen... start your (search) engines.
There is such a thing as a self blinking LED.
vroom vroom :)
Here is 1:
https://lighthouseleds.com/pre-wired-leds-1/animated-pre-wired-leds-flashing-rgb-auto-blinking/12v-5mm-pre-wired-flashing-leds.html
No, self-blinking LEDs won't do. Doesn't meet the opening post requirements of randomness. Also I should have mentioned I need two LEDs in sync. Updated the opening post.
(And yes, I searched a ton before asking as I had mentioned in the opening post.) :-+
-
This might work for you... just a quad op-amp and some passives:
https://www.researchgate.net/publication/309351711_A_simple_chaotic_circuit_with_a_light-emitting_diode (https://www.researchgate.net/publication/309351711_A_simple_chaotic_circuit_with_a_light-emitting_diode)
Article also has an example implementation. Might also require a bi-polar supply -- haven't read through it completely yet.
The download was free, so I'm attaching the PDF.
I have always been interested in chaos (the mathematical kind, not political!) so I found this article kind of fascinating. I wired up the circuit given in the pdf and actually got it to work! For certain values of "work"...
Using two LM358N dual op-amps, six 10k resistors, three 10nF caps and a bipolar +/- 15VDC supply (from an Analog Devices little power brick boost converter thing), a couple of LEDs in parallel (one red, one white) and careful setting of the power supply brick's supply I am able to get a very nice random flicker in the LEDs... but at low brightness levels. So I added a lowside switch off the anode end of the LEDs to drive a third LED at full brightness. Anode of circuit LED to Gate of IRF3205, 100k pulldown to 0v rail on mosfet Gate, bright LED cathode to Drain, anode of LED to 1k resistor to +15 rail, mosfet Source to 0V rail. Now the flicker in the first LEDs can be dim-to-invisible, while the mosfet is being driven nicely to give a brilliant amplified flicker in the LED. I've had the circuit running all night and it sort of cycles through mostly bright flicker down to mostly dimmer over spans of 5 or 10 minutes. I have not scoped the circuit yet but I can tell that there is a constant oscillation at relatively high frequency (visual high, not RF high!) with the flickering superimposed onto that as moments when the op-amp outputs swing all the way to the rails. Today if I can take a break from mowing lawns I'll break out the scope and see what is going on. I don't know how to draw the cute fractal strange attractors shown in the pdf though.
The circuit is exquisitely sensitive to input voltage but once the input is set so it flickers nicely, it remains stable. As I said I've had it running for hours. I've got it on a nice tight breadboard but I may go ahead and build it down onto a PCB just for grins. The pdf shows it built rather sloppily on a breadboard with 4 obviously unmatched single-chip opamps, so it seems that there is plenty of room left for experimentation. My build is slightly sensitive to stray capacitance from touching one of the caps.
I also tried the circuit with LM339 quad comparator and LM324 quad opamp and could not get it to work with those quad chips.
ETA: the signal driving the original LED is AC, so the LED can glow with either insertion polarity, and also I put a Schottky diode in series with the IRF3205's Gate. Experiment with polarities of the LEDs and this Gate diode to find the best combination.
-
All that above being said, the flicker frequency is much too fast for the OP's original specification. I am afraid that a microprocessor like ATTiny will be the best match for the requirements in the OP's spec. You won't get true randomness but at just a few flickers every 10 or 20 seconds nobody will notice, and you _will_ get full control over the other flicker parameters.