I currently work on a sensorbox which needs to measure analog signals (temperature, power consumption,..), digital signals (magnetic contacts, positions,...) and control digital switches (relays). All this magic is controlled by a PIC18F (has an ADC) and interfaced with a larger machine via CAN. This is just a laboratory setup (lots of cables, breadboard), where the controller is programmed using ICSP.
Since the box should now be included in the machine I was wondering how to include the MCU, since the sensors are almost unreachable after the project is finished.
- Wire all the cables from the sensorbox to a 'safe' location where the MCU is located
- Include the MCU on the box and wire only the CAN to the frontend
Since I am not sure that I have to change the code I would prefer option 1. Here I can reprogram the MCU on the front.
OR
Wire additional cables (the three programmer cables for the MCU) to the frontend.
Whats the conventional method for such a problem?