I am trying to get some random element in the output of my latest solar powered bot. What I would like to be able to do is to have the bursts of activity from the solar engine make the motor turn one way or the other randomly.
I tried creating a little circuit that had a comparator linked to two photosensors set close to each other so that it was mostly random what the output was but it got a little complicated and I figure that there must be a much simpler way to do that.
I was reading something about using a 555 timer but I couldn`t find an explanation of its use that my lack of formal training could make sense out of.
Any brilliant ideas out there?
I would offer that
when one uses a microcontroller with analog inputs, a left over analog input can/has be/been used to generate a random number. Maybe you should look to see what people have made that generates a coin flip with analog circuits? I am sure there are a number of them out there and probably very simple. There is probably a BEAM circuit designed to do exactly what you want, and, they pride themselves on simple.
+1 Bird
As birdmun said, you might have a look at BEAM bots. I am also relatively new to BEAM bots, but looks like you are already in the correct direction as you said you’re making use of photosensors and comparators.
And what kind of photosensor is it that you are using? Are they photodiodes (like IR sensors)? Or are they photoresistors (LDRs)? If they are photodiodes, then it’s relatively easier to get a random output as they are much more sensitive to ambient light. You just do that by tilting the sensors towards areas of higher ambient light. In that case, it will be pretty difficult for the sensor to filter the input from the incoming random IR rays, and the output should be unstable. (Pretty much making a robot NOT to follow a line or something like that
)
-Ashim
Thanks a lot for these areas
Thanks a lot for these areas of investigation. I realize I left out a bunch of important information on this.
What I am trying to do is to hook up a simple solar engine to a motor. I want that motor to spin in a random direction with each pulse, more or less. Since the timing of those pulses is not stable because it’s dependant on ambient light, I can have a very steady pulse to trigger a relay to switch the motor direction. The combination of a stable pulse with the unstable pulse of the solar engine should create enough variations to give the end result the look of randomness I was hoping for.
As I was asking a few of the clever folks I work with, I did end up figuring out that I can probably get the result I was hoping for using a simple 555 timer in an astable mode. I’m just wondering what kind of results I’ll get since the 555 timer will also need to be powered by the solar engine…
Can’t wait to go home to try that.