September 14th, 2011

74HC4051 Analog Multiplexer

74hc4051 mux

This was actually the first time I ever needed to multiplex analog channels so it was a good opportunity to learn how to use them. My task was to measure the temperature of 32 thermistors (NTC) with a microcontroller and later process that data. Obviously you cant find that much analog input channels on your common microcontroller so you need to multiplex the signals. First I looked for large analog multiplexers with 16 input channels but those are way too expensive. As it turns out its cheaper to use more smaller 8ch multiplexers(example Digikey pricing: 2pcs 16:1 mux from TI is $7.84 while 3pcs of 8:1 mux from TI is $1.53). I was able to get the 74HC4051 at a good price so I started creating the design around it.

With just four 74HC4051 I can multiplex 32 input channels to 4 outputs. The 74HC4051 has 3 select lines A,B,C and one enable line E. These 4 lines are used for control and they can be tied together like I did for controlling all 4 chips with the same 4 lines. By a combination of state (high/low) for A,B and C you can control which input gets connected to the output. In the schematic you will also find a table with the address select concerning the 3 pins A,B and C. The enable pin is used to disconnect all internal switches (when high) or allow connection (when low) by selecting the appropriate address. Each 74HC4051 got its own 0.1uF decoupling cap close to its supply pins and if you’re design is very sensitive to noise you can further optimize the layout and place more filtering on the supply lines.

To get a more stable reading at the output of the thermistor(actually at the output of the multiplexer) I also placed a low pass filter which later on after assembling and testing turned out to be unnecessary even creating problems because I was switching the lines faster than it took the filter to settle so I left the filter components out during assembly.

The PCB was manufactured at home hence the big vias and it was designed to allow a second board with the microcontroller to be stacked on top of it. Everything was tested on an Arduino and it works perfectly. The schematics and board file are released under CC-BY-SA and can be downloaded from the link bellow.

mux 74hc4051


Eagle schematic and board file.

Analog Synthesizer using PIC

This project presents an audio synthesizer but not only that, it gives some ideas on how to interface other synths to a keyboard. The keyboard decoder uses the 74HC154 IC and the PIC18F1220. The 4 bits binary input of the 74HC154 is connected to the PIC which will cycle from 0 to 11, representing the twelve semitones. This in turn will cycle the outputs but with low logic level.

The octave is determined directly by the PIC. When a key is pressed it will make the  corresponding octave line connect with the corresponding semitone output of the 74HC154 and thus turning the octave line from high to low level. When this is sensed by the PIC, it will check at which semitone the cycle was and output the musical note and the envelope trigger.

After that the PIC oscillators output are sent into separate wave shapers where you can select three types of waveforms. The waveforms are then summed and go into the VCF which can be controlled manually, by the envelope generator or modulated by oscillator 1. After VCF comes the VCA formed with a differential pair, with the control voltage modifying the emitter current.

Newer software has features like arpeggiator or portamento. With this way of interfacing the keyboard there will be some limitations to its usage. For example only the high note will be played if two notes are pressed the same time. All the instructions needed to build this are given however the code for the microcontroller is not but there is enough information to write it yourself.

Analog Synthesizer using PIC: [Link][Via]

January 27th, 2009

Analog display reinvented

Analog display reinvented

Nowadays everybody is using LCD’s, OLED’s, TFT’s to display information, this project is almost a gadget since it uses analog meter gauges to show the time, off course you can display other stuff to, like Internet connection speed, or your stock status, check the link for details.

The hardware is based on Arduino, but you can use it as a starting point to adapt to your favorite controller, for the displays you can use the commonly used 0-20mA or the 0-10V gauges with customized back plane, if you choose the 0-20mA type than a voltage to current circuit is needed, if you use the 0-10V type then a voltage amplifier with a gain of 2. In both cases you use the PWM outputs to make the Digital to Analog Conversion (DAC) and one op-amp to adapt the 0-5V to the meter gauge.

Analog display reinvented: [via] [Link]

Interfacing Your Computer to an ADC via the Parallel Port

Interfacing an Analog-to-Digital Converter (ADC) with Linux via the parallel port is fairly simple. There two major areas that need to be addressed – hardware and software. The hardware consists of the parallel port, an ADC, and an analog signal source. The software we programmed in ‘C’ language.

Interfacing Your Computer to an ADC via the Parallel Port: [Link]

 PIC16F84 12-bit, 8-channel analog to digital converter

This project is a simple 12-bit, 8-channel analog to digital converter (with 4 additional digital inputs), which may be connected to the PC through the serial interface (RS232). The sequence of sampled channels, and sampling frequence are programmed by the PC while the maximal sampling frequency is limited by the data transmission rate, and at 115200 baud is equal to ca. 3kHz for 1 channel without digital inputs, and to ca. 500 Hz for 8 channel with digital inputs.

The analog input voltage range is -2.5V to 2.5V. The digital inputs may be used for recording additional digital signals, eg. the time code used to synchronize the recorded data with other events. The project is based on PIC16F84 (or 166C84) microcontroller, and MAX190 (or MAX191) ADC. The device is mounted on a small single-sided printed circuit board, easy to prepare even at home.

PIC16F84 12-bit, 8-channel analog to digital converter: [Link]

© 2007-2011 YourITronics | Any logo, trademark and project represented here are property of their respective owners | Wordpress | Privacy Policy    RSS