User Tools

Site Tools


openbench:fgen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
openbench:fgen [2007/11/09 17:21]
geekabit + amplitude, DC offset
openbench:fgen [2016/01/28 18:05] (current)
Line 2: Line 2:
 A completely open design for a function/​waveform generator: hardware, firmware, software A completely open design for a function/​waveform generator: hardware, firmware, software
  
-for more info, read about [[about|openbench]]+for more info, read about [[start|openbench]]
  
 For collected links, try [[http://​del.icio.us/​ladyada/​dds|DDS link on delicious]] and [[http://​del.icio.us/​ladyada/​fgen|Function Gen link on delicious]] For collected links, try [[http://​del.icio.us/​ladyada/​dds|DDS link on delicious]] and [[http://​del.icio.us/​ladyada/​fgen|Function Gen link on delicious]]
  
 ====== Notes & stuff ====== ====== Notes & stuff ======
- 
  
 ===== Design constraints ===== ===== Design constraints =====
- 
 One or two designs: Low cost, high cost. One or two designs: Low cost, high cost.
    * Low cost is ~$50-75 ​    * Low cost is ~$50-75 ​
Line 21: Line 19:
   * Sawtooth (possibly a modification of triangle wave???)   * Sawtooth (possibly a modification of triangle wave???)
   * Arbitrary waveform (sync, envelopes, etc)   * Arbitrary waveform (sync, envelopes, etc)
 +  * Noise (white noise, pink noise, brown noise, etc)
 +
 +Modulation (in order of importance)
 +  * Sweep (actually is FM)
 +  * AM
 +  * FM
  
 Frequency range: Frequency range:
-  * 1 Hz -> 100 KHz required (must cover audio ranges) +  * 1Hz to 100KHz ​required (must cover audio ranges) 
-  * 1mHz -> 10MHz is ideal (digital/​analog ranges)+  * DC to 10MHz is ideal (digital/​analog ranges)
  
 Output capabilities:​ Output capabilities:​
-  * 50 ohm/inf impedance +  * 50ohm/inf impedance 
-  * 1mv -> 10V amplitude +  * 1mv to 10V amplitude 
-  * 0 -> 10V DC offset+  * 0 to 10V DC offset
   * trigger output   * trigger output
  
-USB control? ​ Panel control? ​ Both?+USB control? ​Serial control? ​Panel control? ​All of the above?
  
 Vpp? (+-12V is pretty '​standard'​) Vpp? (+-12V is pretty '​standard'​)
Line 43: Line 47:
  
 ===== Waveform generation ===== ===== Waveform generation =====
- 
 Waveforms we want (in order of importance) Waveforms we want (in order of importance)
   * Sine wave    * Sine wave 
   * Square wave (with variable PWM)   * Square wave (with variable PWM)
-  * Triangle wave +  * Triangle wave (with variable PWM?)
   * Sawtooth (possibly a modification of triangle wave???)   * Sawtooth (possibly a modification of triangle wave???)
-  * arbitrary ​waveform (sync, envelopes, etc)+  * Arbitrary ​waveform (sync, envelopes, etc) 
 +  * Noise (white noise, pink noise, brown noise, etc)
  
 Frequency range: Frequency range:
-  * 1 Hz or lower +  * 1Hz to 100KHz required ​(must cover audio ranges) 
-  * 100 KHz or higher ​(must cover audio ranges) +  * DC to 10MHz is ideal (digital/​analog ranges)
-  * 1mHz -> 10MHz is ideal (digital/​analog ranges) +
- +
- +
- +
- +
  
 ==== Generator tech ==== ==== Generator tech ====
- 
 Two options for chip '​styles'​ is the all-in-one oscillator (ICL3038, etc) +PLL or DDS Two options for chip '​styles'​ is the all-in-one oscillator (ICL3038, etc) +PLL or DDS
  
 === Oscillators === === Oscillators ===
- 
 All-in-one is nice, although not very stable w/o PLL. Two options available, MAX038 & XR220. ​ All-in-one is nice, although not very stable w/o PLL. Two options available, MAX038 & XR220. ​
  
Line 74: Line 70:
 Pros: easy, cheap, simple Pros: easy, cheap, simple
 Cons: unavailable,​ PLL required Cons: unavailable,​ PLL required
- 
  
 === DDS === === DDS ===
- 
 Direct-Digital-Synthesis,​ currently popular. Basically: wavetable + 24 or 32 bit adder and sampling above nyquist to get precision waveforms. Direct-Digital-Synthesis,​ currently popular. Basically: wavetable + 24 or 32 bit adder and sampling above nyquist to get precision waveforms.
- 
   * Pros: digital, precise, no PLL needed   * Pros: digital, precise, no PLL needed
   * Cons: hard to get high frequencies because of oversampling   * Cons: hard to get high frequencies because of oversampling
Line 86: Line 79:
  
 == Off the shelf, AD parts == == Off the shelf, AD parts ==
- 
 They come with sync out, very very high speeds. But only sine and square out, and in small packages (TSSOP). They come with sync out, very very high speeds. But only sine and square out, and in small packages (TSSOP).
  
 == Roll your own == == Roll your own ==
- 
 **Idea #1**: Get a chunk of SRAM (like, say, CY7C1399B-12VXC),​ fill it with your wavetable, then clock it with a variable clock ([[http://​www.linear.com/​pc/​productDetail.do?​navId=H0,​C1,​C1010,​C1096,​P2415|LTC6903]] 1KHz->​68MHz !!) maybe use along with adder/​scaler to provide more range at high/low freq. We could get up to 4MHz, nice! **Idea #1**: Get a chunk of SRAM (like, say, CY7C1399B-12VXC),​ fill it with your wavetable, then clock it with a variable clock ([[http://​www.linear.com/​pc/​productDetail.do?​navId=H0,​C1,​C1010,​C1096,​P2415|LTC6903]] 1KHz->​68MHz !!) maybe use along with adder/​scaler to provide more range at high/low freq. We could get up to 4MHz, nice!
   * Pros: high frequency range   * Pros: high frequency range
Line 108: Line 99:
       Other possibilities include going with an SX instead of AVR: SX28 can be clocked up to 75MIPS (maybe give us 500KHz...but will draw an insane 100mA from 5V. jesus!)       Other possibilities include going with an SX instead of AVR: SX28 can be clocked up to 75MIPS (maybe give us 500KHz...but will draw an insane 100mA from 5V. jesus!)
  
 +**Idea #4**: A combination of idea #1 and idea #3. Take a simple AVR that is able to calculate waveforms, but not in realtime. Load the wavetable in some external RAM, and clock it at the desired speed.
 +  * Pros: high frequency, adjustable waveform
 +  * Cons: complex
  
 ===== Power supply ===== ===== Power supply =====
- 
 Need 3.3V (probably), 5V, +-12V (@100mA) Need 3.3V (probably), 5V, +-12V (@100mA)
  
Line 117: Line 110:
     * Cons: need to load down 5V - should look into this     * Cons: need to load down 5V - should look into this
  
-**Idea #2** Use 78xx's with 120V transformer.+**Idea #2** Use 78xx's with mains transformer.
     * Pros: well understood, cheap, safe (isolated), clean power, huge     * Pros: well understood, cheap, safe (isolated), clean power, huge
-    * Cons: Transformers kind of a pain, unsafe (to build, wiring ​120V yuk)+    * Cons: Transformers kind of a pain, unsafe (to build, wiring ​mains yuk)
  
 **Idea #3** Use a regulated power supply/wall wart with multiple outputs (see [[http://​www.jameco.com/​webapp/​wcs/​stores/​servlet/​ProductDisplay?​langId=-1&​storeId=10001&​catalogId=10001&​productId=154624|Jameco#​154624]] 5V @0.5A +-12V @0.13A each $13) **Idea #3** Use a regulated power supply/wall wart with multiple outputs (see [[http://​www.jameco.com/​webapp/​wcs/​stores/​servlet/​ProductDisplay?​langId=-1&​storeId=10001&​catalogId=10001&​productId=154624|Jameco#​154624]] 5V @0.5A +-12V @0.13A each $13)
Line 128: Line 121:
    * Pros: simple, regulated, ultra compact    * Pros: simple, regulated, ultra compact
    * Cons: expensive, noisy    * Cons: expensive, noisy
 +**Idea #4b** Build your own DC/DC converter, a bit like [[http://​spritesmods.com/?​art=ucboost&​page=2|sprite_tm]] did. Have the processor generate the PWM needed for the converter.
 +   * Pros: cheap, same as idea #4
 +   * Cons: noisy
  
 ====== Planned versions ====== ====== Planned versions ======
- 
  
 ===== Inexpensive kit ===== ===== Inexpensive kit =====
Line 146: Line 141:
 2x16 LCD and some buttons & rotary encoders for UI.  2x16 LCD and some buttons & rotary encoders for UI. 
 Maybe an 'm88? at 12MHz does the UI work and USB nonsense. (USB "​serial"​ (or raw) interface using USBtiny.) and sends just raw serial/spi commands to DDS chipset Maybe an 'm88? at 12MHz does the UI work and USB nonsense. (USB "​serial"​ (or raw) interface using USBtiny.) and sends just raw serial/spi commands to DDS chipset
- 
  
 ==== Chipset ==== ==== Chipset ====
/home/ladyada/public_html/wiki/data/attic/openbench/fgen.1194628914.txt.gz · Last modified: 2016/01/28 18:05 (external edit)