[Carlos] needed an ADC with a 50 nanosecond sample period for his laser lab, that’s 20Msps! (20 million samples a second). While in recent years, commodity ADCs reaching into the low GSPS have become available, integrated acquisition systems are still somewhat expensive. So [Carlos] decided to do what every good hacker does, and built his own solution. His project post pretty much just links to a whitepaper he wrote (PDF) so we’ll try and boil it down for you:
In order to simplify development [Carlos] borrowed a technique commonly used in the first era of digital oscilloscopes, Equivalent Sampling Time.
The figure to the right is from the TDS460 manual. While it may seem counter intuitive to those only familiar with modern scopes, the TDS460 achieved a 400MHz bandwidth using a 100MSPS ADC. In order to achieve this the scope acquires a single trace in multiple cycles, each time offsetting the acquisitions as shown and combining the result.
In this way, early digital scope developers could sidestep the limitations of the available ADCs to achieve a higher effective bandwidth. However there is of course one catch: the technique only works for periodic signals.
This was fine for [Carlos] who implemented a technique on a Cypress PSoC 4, which provides analog FPGA-like functionality. By offsetting the ADC trigger he has able to achieve an EST of 48MHz using a ADC sampling at 1MHz. If you want a little help getting into PSOC 4 yourself, check out the guide that [Bil Herd] made.
Neat hack [Carlos] and we hope to hear more about your laser lab in the future.
We can commiserate with [HardwareCoder] who would rather not leave his PC speakers on all the time. The Creative T20 set that he uses turn off when you turn the volume knob all the way down until it clicks. So shutting them off means repositioning the volume each time they’re switched on again. This hack kills two birds with one stone by turning on and off automatically without touching that knob.
The system is based around an ATtiny45 and a few other simple components. It uses two ADCs to monitor the rear input channels of the PC speakers. If no sound is detected for more than one minute, the shutdown pin of the speakers’ amp chip is triggered. That’s not quite where the hack ends. We mentioned it monitors the rear input of the speakers, but it doesn’t monitor the front AUX input. An additional push button is used to disable the auto-sleep when using this front input. There is also a fancy PWM-based heartbeat on an LED when the speakers are sleeping.
[HardwareCoder] was worried that we wouldn’t be interested in this since it’s quite similar to a hack we ran a few years ago. We hope you’ll agree it’s worth another look. He also warned us that the demo video was boring. We watched it all anyway and can confirm that there’s not much action there but we embedded it below anyway.
Continue reading “Auto-sleep Hacked in PC Speakers”
It’s a counterintuitive result that you might need to add noise to an input signal to get the full benefits from oversampling in analog to digital conversion. [Paul Allen] steps us through a simple demonstration of why this works on his blog. If you’re curious about oversampling, it’s a good read.
Oversampling helps to reduce quantization noise, which is the sampling equivalent of rounding error. In [Paul’s] one-bit ADC example, the two available output values are zero volts and one volt. Any analog signal between these two values is rounded off to either zero or one, and the resulting difference is the quantization error.
In oversampling, instead of taking the bare minimum number of samples you need you take extra samples and average them together. But as [Paul] demonstrates, this only works if you’ve got enough noise in the system already. If you don’t, you can actually make your output more accurate by adding noise on the input. That’s the counterintuitive bit.
We like the way he’s reduced the example to the absolute minimum. Instead of demonstrating how 16x oversampling can add two bits of resolution to your 10-bit ADC, it’s a lot clearer with the one-bit example.
[Paul’s] demo is great because it makes a strange idea obvious. But it got us just far enough to ask ourselves how much noise is required in the system for oversampling to help in reducing quantization noise. And just how much oversampling is necessary to improve the result by a given number of bits? (The answers are: at least one bit’s worth of noise and 22B, respectively, but we’d love to see this covered intuitively.) We’re waiting for the next installment, or maybe you can try your luck in the comment section.
[Andy] had the idea of turning a mixing desk into a MIDI controller. At first glance, this idea seems extremely practical – mixers are a great way to get a lot of dials and faders in a cheap, compact, and robust enclosure. Exactly how you turn a mixer into a MIDI device is what’s important. This build might not be the most efficient, but it does have the best name ever: digital to analog to digital to analog to digital conversion.
The process starts by generating a sine wave on an Arduino with some direct digital synthesis. A 480 Hz square wave is generated on an ATTiny85. Both of these signals are then fed into a 74LS08 AND gate. According to the schematic [Andy] posted, these signals are going into two different gates, with the other input of the gate pulled high. The output of the gate is then sent through a pair of resistors and combined to the ‘audio out’ signal. [Andy] says this is ‘spine-crawling’ for people who do this professionally. If anyone knows what this part of the circuit actually does, please leave a note in the comments.
The signal from the AND gates is then fed into the mixer and sent out to the analog input of another Arduino. This Arduino converts the audio coming out of the mixer to frequencies using a Fast Hartley Transform. With a binary representation of what’s happening inside the mixer, [Andy] has something that can be converted into MIDI.
[Andy] put up a demo of this circuit working. He’s connected the MIDI out to Abelton and can modify MIDI parameters using an audio mixer. Video of that below if you’re still trying to wrap your head around this one.
Continue reading “Digital to Analog to Digital to Analog to Digital Conversion”
The typical way of doing a low battery detector is throwing a comparator in the circuit, setting it to measure a certain threshold voltage, and sending that signal off to a microcontroller or other circuit to notify someone the battery is going dead. [Josh] has a simpler way using an 8-bit AVR and zero other parts.
The chip [Josh] is using is the ATtiny84. The ADC in this chip is usually used to measure an unknown voltage against a reference voltage. The trick [Josh] is using is to do this in reverse: The internal 1.1 Volt reference voltage is measured against an unknown scale, namely the input voltage.
The value provided by the ADC on the chip will always be Vin times 1024 over the reference voltage. Since Vin will be 1.1 V in this case, the ADC value is known, it’s only a matter of doing some 6th grade algebra to determine the value of the input voltage.
[Josh] put together a small demonstration where the chip blinks out the number of volts its receiving from a bench power supply. By blinking a LED, it can blink out the current value of VCC as integers, but by using this technique you should be able to get a fairly fine-grained reading of what VCC actually is. Video below.
Continue reading “Adding a Battery Gauge to a Project With Zero Parts”
Way back when most of our demographic was in diapers, engineering workstations had huge touchscreens for plotting drawings in CAD programs, drawing, and just about everything a Wacom tablet does today. Finding one of these touch pads now is a fool’s errand, more so than finding the computer it was attached to, but [Daniel] figured out a way to relive those days of large touchpads and old computers with a resistive touchscreen and an MSX computer (portuguese, google translatrix).
[Daniel] is using a touchscreen normally used for a monitor, and with the right bit of code on a PIC16F micro, pressure on the touchscreen can be translated into X and Y coordinates. Using the PIC was a great choice in this instance: it’s possible to multiplex ports on an ADC pin with a PIC, making the entire system extremely efficient and easy to calibrate.
After that, it’s just a matter of plugging the output of the microcontroller into the touchpad connector of the MSX and writing a few lines of BASIC to draw a point on the screen. Video below.
Continue reading “Very Large Touchpads for Very Old Computers”
Audiophiles tend to put analog systems on a pedestal. Analog systems can provide great audio performance, but they tend to be quite costly. They’re also hard to tinker with, since modifying parameters involves replacing components. To address this, [tshen2] designed the DSP 01.
The DSP 01 is based around the Analog Devices ADAU1701. This DSP chip includes two ADCs for audio input, and four DACs for audio output. These can be controlled by the built in DSP processor core, which has I/O for switches, buttons, and knobs.
[tshen2]’s main goal with the DSP 01 was to implement an audio crossover. This device takes an input audio signal and splits it up based on frequency so that subwoofers get the low frequency components and tweeters get the higher frequency components. This is critical for good audio performance since drivers can only perform well in a certain part of the audio spectrum.
Analog Devices provides SigmaStudio, a free tool that lets you program the DSP using a drag-and-drop interface. By dropping a few components in and programming to EEPROM, the DSP can be easily reconfigured for a variety of applications.