Hi, I'm designing a semi autonomous medium sized RC watercraft with motor, rudder etc. I'm using the nrf24l01 wireless units to use a wireless remote to control different things on the watercraft. There is also a semi-autonomous mode I'm developing. The exact use case is complicated so I'll keep things simple. This post is mainly concerned with the safety elements with using an Arduino with this sort of design.
MAIN QUESTION:
WHAT IF the Arduino mega unit on the watercraft:
-stalls out?
-out of memory stalls out?
-endless loop? (unlikely)
If this were to happen the motor PPM signal would remain the last used previous value. This could be dangerous as the watercraft could go off endlessly until the battery is dead. It could hit something etc. What can be done to handle this situation?
Here's the safety that I've already implemented.
-
If the nrf24l01 wireless radio connection fails transmission for more than 2 sec, shut off motor.
-
If the nrf24l01 wireless radio connection gets the same exact transmission motor signal for more than 2 sec, shut off motor. (i.e. if wireless connection motor signal stalls at 50% endlessly, shut off motor. It should never be a single value. The throttle button will likely hover up or down a specific amount due to the physical analog linear hall effect sensor controlling the throttle.
IDEAS THAT I HAVE THAT MIGHT (SORT-OF) SOLVE THIS:
Have a separate Arduino NANO unit connected to the main mega board. This NANO unit would communicate via serial communication to the main mega unit. This separate NANO arduino board would have one and only one job: Forward the PPM signal to the motor.
The main mega Arduino would send the motor signal to the NANO via serial and if the main mega board stalls out, that NANO could detect this and then shut off the motor. This would keep the code and memory on the NANO simple to reduce the chance of the NANO stalling out to a very small chance.
Any other ideas?