View previous topic :: View next topic |
Author |
Message |
mka879
Joined: 30 Oct 2015 Posts: 34
|
Runtime Configuration of Electronic Module |
Posted: Tue Apr 19, 2016 4:52 am |
|
|
I am working on remote monitoring module of generators. We want to have configuration of different parameters such as sensor type selection,etc.
For example there are 5 major temperature sensor vendors each have different response curve(Voltage vs Temperature). One static approach can be to hardcode any one response in the micro-controller. Now if a generator have a different sensor we would like the to configure our controller for that sensor. I am not sure how I may do this in software such that if a user want to configure while monitoring action is in progress, he/she may configure the controller and then return back to monitoring. I came through function pointer technique but not sure if this is the way to do it. Maybe I can set few switches and read the state of the port to determine the configuration user want to achieve.
Please comment on how may I achieve this. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Tue Apr 19, 2016 5:15 am |
|
|
Since you don't have control over what sensors are on the generators....
The simplest, easiest, and 'universal' way is to spend a $1 an a 'small' PIC that connects between the sensor and your 'controller' PIC. This small PIC becomes part of the 'temperature sensor module' attached to the generator. It reads the sensor, converts data as required, then sends it to the 'controller' PIC.
Each small PIC only needs to be 'calibrated' to the sensor once, The controller PIC always sees the same format or type of data from any/all generators. effectively you've got a small network of 5 slaves and one master. I'd probably use RS-485 for the interconnections.
This technique only cost you an extra $5 and allows any number of slaves to be added at any time. I've done it for 20 years without any problems.
Jay |
|
|
|