WorldWide Drilling Resource

You May Delay, but Time Will Not ~Benjamin Franklin by Britt Storkson Owner, P2FlowLLC The above quote is from Benjamin Franklin, who obviously knew the importance of time. Time governs everything in our lives whether we like it or not. Instead of groaning about the limitations time imposes upon us, let’s look at the positive aspects of time. Many culinary (food preparation) and industrial processes are timed, especially when heat is used. Too little time in the process and the product is unusable. We get the same thing with too much time. In addition, I believe it’s good practice to have almost everything turn off automatically at some point, for safety reasons if nothing else. I would rather have to turn something on again than deal with heat or other damage caused by a for- gotten clothes iron, electric blanket, or other out-of-control heat source. The same also goes for things like sprinkler and other watering systems as being dry is far better than flooding something. Microprocessors are great at timing things. The “heart” of a microprocessor is a timer of sorts called an oscillator or “clock” oscillator. It’s much like a heartbeat in the sense that while it does not pump a fluid like a heart, it switches on and off (oscillates) at a stable, controlled rate. This rate is measured in cycles per second or Hertz. The drawing illustrates a “clock” signal which simply goes from zero volts to a higher voltage (usually to 3-5 volts) and back to zero again. There are several types of oscillators from really cheap and not very accurate to much more expensive and highly accurate, especially over temperature and humidity variations. Often, we need a timing function, but we don’t need high accuracy. Say we want to turn off a clothes iron after 30 minutes of inactivity for safety reasons. Most likely, the user will not notice if the iron turns off after 22 minutes or 38 minutes of inactivity because the user will not know when the inactivity period starts. The critical issue is the iron turns off at some point - not exactly when it turns off. Other things need more accuracy, and the microprocessor can handle it too. As mentioned in a previous article, I made a pinewood derby timer for a church group one time and it had a resolution of 1/1000 of a second which eliminated any “ties”. For this, I used a highly accurate crystal oscillator and wrote the code instructions to update the timer 1000 times per second. When each pinewood derby car crossed the finish line, I simply “captured” what the timer value was at the time and stored the Storkson cont’d on page 60. 19 WorldWide Drilling Resource ® MARCH 2017

RkJQdWJsaXNoZXIy NDk4Mzk=