Thermistor signal conditioning: Dos and Don'ts, Tips and Tricks
In an earlier blog entry, I mentioned this circuit for thermistor signal conditioning:
It is worth a little more explanation on thermistor signal conditioning; it's something that's often done poorly, whereas it's among the easiest applications for signal conditioning.
The basic premise here is that there are two resistors in a voltage divider: Rth is the thermistor, and Rref is a reference resistor. Here Rref is either R3 alone, or R3 || R4, depending on the gain...
Real-time clocks: Does anybody really know what time it is?
We recently started writing software to make use of a real-time clock IC, and found to our chagrin that the chip was missing a rather useful function, namely elapsed time in seconds since the standard epoch (January 1, 1970, midnight UTC).Let me back up a second.A real-time clock/calendar (RTC) is a micropower chip that has an oscillator on it that keeps counting time, independent of main system power. Usually this is done with a lithium battery that can power the RTC for years, so that even...
VHDL tutorial - A practical example - part 2 - VHDL coding
In part 1 of this series we focused on the hardware design, including some of the VHDL definitions of the I/O characteristics of the CPLD part. In part 2, we will describe the VHDL logic of the CPLD for this design.
With any design, the first step to gather the requirements for the job at hand. From part 1 of this article, I have copied two sections that address some of the requirements for the CPLD design.
The data acquisition engine has the...
Tracing code and checking timings
Debugging resource limited systemsApplications writers that write code on large systems have it easy. Well, perhaps not easy, but certainly easier. There are some things that they don't have to worry about and there is a huge array of tools available to them when it comes time to debug. The have choices in their toolsets, lots of choices. They also have a large selection of available methods for getting debugging information out to them such as log files, proc entries, pop up dialog boxes or...
VHDL tutorial - A practical example - part 1 - Hardware
In previous posts I described some simple VHDL examples. This time let's try something a little more complex. This is part one of a multiple part article. This is intended to be a detailed description of one of several initial designs that I developed for a client. This design never made it into a product, but a similar design was used and is currently being produced. As a considerable amount of work was put into this effort, I decided to share this design...
Byte and Switch (Part 1)
Imagine for a minute you have an electromagnet, and a microcontroller, and you want to use the microcontroller to turn the electromagnet on and off. Sounds pretty typical, right?We ask this question on our interviews of entry-level electrical engineers: what do you put between the microcontroller and the electromagnet?We used to think this kind of question was too easy, but there are a surprising number of subtleties here (and maybe a surprising number of job candidates that were missing...
Good old multiplexed keypad in an embedded system
Good old multiplexed keypad in embedded systems
(My www.embeddedrelated.com Blog No.1)
Touch-screens, rotary encoder switches and other navigational aids rule the user interface these days. Navigation through menus and sub-menus is child’s play as icons and thumbnails rule the screen.
Jumping from one screen to another, switching between programs and event notification pop-ups are made possible due to high...
VHDL tutorial - Creating a hierarchical design
In earlier blog entries I introduced some of the basic VHDL concepts. First, developing a function ('VHDL tutorial') and later verifying and refining it ('VHDL tutorial - part 2 - Testbench' and 'VHDL tutorial - combining clocked and sequential logic'). In this entry I will describe how to...
VHDL tutorial - combining clocked and sequential logic
In an earlier article on VHDL programming ("VHDL tutorial" and "VHDL tutorial - part 2 - Testbench", I described a design for providing a programmable clock divider for a ADC sequencer. In this example, I showed how to generate a clock signal (ADCClk), that was to be programmable over a series of fixed rates (20MHz, 10MHz, 4MHz, 2MHz, 1MHz and 400KHz), given a master clock rate of 40MHz. A reader of that article had written to ask if it was possible to extend the design to...
Designing Embedded Systems with FPGA-2
In last part, we created hardware design of basic system. The next step is to generate (compile) hardware design. Compiled hardware design is known as bit-stream andstored in *.bit file. To compile hardware, use hardware->generate hardware tab. The complete hardware design generation takes several seconds to several minutes depending on computer speed and design complexity. In back ground, the whole design process involves many different steps including synthesis, placement, routing and...
Arduino robotics #3 - wiring, coding and a test run
Arduino RoboticsArduino robotics is a series of article chronicling my first autonomous robot build, Clusterbot. This build is meant to be affordable, relatively easy and instructive. The total cost of the build is around $50.
1. Arduino robotics - motor control2. Arduino robotics - chassis, locomotion and power3. Arduino robotics - wiring, coding and a test run4.NXP LPC17xx/40xx: Decoding the Part ID
This is the first blog of a number dealing with the NXP LPC17xx/40xx processor families and how to program them despite the lack of documentation. The next blog will deal with implementing the LPC17xx/40xx UART with interrupts properly, and a subsequent blog will show how to use the UART in RS485 Normal Multidrop Mode (NMM) with Auto Address Detection (AAD).
My company has decided on using the NXP LPC17xx/40xx processor line for all our embedded projects. Since...
An Introduction to Embedded Development
This blog is a series to provide an introduction to embedded development for the aspiring embedded developer. No prior embedded development experience will be assumed, but you should have a reasonable understanding of the C language and knowledge of basic electronics. It will focus on the TI MSP430, but present topics in a generic way that can be easily translated to other processors. Welcome!Hello, and welcome to my blog! This blog will be somewhat different from most...
Deeply embedded design example - Logic replacement
I have always believed that some of the low-cost, low-pin count, low-resource microprocessors would make an excellent choice for the replacement of discrete logic components. In these cases the deeply embedded microprocessor would become less of a general purpose computer and more of a logic replacement, providing a prescribed function with no connection to the outside world. In a world of bigger, faster and more expensive, it is a pleasant change of pace...
Good old multiplexed keypad in an embedded system
Good old multiplexed keypad in embedded systems
(My www.embeddedrelated.com Blog No.1)
Touch-screens, rotary encoder switches and other navigational aids rule the user interface these days. Navigation through menus and sub-menus is child’s play as icons and thumbnails rule the screen.
Jumping from one screen to another, switching between programs and event notification pop-ups are made possible due to high...
C++ on microcontrollers 3 – a first shot at an hc595 class with 8 output pins
This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers. Reader input is very much appreciated, you might even steer me in the direction you find most interesting.
In the first part of...
Embedded Software Creation II - European Normative & Legislation
In this post I will explain the European Normative. I will answer the main questions and I will be open to answer all the doubts any of you could have. Please leave a comment and I will answer if i could.
Why I need to look and accomplish some standards?The main reason is if you want to comercialize the product in the European Union, if exists any European Directive that cover the product, the product must be marked with the CE mark. For USA it work in the same way by the...
Making a connection 1
In order for your system to control devices, you must be able to connect it to those devices.
Besides different sizes based on wire size, there are a few different styles of connectors that can be used. There are also weather-resistant terminals that can be used if needed.
Ring
(Parks, 16)
- used for circuits that you don’t want to become easily disconnected
- ground wire attached to a stud
Push-On
- can be used on relay terminals
(Parks, 18)
- could be...
Intro to Microcontrollers Part 2: AVR Microcontrollers
IntroductionThis is part 2 of my playing around with AVR microcontrollers. Last time, I had a basic setup which could program an AVR using the Arduino ISP. I used it to drive a simple 7-segment, multiplexed 4-digit LED display. This is a follow up where I try out some of the other features the ATTiny24A has to offer. I also decided to invest some money in an AVR Dragon programmer/debugger so I'll go over some basic playing and setup with this device. I'll also discuss some of the problems...
Kind of Buggy! The state machine fantastic//
Over the years, I have had the opportunity to experience a lot of different kinds of coding mistakes. There were many that most programmers are familiar with, counting errors, indexing errors (the infamous 'off by one' bug), memory space sharing errors (A threading issue) as well as numerous others. I ran into one recently that I wound up using an old trick to help find.
My current project is a Pan/Tilt camera that was, upon occasion, not homing properly in one axis. The camera is a...
Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image
In the previous article (https://www.embeddedrelated.com/showarticle/1524.p...) we saw how to run NuttX RTOS using the SIMulator. Today we will see how NuttX's directory tree is organized and how to use the menuconfig to enable some applications, including some tricks to search and solve dependencies.
NuttX Directories organization:
If you have previously compiled the Linux kernel or the U-Boot bootloader you will see that the NuttX source tree organization is...
When a Mongoose met a MicroPython, part I
This is more a framework than an actual application, with it you can integrate MicroPython and Cesanta's Mongoose.
Mongoose runs when called by MicroPython and is able to run Python functions as callbacks for the events you decide in your event handler. The code is completely written in C, except for the example Python callback functions, of course. To try it, you can just build this example on a Linux machine, and, with just a small tweak, you can also run it on any ESP32 board.
Embedded Software Creation II - European Normative & Legislation
In this post I will explain the European Normative. I will answer the main questions and I will be open to answer all the doubts any of you could have. Please leave a comment and I will answer if i could.
Why I need to look and accomplish some standards?The main reason is if you want to comercialize the product in the European Union, if exists any European Directive that cover the product, the product must be marked with the CE mark. For USA it work in the same way by the...
Tracing code and checking timings
Debugging resource limited systemsApplications writers that write code on large systems have it easy. Well, perhaps not easy, but certainly easier. There are some things that they don't have to worry about and there is a huge array of tools available to them when it comes time to debug. The have choices in their toolsets, lots of choices. They also have a large selection of available methods for getting debugging information out to them such as log files, proc entries, pop up dialog boxes or...
Handling Translations in an Embedded Project
A brief walkthrough on how to handle human language translations in a low level C application. Some options are listed, each with advantages and disadvantages laid out.
Bellegram, a wireless DIY doorbell that sends you a Telegram message
A wireless button that uses the M5 STAMP PICO and Mongoose to send a Telegram message when pressed. The code is written in C
Understanding Yocto Project Layers: A Modular Approach to Embedded Systems Development
In the world of embedded systems, flexibility and modularity are key to managing complex projects efficiently. The Yocto Project, a powerful build system for creating custom Linux distributions, embraces this philosophy through the use of layers. These layers are essentially sets of repositories that contain the instructions and metadata required to build a specific target image. By leveraging layers, developers can modularize their projects, reusing and sharing previously developed metadata...
Layout recomendations and tips for best performance against EMC
When making the layout of the circuit diagram, it is interesting to perform a preliminary analysis of several issues in order to minimize problems arising from electromagnetic compatibility.The analysis consists in:
Identify / Analyze components: This section will analyze the integrated components, as well as any recommendations it may have the manufacturer. We must also analyze the encapsulation possibilities which have the component.
When a Mongoose met a MicroPython, part II
In the first part of this blog, we introduced this little framework to integrate MicroPython and Cesanta's Mongoose; where Mongoose runs when called by MicroPython and is able to run Python functions as callbacks for the events you decide in your event handler. Now we add MQTT to the equation, so we can subscribe to topics and publish messages right from MicroPython.
Intro to Microcontrollers Part 2: AVR Microcontrollers
IntroductionThis is part 2 of my playing around with AVR microcontrollers. Last time, I had a basic setup which could program an AVR using the Arduino ISP. I used it to drive a simple 7-segment, multiplexed 4-digit LED display. This is a follow up where I try out some of the other features the ATTiny24A has to offer. I also decided to invest some money in an AVR Dragon programmer/debugger so I'll go over some basic playing and setup with this device. I'll also discuss some of the problems...