Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Random timer circuit

Status
Not open for further replies.

calkevin

New Member
My son and I are working on a electronic project together and we are looking for a simple circuit that could randomly activate a 3 volt actuator. We would like the circuit to activate the actuator let's say 1 to 3 times a day. so it may activate once at 7 AM then the next time would be 3 PM then 10 PM then the next day something completly different.

Almost like a computer ramdom generator but we need the output to provide a momentary closed circuit to switch the actuator.

Thanks so much!
 
So build a peusdo-random generator using a long shift register (say 64bits), cascaded with an eight bit, parallel-out shift register. Use a several input AND or NAND to decode some particular pattern from the eight bit one. This should make for a very long random sequence with an infrequently occurring specific pattern in the eight bits.

A computer simulation would help you decide how long the main SR needs to be, how fast to clock it, and how many bits should be in the decoder...
 
Last edited:
Hi, Mike. You helped me and my son back in December. As you can see my son keeps getting more ideas. Based on your response, I defently know this is way out of my league. Like before the last circuit just had transistors and capacitors but I have no clue on what you described on this circuit. Is there a chance that you can show your solution in a diagram like before? I'm willing to pay for your services.

Thanks so much.

Kevin
 
Did you follow the link in my post?
 
Kevin,

Read **broken link removed** (which was one of the links in the Wiki Article). It comes close to a working schematic. Missing details are how long a sequence do you need (likely ~ 20 bits).

The 20 bit Shift register has a sequence length of about a million counts. If you clocked it once per second, and since there are 86400 seconds per 24hrs. it would take about 11.5 days for the sequence to repeat. The trick will be to find a particular parallel decode pattern (several bits long) that occurs on average about three times per day.

I don't have time to design a wiring diagram and parts list for you, and you likely cant afford to hire me to do it based on an hourly rate. Maybe someone on the forum is willing to?

btw- this could be done with a single $1.00 8-pin PIC chip and a program.
 
Last edited:
The attachment may help you to understand the Pseudo random shift register.

Study it in conjunction with the link Mike posted initially.

Ask questions if necessary.
 

Attachments

  • Pseudo  Random counter.gif
    Pseudo Random counter.gif
    4.8 KB · Views: 356
Last edited:
this is definitely a PIC project, you could get a uC to do it cheap, and a simple circuit for it. if your son wants to learn about this stuff (digital circuitry) spend 60$ on a PICKIT2 programmer + demo board, and "GREAT COW GRAPHIC BASIC" free off the web, depends on sons age too, say high school

IF you just wanted a simple chip that could do this I have a small one that i could write up for you for like 10$, or mmaybe one of these guys would too?
 
this is definitely a PIC project, you could get a uC to do it cheap, and a simple circuit for it. if your son wants to learn about this stuff (digital circuitry) spend 60$ on a PICKIT2 programmer + demo board, and "GREAT COW GRAPHIC BASIC" free off the web, depends on sons age too, say high school
I would also use a PIC for this job, but if he wants to learn about digital circuity ie. counters, gates, etc. then a hardware circuit would teach him much more than a PIC design.
 
Last edited:
Although i agree with that, I still suggest a pickit2 since the only coding he really needs is:

setport on /setport off
wait

I mostly suggest this since he needs his pulses 3x PER DAY, which adds technicalities with the random num gen, and with the equivalent logic value he can easily use a variable.
If i would of had one of these through high school I would have been in heaven, I'v known to read/write basic since i was 10, a single chip can easily replace any logic IC(or combination) which also will save alot of $$ in the long run, "AND REPROGRAMMABLE!" definitely the next step up from one of those Radio Shack "all-in one" electronic kits....and the COW BASIC has block commands so it writes the code for him(all cut&paste)

It just sounds like the OPs are going to be doing alot of these crazy little switching circuits......
 
It depends upon what he wants to learn - ie. digital logic or microprocessing.

Either way, I suggest that he needs a real time clock to determine the days & some type of random number generator to generate 3 random numbers in the range 0 to 86400 and provide an output pulse each time the timer reaches these values.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top