I have 13 photodiodes. Positive connection from battery is connected to the positive end of each photodiode. The position of photodiodes is as shown below:
o o o
o o
o o o
o o
o o o
I would like to connect a motor to the output of these photodiodes.
Now when I throw infrared light on some photo diodes, they will give me 9V output as I have connected 9V battery, others will give 0 as output.
Suppose I throw light on it as below: (generated number 1)
o o 1
o 1
o o 1
o 1
o o 1
I want the motor to complete 15 iterations, stop there for 2 seconds and again complete 15 iterations in reverse direction
Suppose I throw light on it as below: (generated number 2)
1 1 1
o 1
1 1 1
1 o
1 1 1
I want the motor to complete 30 iterations, stop there for 2 seconds and again complete 30 iterations in reverse direction
Suppose I throw light on it as below: (generated number 3)
1 1 1
o 1
1 1 1
o 1
1 1 1
I want the motor to complete 45 iterations, stop there for 2 seconds and again complete 45 iterations in reverse direction
And similarly...
Can somebody just give me an idea of how can I accomplish the above mentioned task? and also what materials I would need?
Answer
- You are going to need a microcontroller, with a large number of general purpose I/O pins. It could be done with discrete logic ICs, but it would be VERY complicated.
- You will need a motor controller to drive the motor (H-Bridge)
- You will need some way to detect each rotation of the motor so that your microcontroller can count the rotations. This could be mechanical (given the low number of turns) or you could use a photodiode, a light, and a reflective spot on the motor shaft.
As mentioned in pjc50's answer, the photodiodes alone won't give you a clean on/off so you'll need some additional circuitry.
Lighting just the photodiodes needed for a particular number might be kind of difficult. It might work better if you can put a cardboard cutout over the detectors and shine a larger light over the whole area. Use a 1 shaped cutout, shine the light, 15 rotations.
No comments:
Post a Comment