Free Trials

Download a free trial to find out which Altium software best suits your needs

How to Buy

Contact your local sales office to get started on improving your design environment

Downloads

Download the latest in PCB design and EDA software

  • PCB DESIGN SOFTWARE
  • Altium Designer

    Complete Environment for Schematic + Layout

  • CircuitStudio

    Entry Level, Professional PCB Design Tool

  • CircuitMaker

    Community Based PCB Design Tool

  • NEXUS

    Agile PCB Design For Teams

  • CLOUD PLATFORM
  • Altium 365

    Connecting PCB Design to the Manufacturing Floor

  • COMPONENT MANAGEMENT
  • Altium Concord Pro

    Complete Solution for Library Management

  • Octopart

    Extensive, Easy-to-Use Component Database

  • PRODUCT EXTENSIONS
  • PDN Analyzer

    Natural and Effortless Power Distribution Network Analysis

  • See All Extensions
  • EMBEDDED
  • TASKING

    World-Renowned Technology for Embedded Systems Development

  • TRAININGS
  • Live Courses

    Learn best practices with instructional training available worldwide

  • On-Demand Courses

    Gain comprehensive knowledge without leaving your home or office

  • ONLINE VIEWER
  • Altium 365 Viewer

    View & Share electronic designs in your browser

  • Altium Designer 20

    The most powerful, modern and easy-to-use PCB design tool for professional use

    ALTIUMLIVE

    Annual PCB Design Summit

    • Forum

      Where Altium users and enthusiasts can interact with each other

    • Blog

      Our blog about things that interest us and hopefully you too

    • Ideas

      Submit ideas and vote for new features you want in Altium tools

    • Bug Crunch

      Help make the software better by submitting bugs and voting on what's important

    • Wall

      A stream of events on AltiumLive you follow by participating in or subscribing to

    • Beta Program

      Information about participating in our Beta program and getting early access to Altium tools

    All Resources

    Explore the latest content from blog posts to social media and technical white papers gathered together for your convenience

    Downloads

    Take a look at what download options are available to best suit your needs

    How to Buy

    Contact your local sales office to get started improving your design environment

    • Documentation

      The documentation area is where you can find extensive, versioned information about our software online, for free.

    • Training & Events

      View the schedule and register for training events all around the world and online

    • Design Content

      Browse our vast library of free design content including components, templates and reference designs

    • Webinars

      Attend a live webinar online or get instant access to our on demand series of webinars

    • Support

      Get your questions answered with our variety of direct support and self-service options

    • Technical Papers

      Stay up to date with the latest technology and industry trends with our complete collection of technical white papers.

    • Video Library

      Quick and to-the-point video tutorials to get you started with Altium Designer

    Why You Should Incorporate Digital Input Sampling in Your Embedded System

    September 29, 2017

    cheese samples

    I particularly enjoy shopping in the supermarket on the weekend. In the grocery section, there are samples of various food products that range from tuna spread to white coffee. While I enjoy hopping from one sample stations to another, my 5 years old son shamelessly always asks for a second helping.

    In electronics, sampling carries a different meaning than leisurely eating a variety of snacks. In an embedded system, digital input signals play an important role in telling the system what is the next course of action. I realized how important digital input sampling is when a vehicle parking machine that I was servicing decided to slam down the automatic barrier on a luxury car before it passes through. This is how you can use digital input sampling to avoid having to deal with these sorts of scenarios.

    What Is Input Sampling And Why It’s Important

    The first signal sampling concept that I picked up in my college days is the Nyquist Sampling Theorem, where a bandlimited signal can be reconstructed when it is sampled by at least twice of its original frequency. In my design, I find this approach helpful, not in reconstructing waveforms but in eliminating my systems from behaving erratically. 

    Theoretically, digital signals are translated to logic 1 and 0. In an embedded system, they are often represented by a voltage value. If a microcontroller operates at 3.3V, logic 1 will be 3.3V and logic 0 will be at 0V. On paper, these logic level looks like a perfect horizontal line that runs continuously until the logic state changes. In reality, these signals are often punctuated by electrical noises that cause sudden spike or drop in voltage level.

    In an auto payment parking system, there are automatic barriers on the entrance and exit in a designated parking area. Drivers usually access these areas by retrieving a ticket from the machines or by flashing a proximity card. The parking machines that guard the entrance and exit are equipped with vehicle detectors. These detectors use logic levels to indicate the presence of a vehicle in its sensing area.

    In the case where the automatic barrier came down on the luxury car, the system falsely detected a negative signal from the entrance detector when the vehicle was passing through. It closed the barrier while the vehicle was under it. When this incident repeated itself in a few different sites, I requested to look into the firmware for the machines. I realized, in horror, that the decision to close the barrier was being made by evaluating a single instance of the vehicle detector’s signal.

    Parking garage barrier
    The last thing you want is for the automatic barrier to slam on your car, just because it falsely believe your car has passed through.

    How To Sample Digital Inputs In An Embedded System

    Generally, digital sampling involves capturing the value of a signal at a specific interval and storing it in a cyclic buffer. A cyclic buffer is a method of buffering in microcontrollers. A value is stored as a variable array in the Static Random Access Memory (SRAM) and when it reaches its end, it overwrites at the beginning. Depending on the application, a number of samples could vary between 5 to 10, with a sampling period of 1 millisecond.

    Using this method, the microcontroller has more than one value to base its next action in its logic algorithm. In the case of electrical noises in the vehicle detector, the microcontroller may get one false value reading out of 10 samples, and prevent closing the automatic barrier before the car passes through. In critical applications, the programmer can make even stricter requirements for evaluating samples. This is done by requiring all of the samples to have the same logic before proceeding with the algorithm.

    person coding at computer
    Implementing digital sampling in firmware is easy, and they stabilize the system effectively.

    In my situation with the parking system, I made a quick fix to the firmware that incorporated this straightforward sampling method. That way the problematic parking system couldn’t inflict more damage on other vehicles, When the updated firmware was deployed, the parking machines stopped closing the barrier unpredictably. Of course, it goes without saying that digital sampling within the firmware can be less effective if the PCB itself was not properly designed with signal integrity in mind.

    Since parking machines need to operate reliably in a robust environment and can experience heavy usage, stability and durability are both important design criteria. I’ve since upgraded designs using circuit design software, like Altium Designer and Altium’s CircuitStudio, and keep high-speed signals away from critical digital inputs with its routing design rules. 

    Have questions about increasing the reliability of your embedded system with digital sampling? Talk to our experts at Altium now.

    Check out Altium Designer in action...

    Powerful PCB Design

    most recent articles

    Back to Home