Please help me to develop logic for optical door sensor.....
i want to develop some sort of scanning technique for sensors.
I have 32 ir emmiters in one line and 32 photo detectors on opposite side.
please tell me if i'm wrong. you want door don't close if all 32 sensor are not off.
controller based? if so which controller & compiler?
or u wanted to use only digital logic combination?
actually i have completed full hardware and here are spacs...
controller : pic16 (8bit)
compiler : mplabx
tx has
32 ir leds
rx has 32 photo diodes (ir wavelength matched)
i do not want code, i want logic, i will code on my own.
i want that if any one put hand between sensors, it should give me output (relay toggle)
i have completed one to one transmition, now i want to devlop ogic for cris cross beams,
can any body help me?
When u put ur hand its giving logic "1" or "0" ?
What kind or output it is? means what type of driver u r using? transistor (open collector) or logic gate ICs like TTL, CMOS or op-amp?
Post ur ckt. So that we can suggest u right solution.
Option 1: put all the sensor series. This u can achieve by putting all the sensors seriously or u can achieve it by using logic gates. So any one of the sensor goes "0" o/p will be "0".
Option 2: connect all sensor o/p to uC I/P pins. Read all the input and check the status. If ur controller doesn't support for no of O/Is u can use port expander or some logic ICs.
sir, you din't understood my question,, i said that i have completed my hardware,,, all is done,,
only thing is to right the firmware for this sensor,,
i want to devlop logic...
ok, here are some fact....
32 sensors using four 8x1 mux,,, so i can select each sensor individually,
sorry, I miss understud of this point.
so for selecting ur 4 MUX u need 12 address lines 3 for each.
Address selection can be done in many ways. one of the other way is 3 address line and 4 chip select line. so totally u need 7 O/P only.
and 4 I/P lines.
first configure I/P and O/P lines. (TRIS register)
then first chip and first line (Address - 000)
read it's corresponding MUX O/P (controller I/P - 1)
store it's value in array or variable
next step is same chip but address - 001
read it's corresponding MUX O/P (controller I/P - 1)
store it's value in array or variable
like that up to 111
then second chip first line (address - 000)
read it's corresponding MUX O/P (controller I/P - 2)
store it's value in array or variable
and repeat the same for all chip address from 000 to 111
let me know if u find any difficulty.
that is also done...
what my problem is.. by this method i can check one to one beam...
means if i make led3 on i scan it using receiver 3.. that is ok.. i have done this..
but my senior has aksed me to check cris cross beams (he wants me to make 156 detections using 32 pairs....)
so i am asking for that... what is the logic to check cris cross...
p.s. i am pro and i can make any micro play as i want... so just give me logic.. else i will do my self..
- - - Updated - - -
i would again like to emphasis my question...
how i can make 156 detections using 32 pairs of ir tranmitters and receivers?