Autor Thema: Having a hard time figuring out a Random timer setup.  (Gelesen 5308 mal)

Offline Salty

  • Newbie
  • *
  • Beiträge: 9
Having a hard time figuring out a Random timer setup.
« am: März 04, 2010, 15:47:26 Nachmittag »
Hi,

I have a easy 512 ac - rc, that i need to use as a sort of random search generator.

It is activated by only one pulse button input, and i need it to turn on and off a green (Q1) and red light (Q2), on a random shedule.

If its red you get searched, if green your good to go.

Any thought's?

Thanks in advance, for any suggestions.

Kind Regards

Salty.

Offline Maikky

  • Sr. Member
  • ****
  • Beiträge: 531
Re: Having a hard time figuring out a Random timer setup.
« Antwort #1 am: März 04, 2010, 16:47:54 Nachmittag »
Dear Salty.

Attached please find an example.

The basic idea is
- with I1 two timers are started
- the first is delayed-off, the delay is random with max. 1 s
- the second is a pulse of length 0,5 s
- the marker M1 indicates the end of delay time T1
- if the pulse T2 is still on the output 1 is on
- if the pulse T2 is off the output 2 is on

Regards
Maikky

 

Offline Salty

  • Newbie
  • *
  • Beiträge: 9
Re: Having a hard time figuring out a Random timer setup.
« Antwort #2 am: März 05, 2010, 07:29:14 Vormittag »
@ Maikky...

Thank you for your quick response.

I have to say, never thought of using a Analog Com, to switch between them.

I will how every need to make a small adjustment, need to have the lights alternate a bit before settling on green or red. But that is'nt too difficult.

Thanks for the help

 ;)

Regards

Salty

Offline Salty

  • Newbie
  • *
  • Beiträge: 9
Re: Having a hard time figuring out a Random timer setup.
« Antwort #3 am: März 15, 2010, 11:56:41 Vormittag »
Hi,

As expected the client would now like to beable to make the random search not so random if he so chooses.  >:(

Is there some way that the program could be changed via a selector switch to influence the "randomness" more to one side or the other?

1- 2- 3 on the selctor switch

1 being - the completely random system.
2 being - more green than red
3 being - more red than green

Any advice or suggestions welcome, thanks in advance.

Salty.  :)


Offline Maikky

  • Sr. Member
  • ****
  • Beiträge: 531
Re: Having a hard time figuring out a Random timer setup.
« Antwort #4 am: März 15, 2010, 12:18:44 Nachmittag »
Dear Salty.

In the earlier example the analogue comparator A01 is set to 0,5 s, which is half of the max.
random time.

By using two additional comparators (one set to a lower time, one set to a higher time) you
are able to get more green or more red.

Always one of the three comparators is enabled by the selector switch and you are ready.

Regards
Maikky