Arduino 16-Relay Control Code
Budget: $250 – $750 AUD
I have a 16-channel relay board that must be driven by an Arduino. Each of the sixteen micro-switch inputs will correspond to one—and only one—relay output. When a switch is pressed the matching relay should energise for a fixed pulse of 2-3 seconds, then drop out automatically; there is no need for the user to alter that timing.
Here is what I need from you:
• Clean, well-commented Arduino sketch that reads the 16 discrete inputs, debounces the switches, and fires the appropriate relay for the required duration.
• Pin-mapping and a simple wiring diagram so I can connect everything without guesswork (I will be using a common 16-relay module that accepts active-LOW signals, but please keep the code flexible enough to invert logic if needed).
• Guidance on any libraries you choose to use—please stick to standard Arduino core or widely available libraries only.
• A short read-me explaining how to upload, set the fixed pulse length (if it ever needs tweaking in code), and verify operation.
The system is strictly one-shot per press—no overlapping or queued commands are required—and the outputs will be driving small cam motors via the relay contacts. Safety features such as over-current detection are handled elsewhere, so your focus is the timing logic and reliable switching.
If you can deliver tested code along with the documentation listed above, that’s all I need to get this project running.
Here is what I need from you:
• Clean, well-commented Arduino sketch that reads the 16 discrete inputs, debounces the switches, and fires the appropriate relay for the required duration.
• Pin-mapping and a simple wiring diagram so I can connect everything without guesswork (I will be using a common 16-relay module that accepts active-LOW signals, but please keep the code flexible enough to invert logic if needed).
• Guidance on any libraries you choose to use—please stick to standard Arduino core or widely available libraries only.
• A short read-me explaining how to upload, set the fixed pulse length (if it ever needs tweaking in code), and verify operation.
The system is strictly one-shot per press—no overlapping or queued commands are required—and the outputs will be driving small cam motors via the relay contacts. Safety features such as over-current detection are handled elsewhere, so your focus is the timing logic and reliable switching.
If you can deliver tested code along with the documentation listed above, that’s all I need to get this project running.
Related categories:
Electronics
Microcontroller
Electrical Engineering
C++ Programming
Arduino
Debugging
Embedded Systems
Automation