APP NOTE: make an analog to digital converter using FPGA pins

A differential pin pair can be used as a comparator to create a basic ADC. This app note shows how to design a low speed (1 KHz) and “high” speed (50 Khz) ADC technique using only FPGA pins, a resistor and a capacitor. Regardless of whether we ever use this technique, it is illuminating to understand how SAR and Delta Sigma ADCs are constructed:

A simple Analog to Digital Converter can be constructed by adding a small RC circuit to an LVDS input on an FPGA or CPLD…. The LVDS input will act as a simple analog comparator and will output a digital ‘1’ if the Analog Input voltage is higher than the voltage from the RC network. By changing the voltage on the input to the RC circuit, the LVDS comparator can be used to analyze the Analog Input voltage to create an accurate digital representation… A low frequency signal can be processed using a simple Successive Approximation Register… A higher frequency implementation…can be implemented using a Delta Sigma Modulator function, which consists of a sampling register and a Cascade Integrated Comb (CIC) Filter.

Lattice Semiconductor

Via ferdinandk in the forum.

BUS PIRATE: ADS7042 Analog to Digital Converter chip

Source: ADS7041 datasheet

In Bus Pirate prototype “Ultra” v1b we added analog voltage measurement to all the IO pins using a 74HCT4051 8:1 analog multiplexer and an op-amp. In the next revision we’re moving control of as many peripherals as possible into the FPGA. The FPGA doesn’t have an Analog to Digital Converter feature, so we need to add an external ADC chip.

We chose ADS7041/ADS7042 10/12 bit ADCs capable of 1MSPS with an SPI interface. The 12 bit version is $1.75 in 100s, the 10 bit version is slightly cheaper ($1.06). The 10 and 12 bit versions are pin-compatible. We’ll try both and decide later what works best.

There are much cheaper SPI ADCs, but for around a dollar this chip does 1 MSPS with a simple 3 wire interface. That’s the same top speed as the DSO Nano v3, so we can record samples in the two SRAMs and have a very minimal oscilloscope function on any IO pin.

Source: ADS7041 datasheet

The interface is read-only and doesn’t have any registers to configure, that’ll keep it simple to work with from the FPGA. Each conversion begins with two clock ticks, then the 10 or 12 bit reading follows. The maximum clock speed is 14MHz to achieve 1MSPS, easy to do with the FPGA.

This post is just a quick followup to yesterday’s look at three Digital to Analog Converter chips.

A touch numeric keyboard for Arduino or Teensy

Teensykeyb

Giovanni Carrera blogged about his touch numeric keyboard for Arduino or Teensy:

Very often, for our programs, we need a system to set parameters, usually of a numerical type. A 4×4 keyboard requires some space and then we also need a display. Here is the idea of using a touchscreen display to do both. I have then written the GetNum function that allows you to print a prompt message and to type an integer number. To test this function I wrote a simple analog data logger program that required two parameters, the first is the sampling period and the second the number of samples. In this example the number of channels to be scanned is set to three, but the program can be modified to request a third parameter with the number of channels.

See the full post on ArduPicLab blog.

App note: ASIC fixes for noisy analog “Oops”

an_maxim_an5554

App note from Maxim Integrated about simple fixes that can solve most issues when designing with ASICs. Link here (PDF)

Noise is a common problem in mixed-signal ASICs, degrading performance and jeopardizing the completion of products. This application note gives hints and tips for adding external circuits that make many of these ASICs operational for prototyping or shippable as final products. Ways to optimize the ASIC by correcting noise in analog circuits, making adjustments, calibrating gain and offset, and cleaning power sources are discussed. The payoff is quicker time to market and even the prevention of an extra ASIC manufacturing spin.

Adding ADC to Microcontrollers without ADC

pic-testrig-1-600

Scott Harden writes:

I recently had the need to carefully measure a voltage with a microcontroller which lacks an analog-to-digital converter (ADC), and I hacked together a quick and dirty method to do just this using a comparator, two transistors, and a few passives. The purpose of this project is to make a crystal oven controller at absolute minimal cost with minimal complexity. Absolute voltage accuracy is not of high concern (i.e., holding temperature to 50.00 C) but precision is the primary goal (i.e., hold it within 0.01 C of an arbitrary target I set somewhere around 50 C).

More details at Scott Harden’s blog.

App note: Interfacing AT84AD001B dual 8-bit 1 Gsps ADC and AVR ATmega128L

an_e2v_doc0928B

e2v’s application note interfacing their 1 Gsps 8-bit ADC to AVR. Link here (PDF)

With its smart feature (3-wire serial interface), e2v’s AT84AD001B dual 8-bit 1 Gsps ADC provides you with digital control over various functions offered with the dual ADC: calibration, gain and offset adjustments, DMUX ratio selection, analog and clock input mode, and partial or full standby mode.

This digital control via the 3-wire serial interface can be managed using Atmel’s ATmega128L AVR. The aim of this application note is to provide you with the relevant information for interfacing these two devices.

App note: Peak-to-peak resolution versus effective resolution

an_ad_an615

Effective resolution is superior compared to peak-to-peak resolution when comparing ADCs from different companies. An application note from Analog Devices. Link here (PDF)

The low bandwidth, high resolution ADCs have a resolution of 16 bits or 24 bits. However, the effective number of bits of a device is limited by noise. This varies depending on the output word rate and the gain setting used. This parameter is specified by some companies as effective resolution. Analog Devices specifies peak-to-peak resolution, which is the number of flicker-free bits and is calculated differently from effective resolution. This application note distinguishes between peak-to-peak resolution and effective resolution.