Archive for the ‘AVR/Arduino’ Category.

Interfacing HDC1050 with Arduino

Recently, I got my hands on TI‘s HDC1050 low power, high accuracy digital humidity/temperature sensor chip. The supply voltage of this chip can range between 2.7V and 5V, making it possible to interface with 5V MCUs such as Arduino directly. I created an Ardunio library for this sensor and will discuss its usage in this post. The code can be downloaded towards the end and can also be found on my GitHub page. Continue reading ‘Interfacing HDC1050 with Arduino’ »

Turn Your Android Phone into a Wireless Touchpad

In this blog post, I will show you a simple way of turning your Android phone into a wireless touchpad. For this to work all you need is your Android phone, an Arduino board and a HC-06 (or HC-05) bluetooth module based on BC417. A short demonstration video is included towards the end of the post. Continue reading ‘Turn Your Android Phone into a Wireless Touchpad’ »

Using Arduino Due’s True Random Number Generator

Arduino Due uses an Atmel SAM3X8E ARM Cortex-M3 CPU, which has a native hardware based True Random Number Generator (TRNG). In this post, we will take a brief look at how to use it in the Arduino environment and take a look at some of its statistical characteristics. Continue reading ‘Using Arduino Due’s True Random Number Generator’ »

On Arduino Due PWM Frequency

I just got myself a couple of Arduino Due boards. While they were released almost two years ago, I have not really got a chance to look at these until quite recently. Arduino Due is based on Atmel’s ATSAM3x8E 32-bit ARM Cortext-M3 processor. The processor core runs at 84 MHz, which is significantly faster than its 8-bit AVR counterpart ATmega328p which runs at 16 MHz. For an ATmega328p, the highest achievable PWM frequency is 8Mhz (square wave), so we should be able to generate much higher frequency signals on an Arduino Due. But how high can we go? Let’s find out. Continue reading ‘On Arduino Due PWM Frequency’ »

DS3232 Clock Frequency Calibration

DS3232 is an extremely accurate RTC with a guaranteed accuracy of 2.5 ppm (0 °C to 40 °C), which translates into an error of just 80 seconds over the course of a year under the worst case scenario. I had done a few projects using this chip before (you can read about them here). Continue reading ‘DS3232 Clock Frequency Calibration’ »

Backup and Flash Firmware using Arduino

A while ago, I did a tear-down of a Keithley 196 bench multimeter. Towards the end of that post I showed a picture of my breadboard setup for backing up the firmware EPROM (27128) in case I needed to re-flash the firmware in the future. Since then, quite a few people had asked me to provide more details on how to do this using an Arduino. So I thought I would explain a little more here. Continue reading ‘Backup and Flash Firmware using Arduino’ »

MCP3903 Library

MCP3903 is a six channel Delta-Sigma A/D converter. It features six synchronous sampling differential channels which can be programmed to sample between 16 bit and 24 bit accuracy, the gain for each channel can also be programmatically set from 1 up to 32. It also has an internal low tempco (5ppm/°C) voltage reference, making MCP3903 an excellent choice for digitizing small differential signals from various sensors. Continue reading ‘MCP3903 Library’ »

Modify An Off-the-Shelf CP2102 Module As An Arduino Programmer

A while back, I wrote an article on how to use a CP2102 USB/UART converter chip in place of an FT232RL to program an ATmega328P using Arduino bootloader. Of course, not everyone has the time or wants to build one from scratch. And since CP2102 is offered in QFN package only, it is a big pain to solder without a proper adapter board and decent soldering equipment. Continue reading ‘Modify An Off-the-Shelf CP2102 Module As An Arduino Programmer’ »

Arduino Library For LTC4151

LTC4151 is a high voltage I2C current and voltage monitor. It is capable of monitoring input voltage ranging from 7V to 80V with the onboard 12-bit ADC. It can also measure the high side current and an additional external voltage with the same 12-bit ADC resolution. Besides LTC4151, LTC4151-1 and LTC4151-2 have split SDA (SDAO and SDAI) for interfacing with Opto-Isolators. Continue reading ‘Arduino Library For LTC4151’ »

A Digital Thermometer Hygrometer With Analog Displays

It seems that you can’t visit to a microcontroller website without seeing a digital thermometer/hygrometer build of some kind. After all, it is pretty easy to build and at the same time quite useful as well. In this post, I will show you yet another thermometer/hygrometer build. But instead of using an LCD or 7 segment display for the output, I decided to go retro, using two “needles” to display the temperature and humidity readings instead. Continue reading ‘A Digital Thermometer Hygrometer With Analog Displays’ »

Extending DAC Resolution Using Digital Potentiometer

One way to extend the resolution of a digital-to-analog converter (DAC) is by employing a sigma-delta converter in software. The main disadvantage of such approach is the slow speed. Alternatively, we can use some extra hardware to extend the usable resolution of a DAC. In this post, I will illustrate one such method to extend an 8-bit DAC to 16 bits using a digital potentiometer. Continue reading ‘Extending DAC Resolution Using Digital Potentiometer’ »

Arduino Libraries Uploaded to GitHub

Over the years I have created quite a few libraries for Arduino. I finally uploaded them to GitHub a couple of days ago so that they are now all at one place and are easier to find. Continue reading ‘Arduino Libraries Uploaded to GitHub’ »

LM92 Library for Arduino

LM92 is a 12-bit + sign temperature sensor from Texas Instruments. This sensor operates on the I2C interface and can achieve an accuracy as high as ± 0.33 °C within the typical temperature measurement range. I created a comprehensive Arduino library for this sensor (the library can be downloaded towards the end) and in this post I will explain each of the functions in detail. Continue reading ‘LM92 Library for Arduino’ »

A Simple Serial Protocol

We can send and receive commands wirelessly with Arduino by using these cheap RF data link transmitters/receivers. I like these RF modules because they can be hooked up to pretty much any device that supports serial communications (e.g. devices equipped with either hardware or software UART). Continue reading ‘A Simple Serial Protocol’ »

A Digitally Controlled Dual Tracking Power Supply — II

In my previous post, I showed my design of a dual tracking ±30V linear power supply. My goal was to use the transformer (28V+28V, center tapped) from an old Deltron W127G open-frame power supply and build a lab supply that can be digitally adjusted in both constant voltage and constant current modes. I also wanted each of the channels to be able to deliver up to 10 Amps of current so that I could fully utilize the 540VA transfomer from the W127G. Continue reading ‘A Digitally Controlled Dual Tracking Power Supply — II’ »