Beta Version Food Computer from MIT LED lighting issue


#1

A few years back, we built a Beta version food computer with the help of the folks at MIT. We are having trouble getting the lights working. Anyone have any info. on how to troubleshoot?


#2

For anyone to give you help, they will need more information about your equipment. Can you provide more details? Pictures of your system would be helpful. In particular, you could show the lights and whatever they are plugged into.


#3

Attached are some photos of our system. There are three leads running to the lights. I tested all three and found no DC power coming in. Then, I went to the 16 Channel relay. Bank K1, K2, and K3 power the lights. With the machine powered off, the three relay banks tested fine. There was a closed circuit between the COM and NC. Between COM and NO, the circuit was open. With the machine powered up and the relay activated, there should be a closed between the COM and NO. This isn’t happening. Therefore, there is current coming into the COM but never switching over to the COM/NO thus sending current to the lights. I swapped the leads out of the NO side to the NC side of the relay. This turned the lights on. They are on constantly now and shut off only when the machine is powered down. Is my issue just a bad 16 channel relay or do I perhaps have an issue with another component? Is something with the raspberry pie or the Arduino stopping the relay from activating possibly?


#4

It sounds like your first level problem is that the relays on your relay board aren’t receiving control signals or perhaps the relay board isn’t receiving power. From the pictures, it looks like your system is very similar to a PFC v2.0. There’s some OpenAg PFC v2.0 hardware documentation at https://github.com/OpenAgInitiative/openag_pfc2/blob/master/Instructions/brain_module.md with lots of pictures of the relay module and power wiring assembly procedure.

I don’t want to get your hopes up about getting the system working because people have had a lot of problems with the PFC v2.x software. Once you solve this problem with the lights, you will probably have other difficulties. But, that aside, here are some ideas:

  1. It sounds like you already understand this, but for other people reading this post in the future, here’s some background on relays: COM stands for common, NC stands for Normally Closed, and NO stands for Normally Open. “Normal” refers to the connection that happens when the coil is off. The relay’s COM terminal is connected to either the NO or NC terminals depending on whether the relay coil is powered. When the relay coil is off, COM connects to NC inside the relay forming a closed circuit that allows current flow. In that case, NO is not connected to COM inside the relay, so there is an open circuit and current cannot flow between them. When the relay coil is powered, the relay module’s indicator LED for that channel should light up and COM should switch from NC to NO.

  2. You mentioned testing for when the relay was activated, but you didn’t describe your procedure. As far as I can tell, your relay module is probably this one from SainSmart: https://www.sainsmart.com/products/16-channel-12v-relay-module. The amazon page is here: https://www.amazon.com/SainSmart-101-70-103-16-Channel-Relay-Module/dp/B0057OC66U. If you check the reviews & questions on the product pages, there are explanations of how the input pins work. It sounds like the inputs use inverted logic where grounding an input pin is the way to turn on a relay. If that’s the case, and if you tried to activate a relay by applying 5V to an input pin, it wouldn’t do what you wanted.

  3. The inputs to your relay board are wired to the signal board which is, in turn, wired to your Arduino. There’s a known issue with the PFC v2.x where the Arduino can short out against the signal board. In particular, check to see if the USB connector on the Arduino is touching any pins, pads, or other metal parts on the signal board. It’s possible that your Arduino isn’t sending any outputs to the relay board because it’s locked up due to an electrical fault.

  4. It’s possible that your hardware is fine and that the software doesn’t work. In that case, troubleshooting the old software is probably not a viable option, so your best bet would be to bypass or replace it. For example, you could hook the Arduino up to a laptop running the Arduino IDE and write a new control program. Or, you could bypass the relay board, wire the lights directly to their power supply, and plug the power supply into a holiday light timer.


#5

Thanks so much. This helps! My students and I will do some digging.