Sorry if this is boring, but this serves as a nice little development blog for me to refer to and to "talk" things out with myself. I've really been hammering this thing with code for the past few days. I really can't think of anything else that anyone would want for it at the moment. If you guys want something, let me know. I'll give a brief rundown of the functionality in a bit.
I was thinking the other day, and I realized that I never implemented a way to silence the alarm when it starts going off. The user should be able to acknowledge it and go on with their lives until the next alarm even comes about. It isn't really as simple as just silencing it though... because it should be able to activate again when the temperature goes over the limit again. The problem is that usually when the temperature goes over the alarm setpoint, it will take a little while to come back down. Even though these thermocouples react quite quickly, there is some considerable thermal mass surrounding them, and if you get the exhaust REALLY hot, the alarm might just come right back on again as soon as you silence it. That would be infuriating!
I could have just set a timer so that the alarm stays deactivated for a period of time (like a minute) so that the sensor would have a chance to cool off before being set off again. BUT that would kinda suck because if you silence the alarm and then decide to keep driving hard, the alarm would come right back on again after one minute.
So I decided that it should only come back on after a minute IF all of the temperatures drop below the alarm set point and then go back over it. I think that is a pretty solid scheme.
So, the fully-implemented feature set to date is:
-Menu with several features easily accessed and adjusted with only two buttons
-Automatic thermocouple (TC) detection (will list the number of TCs connected and their locations. Also only displays temperature readings on the LCD from TCs if they are connected)
-TC failure detection (will not be detected at startup if failed at or before startup, and will go to the max value of 1832F (1000C) while under operation (thus setting off the alarm)
-Peak and hold function - just press one button while the display is in normal operation to see the peak temperatures from the run (peaks are not stored after a power cycle... if there is a need or want for this, I can make that work easily). Just press the same button again to exit the peak and hold feature.
-User alarm temperature can be set anywhere from 1000 - 1800 F (537 C to 982C) in 50 F (~27 C) increments. I'll probably make the C temperatures more user friendly (more normal numbers) next. If you want more increments or a wider range let me know, but it is already 16 presses to cycle through those temperature ranges. This alarm sets off a 5V output to an ECU, buzzer, or anything else you want to control with it. As mentioned above, it is now able to be acknowledged by the user also to avoid having to just set the temperature higher to get the alarm to turn off in the event of an over-temperature condition.
-Celsius or Fahrenheit selectable for entire gauge functionality (display in F or C and alarms automatically carry over to the correct temperature in C or F)
-Backlight color selectable using the RGB scale (if you get order an RGB backlight with it). The user can select values for R, G, and B anywhere from 0-255 (the full scale for each color) in 25 point increments. This should be enough to make any color you want. If more adjust-ability is needed, this can easily be changed later.
-Overall maximum brightness of the display is user settable (1-10) independent of the RGB settings. So you can have it any color you want, at a clamped maximum brightness. That means if the display is too bright or dark compared to the other things on your dimmer switch, you can dim it in the software as needed, all while retaining the color you've selected for the backlight. That's easier said than done. If 0-10 isn't enough, I can add more adjustability, but I tried to keep things easy and quick to cycle through.
-Contrast is selectable (0-20). This makes the LCD easy to view from ANY angle.
I suppose that's it. It's amazing how much work goes into making a "simple" gauge like this! I knew I was in for a challenge, and I knew I could do it, but I didn't really figure on it requiring so much code haha.
All of the stuff I bought to package this thing hardware-wise has shipped, so hopefully I'll be able to bring it to the rig with me and work on it there (I've been in Houston for the past 5 weeks for training).
