|
||||||
You may redistribute this newsletter for non-commercial purposes. For commercial use contact jack@ganssle.com. To subscribe or unsubscribe go here or drop Jack an email. |
||||||
Contents | ||||||
Editor's Notes | ||||||
Over 400 companies and more than 7000 engineers have benefited from my Better Firmware Faster seminar held on-site, at their companies. Want to crank up your productivity and decrease shipped bugs? Spend a day with me learning how to debug your development processes. Attendees have blogged about the seminar, for example, here, here and here. Jack's latest blog: On Retiring |
||||||
Quotes and Thoughts | ||||||
You'll always get the good news; it's how quickly your get the bad news that counts. Harvey Mackay |
||||||
Tools and Tips | ||||||
Please submit clever ideas or thoughts about tools, techniques and resources you love or hate. Here are the tool reviews submitted in the past. Bryce Deary likes Ceedling:
Joe Szedula had an idea about watchdogs:
Clyde Shappee wrote that if you download a trial of OrCAD you get on their email list, and occasionally they offer a deep discount on that CAD tool. |
||||||
Freebies and Discounts | ||||||
This month's giveaway is an Amazon Echo Show 5. Enter via this link. |
||||||
A Low-Cost Performance Analyzer Upgrade | ||||||
Joe Szedula, who contributed his thoughts on watchdogs (above), also had an idea for a poor-person's performance analyzer, derived from my thoughts on the subject here. Inspired by:
Notes:
|
||||||
Jon Fuge suggested using a FET for protecting against a battery being installed backwards:
Bing Huang sent a reference to a very interesting patent for a socket that allows an AA or AAA to be inserted in either direction, yet still power a system:
Frequent correspondent Clyde Shappee had some good data:
Clyde also mentioned an insidious sneak circuit he found in an MCU. If the batteries in a system were inserted backwards, some 4A were drawn through ESD protection diodes in the MCU's ADC input! |
||||||
Encoders | ||||||
I've been getting a lot of inquiries about using shaft encoders lately. Here's an overview, which is probably not complete as there are so many products available today. An encoder gives position information about a rotating mechanical shaft. An example is a volume control on a radio. In the old days we used potentiometers - variable resistors - to set the gain of the amplifier. Today it's more likely an encoder would translate the position of the shaft (the volume knob) into something an MCU can understand. With a pot there's a mechanical stop at the low and high ends of travel. If there's no stop, an encoder is likely used. Encoders come in many flavors:
Their outputs are equally diverse:
Incremental and quadrature encoders have one innate flaw: You can't translate the outputs to an absolute position. So some of these also sport an "index" pulse, which is a separate signal that is asserted once per revolution. Typically, in manufacturing a technician rotates the encoder to generate the index pulse at some pre-determined position. From that it's possible to figure absolute position (e.g., with an incremental encoder that generates 1000 PPR, if 500 pulses have been detected after the index signal, then the shaft is 180 degrees from the calibrated index position). Pulses per revolution vary from just a few to 65,536. (That puppy will set you back over $1000, and outputs 16 bits of Gray code). The cheapest encoders are a half-buck or so in singles and are generally quadrature versions. These offer a dozen or two PPR and are often found as controls, like for the volume control on a radio. Others are more capable; Digikey lists one QE with 6000 PPR for only (!) $3700. What does a quadrature encoder's output look like? Here's an example: Instead of going into some depth about using a quadrature encoder, check out this excellent reference which includes sample code. Some MCUs have peripherals that handle quadrature encoders directly. For instance, Microchip offers their Quadrature Encoder Interface, which looks like: The digital filters remove glitches from mechanical encoders. Microchip has a good reference about this peripheral here. It is possible to have custom encoders made. In one case we had data coming in spaced at sin2 of the shaft angle. One could use a very high-resolution encoder and interpolate, but the interrupt rate would be astronomical. Instead, we had an encoder made which gave us pulses spaced at sin2 intervals.
|
||||||
Jobs! | ||||||
Let me know if you’re hiring embedded engineers. No recruiters please, and I reserve the right to edit ads to fit the format and intent of this newsletter. Please keep it to 100 words. There is no charge for a job ad.
|
||||||
Joke For The Week | ||||||
These jokes are archived here. Machines don't save you from doing more labor, they just save your employers from paying for more labor. |
||||||
About The Embedded Muse | ||||||
The Embedded Muse is Jack Ganssle's newsletter. Send complaints, comments, and contributions to me at jack@ganssle.com. The Embedded Muse is supported by The Ganssle Group, whose mission is to help embedded folks get better products to market faster. |