The problem is, sometimes, apparently randomly, triggering a locker will simultaneously trigger an adjacent locker, which is bad, when the whole point of the project is securing your items and ensuring people only have access to their assigned cameras. I am 99% sure that it is not a software problem. My limited understanding is that this has something to do with EMF and (maybe?) back voltage. Here are some of the clues I've gathered:
- I've monitored the data being sent to my shift registers. The relays are active low. So, even when 0b11111110 is sent to out (with 0b11111111 being sent to the remainder of the daisy-chained shift registers), the relays act as if they were sent 0b11111100 instead.
- The problem is not occurring at the lockers themselves. When there is a double-trigger, it is always the selected locker along with the next consecutive locker, even if those lockers are the end of one row and the first in the next row (ie, 6 triggered along with 7, in the image below).
My next experiment, which I haven't tried yet, is to carefully wrap each relay in aluminum, to see if the issue is with an EMF around the relay itself. Again, very little experience with these things, so if I'm talking nonsense here, try not to laugh too hard at my expense (a little is allowed).
Here are the relay boards I am using: https://www.ebay.com/itm/16-Channel-5V1 ... Sw3ChZeWS4
I appreciate any help or direction you all can give me in figuring out why they are misfiring this way!