Goal - Develop a simple safety control algorithm/program using a Photon microcontroller ([login to view URL]) that will safeguard a motor from self-destruction.
Program Concept - Count input signals over a specified period of time. If the input signal count exceeds a maximum allowable value within a specified period of time and it exceeds it for x number of cycles, we will turn on an output and halt the checking process. If the input count does not exceed the maximum allowable count within a specified period of time, we will reset the counter and timer and start the check process over. This process will loop forever until the input count exceeds the maximum allowable count for X number of cycles. If the maximum allowable count is exceeded at some point, the only way to "reset" the output/program will be to power cycle the photon.
For example, if we have a maximum input count set to 5, a timer value set to 1 second with a maximum cycle count set to 3 and we receive greater than 5 input signals every second for more than 3 cycles we would then energize an output.
We would like to develop the program with as few libraries as possible and as few of lines of code as possible.
The counter and timer values need to be adjustable via variables at the start of the program
Counter = vCycleCount (Integer value)
Timer = vSafetyIntervalTime (settable to the tenth of a second [login to view URL])
Max Cycle Count = vMaxCycleCount (Integer value)
The input signal will be a 3.3v signal supplied via a N/C contact. When the N/C contact opens we are considering that an input signal. The output will simple energize a 5v relay.
Open to ideas and design improvements. This project may lead into most complex projects involving the photon.
8 freelancers are bidding on average $134 for this job
Hi, I hope you are doing well. I have expertise in Particle IO programming and development. I have reviewed your requirements of Counter and I can execute the project in less possible time. Looking Forward, Khawaja
Expertise in developing firmware and have good understanding of hardware Relevant Skills and Experience Have worked on industrial control system like automatic ac valve control and power sequence