Modulation Plugin
Jump to navigation
Jump to search
Contents
ToDos
- make sure each components freq. response, to make sure the highest freq.
- place DAC into this module board together, then only 4 wires(Vcc, I2C clk, Gnd & I2C data) from host.
- understand all components
- call sample
- draw circuit and PCB and grounding problem
- test by real circuit and firmware
Objectives
- The modulation module is used to deliver a digital output signal with the following characteristics:
- Square wave
- Variable frequency (>1kHz)
- Variable amplitude (0V - 2.5V)
- interface to MCU which do the control
- Q: Is square wave where the "Lo" time is always at "GND" OK?
- Q: If not, is a switch between "Lo is GND" vs. "Lo is negative Hi" OK? Or does "Lo" need to be independently controlled with another ADC?
- Q: Will people be connecting a speaker directly to the output, requiring a relatively high-power output op amp such as the LM386N-3 ?
Software Solution
- Timer Interrupt controlling I2C 10-bit DAC can only achieve frequency response of about 1kHz
- 5byte/cmd
- 8bit/byte
- baudrate = 400kHz
- This yields 10kHz (0.1ms)
- As OS context switch is 10ms, set timer to 1ms (1kHz), so that 0.9ms can be used to process other tasks
- Due to higher freq. response requirement, so using hardware to implement the clock
Hardware Solution
Overall Performance
- I2C Baudrate:
- Output Voltage Range:
- Output Frequency Range:
- Number of channels:
Selected Chips
Part No. | Description | Order Chip | Call Sample |
---|---|---|---|
DAC6574IDGS | Quad-channel 10-bit I2C DAC | Digikey | No need |
CY2545??? | Quad PLL I2C Programmable Clock Generator | HQEW | Try Contact Cypress |
DS1089L | 3.3V Center Spread-Spectrum EconOscillator | Digikey | Maxim |
MC74VHC4053DT | Analog Multiplexers | Try Contact ON Semiconductor |
CY2545 is out of stock in digikey, so there is no more information about it.
Circuit
+-----+ +--------+ +--------+ I2C Bus | | | Analog | | Op-Amp | ------------+-----| DAC |------------| Switch |---------| |---------Output | | | +--------+ +--------+ | +-----+ | | | | +--------------+ | | | Programmable | | +-----| Clock |-------+ +--------------+
This architecture allows the square wave to run at a very high frequency, even with a slow I2C and a slow DAC.
Circuit Simulation by Paul Falstad's Web
- Import the following
$ 1 5.0E-6 16.817414165184545 64 5.0 50 w 128 256 144 256 0 w 16 256 64 256 0 g 16 352 16 368 0 v 64 64 112 64 0 0 40.0 2.5 0.0 0.0 0.5 w 112 128 144 128 0 w 64 128 16 128 0 w 16 128 16 256 0 v 64 256 128 256 0 2 1000.0 1.65 1.65 0.0 0.5 a 336 144 464 144 1 3.3 0.0 w 336 160 336 192 0 w 464 192 464 144 0 w 464 144 512 144 0 r 592 144 592 256 0 1000.0 g 592 352 592 368 0 w 512 144 592 144 0 w 336 192 352 192 0 w 432 192 464 192 0 v 64 128 112 128 0 1 1.0 1.25 1.25 0.0 0.5 w 16 256 16 288 0 w 16 288 16 352 0 w 592 256 592 352 0 g 272 352 272 368 0 w 272 128 336 128 0 w 176 256 176 144 0 r 272 224 272 288 0 1000.0 w 272 128 272 224 0 w 272 288 272 352 0 159 144 128 208 128 0 r 208 128 256 128 0 1000.0 w 256 128 272 128 0 w 144 256 176 256 0 r 336 224 336 288 0 1000.0 g 336 352 336 368 0 w 336 288 336 352 0 w 336 192 336 224 0 r 352 192 432 192 0 1000.0 o 4 64 0 34 2.5 7.8125E-4 0 -1 o 0 64 0 35 5.0 9.765625E-5 1 -1 o 11 64 0 34 2.5 0.0015625 2 -1
Components Inside Circuit
DAC chip
- Part No: DAC6574IDGS
- datasheet
- Resolution: 10-bit
- I2C clock Frequency: upto 3.4Mbps
- No of channels: 4
- Operating Voltage: 2.7 - 5.5V
- Temperature range: -40 - 105oC
Clock Generator chip
- CY2545???
- datasheet
- buy at here
- I2C clock Frequency: upto 400kbps
- No of channels: 4
- Operating Voltage: 2.5V, 3.0V, 3.3V
- Temperature range: -40 - 85oC
Part No. | Opertating Volt | Operating Freq | Min Volt | Max Volt | output freq | Min Temp | Max Temp | Pin |
---|---|---|---|---|---|---|---|---|
CY2545 | 2.5V, 3.0V, 3.3V | 400KHz | -0.5V | 4.5V | 3- 166 MHz | -40oC | 85oC | 24-pin |
CLK 1-8 : frequency output CLK 3 : frequency selection (FS) (Function 2) cy2545 has 4 PLLs, each PLLs can be set 2 frequency, CLK 3 use to select the frequency CLK 6 : spread spectrum ON/OFF control input (Function 2) for synthesizing and modulating the frequency Vdd_CLK_BX (X=1,2,3) control the output frquency of Blanck X (X=1,2,3) +------------------+ | | |------CLK 1 | | Bank 1 | | | |------CLK 2 |------------------| | | |------CLK 3 | | Bank 2 |------CLK 4 | | |------CLK 5 |------------------| | | |------CLK 6 | | Bank 3 |------CLK 7 | | |------CLK 8 +------------------+ CLKIN/RST ---1. 2.5V/3.0V/3.3V external reference clock frequency 2. Reset function POR :back to default condition / Clean Start : keep the programmed value Xout Crystal frequency output Xin/EXCLKIN Crystal frequency input/ 1.8V external clock input
- Coding
[Start Bit]->[7-bits devices]-->[R/W bit]-->[ Slave ]-->[ 8-bits ]--> .. [ address ] [ address ] [ ] [ CLK ACK ] [memory address] ..[ACK]-->[8-bits]-->[ 8-bits ]-->....[ 8-bits ]......until... [stop bit] [ ] [ data ] [data in MA+1] [data in MA+n] [ ]
Analog Switch
- Part No: MC74VHC4053
- datasheet
- Switching Frequency: 120MHz
- No of channels: 4
- Operating Voltage:
- Temperature range: -40 - 85oC
Part No. | Operating Volt(V) | Freq Resp(Hz) at 3V | On-state Resist(Ω) at 3V | Min Volt(V) | Max Volt(V) | Min Temp | Max Temp | Indenpent Circuit | Voltage Supply Source | Pin |
---|---|---|---|---|---|---|---|---|---|---|
SN74AHC4066 | Vcc : 2V~5.5V | 35MHz | 29Ω | Vcc : -0.5V | Vcc : 7V | -40oC | 85oC | 4 | single | 14 |
74HC4051D | Vcc : 2V~10V Vee : -10V~2V | Nil | 80Ω | Vcc :-0.5V Vee : -11V | Vcc : 11V Vee : 2V | -40oC | 85oC | 4 | Dual | 16 |
MC74VHC4051 | Vcc : 2V~6V Vee : -6V~0V | 80MHz | 80Ω | Vcc :-0.5V Vee :-7V | Vcc : 7V Vee : 5V | -40oC | 85oC | 4 | Dual | 16 |
MC74VHC4052 | Vcc : 2V~6V Vee : -6V~0V | 90MHz | 90Ω | Vcc :-0.5V Vee :-7V | Vcc : 7V Vee : 5V | -40oC | 85oC | 4 | Dual | 16 |
MC74VHC4053 | Vcc : 2V~6V Vee : -6V~0V | 120MHz | 90Ω | Vcc :-0.5V Vee :-7V | Vcc : 7V Vee : 5V | -40oC | 85oC | 4 | Dual | 16 |
- more information about the series 7400 in wiki: http://en.wikipedia.org/wiki/7400_series
- there is model G which is super high speeds at more than 1 GHz in 7400 family, however this model is very expensive.
op-amp buffer
- OPA340