Author Topic: Educational function generator kit  (Read 38386 times)

0 Members and 1 Guest are viewing this topic.

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Educational function generator kit
« on: September 28, 2013, 11:42:36 pm »
OK, I mentioned this a few times - here's the proper thread on this. I'll update this thread as I go.

I am building an educational analog function generator kit. This will have an in-depth manual that not only gives a step-by-step procedure to build the kit, but also teaches how all of the analog circuits work. This instructional part will contain everything from how a capacitor works to the Gilbert cell circuit used for amplitude modulation. The target audience is not complete beginners: I'm not going to dwell on ultra-introductory topics like conventional current and whatnot, this is for either people who have built a couple circuits before, or are handy with a search engine and don't mind having to do a bit of extracurricular research. It's also not for the faint of heart; the hardware will include SMD parts down to 0603.

Features of the function generator will be: sine, square and triangle waveforms with adjustable duty cycle and frequency from 0.1 Hz to 5 MHz, frequency modulator, amplitude modulator, two auxiliary signal sources to feed the modulator (one generating sawtooth with precision min and max and variable slope, the other generating sine/square up to 100 kHz), and a digital readout giving selectable outputs: freq, duty cycle, Vp-p, Vrms, Vmin, Vmax, Voffset, dBm, dBV. It will be able to be built and tested with just a 20 MHz oscilloscope and a multimeter, and will be built in parts rather than one huge PCB to allow easier testing and troubleshooting. The modular nature will allow the addition of other features as well (I'm currently considering a PLL, which can lock to an external input or to a digital frequency synthesizer for precise control. Not sure - what do you think?)

The goal is for this to be not just an educational experience plus a throwaway crappy kit board when you're done, but a real, usable bit of equipment for your efforts.

When finished, I will make all of the electronic media available on my (soon-to-exist) website, including the book text itself, Gerbers, schematics, BOM, firmware, etc., and will provide a mini-kit for a fee containing unpopulated PCBs, a preprogrammed microcontroller, SMD tweezers, a flux pen, and a printed copy of the manual. For the cheap and brave, the book will contain a section on how to procure all of those for yourself, including having the boards made, and building your own MCU programmer from scratch.

I will post here as I develop this further. (I'm finished prototyping one subcircuit/PCB and will post on that in a couple minutes)

This is a large and ambitious project, and I am already pretty busy with schoolwork, so I like to think it will move along quickly. :-DD
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #1 on: September 28, 2013, 11:47:13 pm »
In my original VCO prototype, I was (mis)using an LM7171 high speed op amp as a comparator. Mainly because I had one - it was the fastest comparator-like thing I had. The speed at which it was willing to run in saturated mode was stunning for a somewhat specialized linear op amp, but it still didn't quite cut it for the frequency range I wanted. Also, for educational purposes, I like the idea of doing at least one traditional black-box with discretes. This is "my" comparator. (I can hardly really take credit for it, it is heavily inspired by the one used in the HP 3312A.)

The text mentions a "matched pair". I'm not that evil, the PCB version will use a DMMT3904W.

This piece will be a separate, small PCB, and I'm busy prepping Gerbers right now, so I'm just going to throw at you my draft of the relevant part of "Appendix A: Prototyping". I'll add a schematic and Gerbers later.

Edit: Updated with schematic draft. (The final version will include operating points and small graphics of test signals, but I'm still trying to figure out how I want to do that without cluttering up the schematic. I want it to print onto a single US standard "legal" page...)

KiCad's schematic export has been giving me problems lately - anybody who can't see the PDF properly, please let me know.
« Last Edit: September 29, 2013, 12:35:26 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline quantumvolt

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Educational function generator kit
« Reply #2 on: September 29, 2013, 12:06:05 am »
Nice idea. If it not too expensive, count me as customer. All I have today is a 8038, 2206 and the fleabay 9850, none of them even prepared for use - so my function generator is the sine output from a PC card scope and and 555 oscillator  :wtf:

I have in your earlier posts on the PSU seen your skills with Eagle (?). If you are interested, I will get a batch of PCB's made for the LTC2400 DVM in another thread. I will pay you (modestly) to prepare the files, and you will get your forum name on the PCB's  :-DMM.

Just a proposal ... Please feel free to ignore it  :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #3 on: September 29, 2013, 12:11:22 am »
My skills with Eagle? You mean I'm so skilled at hating it that you've noticed? ;)

Tried it once, couldn't stomach it... I'm pretty handy with KiCad though, and not bad with DipTrace and slightly worse at a big, expensive package that shall not be named because technically I can't afford it ;)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline ahnuts72

  • Regular Contributor
  • *
  • Posts: 215
  • Country: us
Re: Educational function generator kit
« Reply #4 on: September 29, 2013, 12:23:06 am »
Count me as interested too.
Sounds like just the kinda kit I have been looking for.

Sent from my Nook HD

.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Educational function generator kit
« Reply #5 on: September 29, 2013, 12:44:11 am »
Instead of a microcontroller programmer, maybe consider some of the microcontrollers with built-in programmer functions, like the LPC11U24: It needs just an USB connector and if you hold down a pin to GND during reset, the PC enumerates it as a mass storage device, where you can just copy the new firmware as a file.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #6 on: September 29, 2013, 12:46:54 am »
Comparator PCB graphics and Gerbers. I'll send these off to ITEAD tonight (after waiting an hour or so to see if anybody looks at them and sees something wrong).

Yes, many reference designators have been omitted, because the board is tightly packed and there wasn't room for them. I will have a separate assembly diagram which shows where they go.

Instead of a microcontroller programmer, maybe consider some of the microcontrollers with built-in programmer functions, like the LPC11U24: It needs just an USB connector and if you hold down a pin to GND during reset, the PC enumerates it as a mass storage device, where you can just copy the new firmware as a file.

Ooh - every time somebody says that, I think "wow, that's cool, I'll have to remember that", and then promptly forget. Thanks for reminding me! That's pretty awesome. I might just do that.

Edit: Removed files to make room for Dave.
« Last Edit: October 26, 2013, 01:26:02 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Educational function generator kit
« Reply #7 on: September 29, 2013, 01:08:23 am »
Comparator PCB graphics and Gerbers. I'll send these off to ITEAD tonight (after waiting an hour or so to see if anybody looks at them and sees something wrong).
Lots of parts. I would use just a LM339, but nevertheless interesting to build it with discrete parts. Maybe wait until monday so that more people can take a look at the schematic you posted earlier, ITEAD won't process it anyway until then.
Instead of a microcontroller programmer, maybe consider some of the microcontrollers with built-in programmer functions, like the LPC11U24: It needs just an USB connector and if you hold down a pin to GND during reset, the PC enumerates it as a mass storage device, where you can just copy the new firmware as a file.
Ooh - every time somebody says that, I think "wow, that's cool, I'll have to remember that", and then promptly forget. Thanks for reminding me! That's pretty awesome. I might just do that.
You're welcome. I use the mbed-framework for it, which can be installed offline, too, but they have a really nice online project management system, where you can even share your project with other developers. A microcontroller with USB and perhaps your own HID device implementation for it (there are examples in the mbed framework, e.g. an USB MIDI device), allows some interesting applications in combination with PC programs.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline adnewhouse

  • Contributor
  • Posts: 39
  • Country: us
Re: Educational function generator kit
« Reply #8 on: September 29, 2013, 01:13:15 am »
This kit looks pretty awesome. Count me interested. I'm always up for an SMD challenge.  :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #9 on: September 29, 2013, 01:15:44 am »
Lots of parts. I would use just a LM339, but nevertheless interesting to build it with discrete parts.

I tried an LM339 (LM393, actually) for shits and giggles and it wouldn't go anywhere near 1 MHz, let alone 5. I was able to coax it into higher frequencies with some rather precarious constructions of R/C feedback elements - don't really want to bother with that, I'm dancing in "unspecified behavior" territory then. (And the
"square" wave coming out didn't look particularly nice - I want to be able to directly pick that off as the square wave signal.) I know there are plenty of comparators out there that will work, but as I said I want to do at least this section in discretes - for educational purposes, it gives a way to not only see how a comparator works, but also probe around inside one.

As for "lots of parts" - I've actually dropped a number of them from the original 3312A design after testing and finding them unnecessary. It could have been worse. :scared:

Quote
Maybe wait until monday so that more people can take a look at the schematic you posted earlier, ITEAD won't process it anyway until then.

Maybe. I wanted to get it out this weekend just because once the week hits, I'll be swamped with schoolwork yet again and don't want to forget about it. But I might do that.


Thanks again for the microcontroller suggestion. That simplifies a good few things and it looks quite well suited for this application.
« Last Edit: September 29, 2013, 01:22:56 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline TimNJ

  • Super Contributor
  • ***
  • Posts: 1661
  • Country: us
Re: Educational function generator kit
« Reply #10 on: September 29, 2013, 02:34:01 am »
I'd totally buy it!
 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Educational function generator kit
« Reply #11 on: September 29, 2013, 03:35:34 am »
Whooo hoo. Seems like a good idea. Looking for a cheap function gen. And always up for a 0603 smd challenge.
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #12 on: September 29, 2013, 03:16:21 pm »
Just sent off the PCB order (to Elecrow, actually...) and a component order to Mouser for a few things I don't have (DMMT3904W, a couple Zeners, MCL4151 and the LPC11U24 - woo :-+). Next comes the VCO, which was nearly done but needs a bit of revision now. Updates on that in the next few days
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Educational function generator kit
« Reply #13 on: September 29, 2013, 03:54:44 pm »
Quote
Features of the function generator will be:

A couple suggestions:

1) think small: set realistic goals, goals that are relevant to most users, goals that most users can actually achieve.
2) think big: think about how your system can be scaled up in the future. think modules.

I would say that you have a few routes. Going full analog would be beyond most people's capabilities to engineer. In the digital domain, you could easily pick a DDS - easy, inexpensive, and reasonably good performance.

You could also pick a programmable oscillator - this can be a NCO or an outboard PLL chip - they are many of them. Once you have the square wave output from the NCO/PLL chip, you can modulate it via other means, mostly analog. This approach requires considerable but not insurmountable analog expertise.
================================
https://dannyelectronics.wordpress.com/
 

Offline ElectroIrradiator

  • Frequent Contributor
  • **
  • Posts: 614
  • Country: dk
  • More analog than digital.
Re: Educational function generator kit
« Reply #14 on: September 29, 2013, 04:04:58 pm »
Pointless nitpick: Your prototyping construction method is more correctly called dead bug construction, it wasn't invented by Jim Williams. ;)

Looks like a nice project. :D
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #15 on: September 29, 2013, 04:43:35 pm »
I would say that you have a few routes. Going full analog would be beyond most people's capabilities to engineer. In the digital domain, you could easily pick a DDS - easy, inexpensive, and reasonably good performance.

You could also pick a programmable oscillator - this can be a NCO or an outboard PLL chip - they are many of them. Once you have the square wave output from the NCO/PLL chip, you can modulate it via other means, mostly analog. This approach requires considerable but not insurmountable analog expertise.

I agree and disagree. Obviously, a digital/programmable route would be easier, possibly more economical, and definitely more realistic for a modern, commercial product. However, that completely defeats the purpose. My target audience is analog hobbyists - people who might use more modern techniques and components in their day job, but who just like to do it this way or want to learn about how it used to be done.

Obviously it's not completely unfeasible, since it was done many, many times up to the 80s and occasionally thereafter. And the circuitry isn't that hard, really... I've got a comparator working perfectly, a VCO that was working almost perfectly (almost got that problem worked out - but I damaged it when I connected it to the comparator prototype* :-BROKE), the sine shaper circuit worked perfectly, I've already prototyped the sweep gen and the true FM circuit is only a bit more complex, I haven't tacked the AM yet but I've done similar things before. That only leaves the output amp (piece of cake), digital stuff (piece of pie), and power supply (dish of pudding).

Pointless nitpick: Your prototyping construction method is more correctly called dead bug construction, it wasn't invented by Jim Williams. ;)

I know, but I always associate it with him for some reason ;D But seriously, you raise a good point - I will clarify this in the text. It's meant to be instructional, might as well call it by its proper name.


*Naturally, when I changed out the buffer circuit, I swapped the NPN and PNP transistors, and managed to blow up half the damn VCO, including half the diode bridge, one current source, at least half a TL072, and contributed to the extinction of the obsolete 2N5950 JFET...
« Last Edit: September 29, 2013, 05:46:52 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #16 on: September 29, 2013, 07:38:13 pm »
I have somehow managed to kill one half of each of the three TL072s. Output glued to -ve. Possibly a power supply inversion...  |O :-BROKE Y'all can get your function generator kits somewhere else, I'm going back to CS and math, where there's no magic smoke to be released... ;)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Educational function generator kit
« Reply #17 on: September 29, 2013, 08:11:38 pm »
For such user errors a power supply with current limit function helps a lot :)
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #18 on: September 29, 2013, 08:14:09 pm »
Yep... and do you know what helps even more? Setting that limit correctly. |O
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline bance

  • Contributor
  • Posts: 32
  • Country: gb
Re: Educational function generator kit
« Reply #19 on: September 29, 2013, 08:28:01 pm »
I think this is a great idea, I've just been tinkering with an 8038 based function generator... Second hand function generators are quite expensive in the UK, so I thought I'd have a bash at my own. I'm a noob at this 'lectronics malarkey, and your project sounds just the ticket!!!

Steve
 

Online Paul Price

  • Super Contributor
  • ***
  • Posts: 1429
Re: Educational function generator kit
« Reply #20 on: September 29, 2013, 08:51:16 pm »
Relay Interesting....Please post some of the goal specs of the finished design of this project such as:
input for freq, modulation, and control impedance
max amplitude out
output impedance
output short-circuit/over-voltage protection
variable offset control of output
freq. range
Sweep capability
Amplitude modulation range
FM input or not
freq. stability
sinewave distortion
sawtooth linearity
sqrwave risetime
adj. range of function usable output
Output attenuator?
display for function gen. operation, such as Vp-p out, Freq, out, Mod%, etc.
Avail F.P. controls, etc.

Then, one knows what to expect from their effort.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #21 on: September 29, 2013, 09:20:01 pm »
Relay Interesting....Please post some of the goal specs of the finished design of this project such as:
input for freq, modulation, and control impedance: TBD
max amplitude out: 20Vp-p high-Z or 10Vp-p into 50 ohms, offset within same range
output impedance: 50 ohms
output short-circuit/over-voltage protection: fully short circuit-safe, do you really think OVP is necessary?
variable offset control of output: over full signal voltage range
freq. range: 0.1 Hz to 5 MHz
Sweep capability: up to two decades, individual limit controls, period from 10s to 1ms
Amplitude modulation range: 0-1V = 0*-100%, 100kHz bandwidth *full "0%" attenuation has yet to be fully quantified; 0% floor may be adjustable
FM input or not: yes, same range as sweep (two decades)
freq. stability: TBD, as with most basic function generators, depends on thermal characteristics of VCO circuit
sinewave distortion: TBD, I'm still trying a couple different sine-shaping methods
sawtooth linearity: TBD
sqrwave risetime: no longer than 10ns, probably around 5-6ns
adj. range of function usable output: two decades
Output attenuator?: 40 dB
display for function gen. operation, such as Vp-p out, Freq, out, Mod%, etc. freq, period, duty cycle/symmetry, sweep min and max settings, sweep period, Vp-p, Voffset, Vrms(AC), Vrms(AC+DC), dBm 50 ohm, dBm 600 ohm, dBV
Avail F.P. controls, etc. a control for everything I've already listed - if I list them again I'll miss something :)

I may or may not have mentioned this, but the AM/FM/sweep modules will be optional, if somebody doesn't want to build or pay for them.

I'll update the TBDs as I go. I realize it's best to specify all of this fully at the beginning, but as cost and ease of building are also very important factors here, I will have to evaluate some of them when I get around to proper testing.
« Last Edit: September 29, 2013, 09:24:56 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Educational function generator kit
« Reply #22 on: September 29, 2013, 09:31:24 pm »
Quote
sqrwave risetime: no longer than 10ns, probably around 5-6ns

Let me be the very to say that if you could indeed design and implement something like that fully in the analog domain, you would have no problem work at any test equipment company as a senior person.
================================
https://dannyelectronics.wordpress.com/
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #23 on: September 29, 2013, 09:39:35 pm »
I've done 3ns using only discrete transistors, up to 15V into 50 ohms, in a pulse generator I was working on (but is now on the back burner). The comparator has about a four nanosecond rise time, and it is the signal source for the square wave. To achieve 10ns risetime, all I have to do is maintain about a 35 MHz bandwidth through to the output amplifier, which really isn't hard. The gain required is 4, giving a GBW product of 140 MHz, within the 200 MHz of the LM7171 that will be driving the output transistors. 5ns would be harder but still achievable. The required gain could also be reduced to 2 by making the DC offset circuit a bit more complicated, if I really needed to squeeze out more GBW.

If I have to dial it back a bit, I definitely can. As with any unfinished product, these specs are tentative. But I don't foresee it being a real problem.
« Last Edit: September 30, 2013, 03:38:19 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline ahnuts72

  • Regular Contributor
  • *
  • Posts: 215
  • Country: us
Re: Educational function generator kit
« Reply #24 on: September 29, 2013, 09:42:58 pm »
Ignore the naysayers :box: I want one!
.
 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Educational function generator kit
« Reply #25 on: September 29, 2013, 10:05:50 pm »
And why don't we add a Jim William's type pulse generator capable of generating VERY fast pulses as well.
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #26 on: September 29, 2013, 10:06:23 pm »
Because then I'm a bit too close to the kitchen sink.

To be a bit more serious:
1) That sort of ultra-fast-rise pulse generator has a completely different set of uses from a function generator. The only thing I've ever used them for is rough bandwidth/pulse response testing, TBH. You're dancing in truly high frequency territory if you can seriously suggest using an avalanche pulse generator to test an amplifier or signal processing circuit or whatever.
2) It would also be a completely separate circuit, rather than part of an integrated system like everything else here.
3) I don't have the means to test it. Even Vincent Himpe had to borrow the use of an oscilloscope to test that. My equipment maxes out at 400 MHz...
« Last Edit: September 29, 2013, 10:13:12 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Educational function generator kit
« Reply #27 on: September 30, 2013, 02:20:06 am »
Count me in, thanks.

Offline gnif

  • Administrator
  • *****
  • Posts: 1682
  • Country: au
Re: Educational function generator kit
« Reply #28 on: September 30, 2013, 02:54:19 am »
This looks awesome, I could really have used a Function Generator a few days ago... still yet to add one to my workshop. So yeah, count me in :).
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #29 on: September 30, 2013, 02:54:47 am »
I'll try to do this as I get things done, just in case somebody catches something stupid - here's an "alpha" schematic of the peak detector, if anybody wants to do a bit of peer review. It's meant to sample the signal for passing to the ADC in the microcontroller.

I haven't put it on the schematic yet, but for those of you (heh... as if that leaves anybody) who don't want to do the math for the voltage divider, here it is:

Vthev = 15 * 220/(2k2 + 220) = 1.364
Rthev = (220*2k2)/(220+2k2) = 200
Vout = (Vin - Vthev) * Rthev/(Rin + Rthev) + Vthev

Vin-max = 10V;
Vout-max = (10V - 1.364V) * 200/(1k5+200) + 1.364V = 2.38
Vin-min = -10V;
Vout-min = (-10V - 1.364V) * 200/(1k5+200) + 1.364V = 0.027

Which puts it roughly in the scope of a 2.5V reference. A 10-bit ADC gives a resolution of:

(2.5V / 2^10) / Rthev/(Rin+Rthev) = 0.0208V

Edit: A couple things I've tweaked - but haven't updated the schematic (so don't pick these nits :D): 1) Simplified the two-transistor reset circuit for one of the detectors to a single PNP transistor with an inverting input (the MCU will have plenty of extra pins, so no reason I can't use two of them for the reset signal). 2) Somehow I swapped the reset circuits - the max detector should be reset by pulling to ground, and the min detector by pulling to +3.3.
« Last Edit: September 30, 2013, 03:34:57 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline ElectroIrradiator

  • Frequent Contributor
  • **
  • Posts: 614
  • Country: dk
  • More analog than digital.
Re: Educational function generator kit
« Reply #30 on: September 30, 2013, 08:27:03 am »
Isn't the minimum detector missing a diode somewhere? Right now it looks like a simple low pass filter, which would cause the comparator to oscillate continuously for a DC input voltage.
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: Educational function generator kit
« Reply #31 on: September 30, 2013, 09:04:24 am »
I also see a potential problem with the max detector. When the output of the comparator will be pulled low, the voltage on the anode of that diode will be 15V*1k/(1k+10k) = 1.36V. That's not low enough to prevent the capacitor from charging. I would remove that 1k resistor. (Unless I'm missing something here.)

For crying out loud, fix the designators, so we can talk about R2, R5 and C4, instead of "that capacitor on the left... NO! Your other left!".
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #32 on: September 30, 2013, 12:03:11 pm »
Electro, the comparator is open-collector, so it effectively has one.

Dave, good catch about the resistors, they had different values before. The 1k shouldn't be necessary at all, I will pull it. And sorry about the designators, I'll fix that in a few minutes.

OK, fixed: simplified reset circuits, swapped reset circuits, added "open collector" symbol to LM319, removed 1k resistor, added designators.
« Last Edit: September 30, 2013, 01:09:13 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: Educational function generator kit
« Reply #33 on: September 30, 2013, 05:27:01 pm »
You could replace the two diode pairs (D2+D4 and D3+D5) with two BAT54S diodes.
It's basically just two diodes slapped together in series in a SOT23-3 package.
You can also find common anode (BAT54A) and common cathode (BAT54C) versions of that diode, if you ever need them.

In case you are wondering, yes, these are my favorite Schottky diodes. :D
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #34 on: September 30, 2013, 05:36:38 pm »
:) The dual series is quite convenient. In very small quantities, they seem to often cost more than two single BAT54, which is why I did that. If I find I end up with a lot of series pairs, I'll check whether a price break makes it cheaper.

It's looking like the AVR I was initially going to use is a better fit. Specifically, the ADC on the NXP chip doesn't appear to take an external reference. It is also cheaper - I can probably fit everything into a mega48 or mega88 easily. It also has the benefit of being familiar to a lot of people.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #35 on: October 02, 2013, 12:08:45 am »
Hey... just in case anybody was wondering... accurate amplitude modulation from DC to 5 MHz is tricky...

I need more coffee... and pencils... and I think I'm about to wear out the buttons on my poor calculator...

:scared:
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Zad

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: Educational function generator kit
« Reply #36 on: October 02, 2013, 02:18:09 am »
Use a nice cheap multiplying DAC? An 8 bit 12 MHz AD5450 is <$2 from Digikey etc. 12-bit ones are only a buck more.

I realise it looks a bit of a cheat compared to a Gilbert Cell... :)


Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #37 on: October 02, 2013, 02:19:54 am »
I am considering it, if just for simplicity and easy repeatability. But I will keep at this for a while first.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #38 on: October 02, 2013, 12:57:17 pm »
Have you considered OTAs?
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #39 on: October 02, 2013, 01:03:20 pm »
No! :palm: Completely slipped my mind! They are cool as hell, too, I might have to pick up a bunch of them to play around with for other stuff, too. And great to include for educational purposes.

Thanks!
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #40 on: October 02, 2013, 01:24:46 pm »
Hmm... the only OTA I can find with the bandwidth I need is $6 each! (OPA860) It might actually be worth it still, because that one SOIC can be almost the entire modulator circuit, so it will save a bunch of PCB space and maybe even allow me to eliminate an entire PCB from the design.

I think what I will do is use a modulator based on the OPA860 on the PCB, but also design in a space to plug in an external modulator PCB, and if the OPA860 is ever declared obsolete or becomes prohibitively expensive, I can replace it without modifying the original board.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #41 on: October 02, 2013, 02:08:22 pm »
Build your own! ;) It's just a bunch of current mirrors. There are matched dual transistors for current mirrors available.

Good reads:
http://www.schmitzbits.de/ota3080.html
http://www.idea2ic.com/LM13600/LM13700.html
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #42 on: October 02, 2013, 02:15:43 pm »
Yeah, I could. I did the same with a couple of op amps - one DMMT3904W and a single PMSS3904 were more than enough in a couple places and gave significantly more GBW for the price. I'm wondering whether I'd be able to get good enough matching for a full OTA affordably, though.

Obviously the MC1496 modulator should suffice - that's what HP used in the 3312A. But I refuse to just copy their circuit... and I'm having a hell of a time getting it to work satisfactorily all the way to DC. I'd much rather win in my battle against this chip :box:

Sadly, schoolwork takes precedence during the week. I'd spend more time on this, if I didn't have to take the time to show my electronics prof I can bias a MOSFET over and over and over and over >:(
« Last Edit: October 02, 2013, 02:23:42 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #43 on: October 02, 2013, 08:33:37 pm »
Hmm... the only OTA I can find with the bandwidth I need is $6 each! (OPA860)
There is also the LT1228.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #44 on: October 02, 2013, 08:37:28 pm »
Wow. $8.44 each.
No longer active here - try the IRC channel if you just can't be without me :)
 

Online tom66

  • Super Contributor
  • ***
  • Posts: 6727
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Educational function generator kit
« Reply #45 on: October 02, 2013, 08:59:07 pm »
I'm using a VCA824 in one prototype DDS project, it's about $5 a piece DC-300MHz range.

I use the 40dB range then have a +20dB gain switch and -20dB attenuator, both relays, giving a usable range from 3mVp-p to 30Vp-p, though the output stage is realistically limited to around 25Vp-p using a BUF634 @ +/-16.5V supply.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #46 on: October 02, 2013, 09:02:46 pm »
Looks like a cool chip. But where are you seeing it for $5? I'm not buying 250 of these!
No longer active here - try the IRC channel if you just can't be without me :)
 

Online tom66

  • Super Contributor
  • ***
  • Posts: 6727
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Educational function generator kit
« Reply #47 on: October 02, 2013, 09:37:42 pm »
Ah yeah probably $10 a piece in onesies. The VCA820..822 are also available, some are cheaper with lower B/W.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #48 on: October 02, 2013, 09:41:49 pm »
Hmm. Mouser's got the 820 for $7.60 each. DigiKey doesn't stock them but does list a few available, so I assume once those are gone that's it. More expensive than Mouser anyhow. Arrow appears to have them for $5.31 - never bought anything from them before. I don't really see them anywhere else.

I wish all the sweet analog chips weren't so hard to get. :(
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #49 on: October 04, 2013, 05:13:30 pm »
VCO's nearly complete. Haven't got much chance to do anything else all week, but I'll get the old coffee-to-electronics converter running full throttle this weekend :-+

Here it is oscillating at 5 MHz. There are a couple problems with the waveform that are easily explained:

1. Slight leak-through of the square wave onto the triangle. That's because this particular iteration of the proto board doesn't contain the opposing pulse output which is supposed to cancel that.

2. More ringing than clock bells at noon. That's because the fast rise time output of the comparator feeds through a shitload of inductance in this cobbled-together Frankenstein's Monster of circuit boards..... see attached. ::)

3. Asymmetry. I didn't set the symmetry trimmer.

I think that's pretty much it for the VCO. Everything works perfectly. I'll fix those problems in revision A of the PCB, which isn't near completion because it will contain much more than just the VCO. These frequencies and rise times, combined with the complexity of the circuit, make any sort of prototyping short of just doing the PCB and praying rather difficult.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #50 on: October 04, 2013, 08:28:51 pm »
Updated VCO schematic.

Opinion question: For the sake of schematic legibility and tidiness, would it be acceptable to follow an older style and use simple component values (like 3904 rather than PMSS3904, 12V rather than BZX84C12, etc...), and then put a proper part number as a hidden field which exports to the BOM?
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Educational function generator kit
« Reply #51 on: October 05, 2013, 02:28:10 am »
Somewhat offtopic, but was the second picture taken with a scope camera?
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #52 on: October 05, 2013, 02:29:00 am »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Jebnor

  • Regular Contributor
  • *
  • Posts: 170
  • Country: ca
  • Absolutely! Yes, kind of, sort of, not really, no.
Re: Educational function generator kit
« Reply #53 on: October 05, 2013, 05:51:19 am »
Pointless nitpick: Your prototyping construction method is more correctly called dead bug construction, it wasn't invented by Jim Williams. ;)
Sometimes called "Ugly Construction" too.
Before this, there was a typo.
 

Offline Everton

  • Contributor
  • Posts: 19
  • Country: ca
Re: Educational function generator kit
« Reply #54 on: October 06, 2013, 04:36:35 am »
Hi,

I'm new to the forum and am interested building this function generator.
I'm just trying to follow along on the VCO but seem to need a little help understanding the circuit.

I'm trying to understand the delta VC business which drives the current source and sink.  It looks to me that the position of RV1 is what determines delta VC which means that this would be a constant, which in turn would setup a constant current sink and source. Is this correct?

Incidentally, I think there may be a sign mistake on the formulas at U2A and U2B non-inverting input.  I would expect it to be (Vref -DeltaVc)/2 and (-Vref-Vc)/2 respectively.  Unless I'm missing something.
Similarly on the inverting inputs, I would expect to see (Vref -IsrcRsense-Vc)/2 and (-Vref+IsinkRSense+VC)/2.

Now since the inverting and non-inverting terminals of both U2A and U2B are at different potentials wouldn't the opamp saturate?  I see that there is a little capacitance in the feedback loop, but will 10pF keep this from happening?
If you don't have the time to do it right, where are you going to find the time to do it over?
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #55 on: October 06, 2013, 04:50:11 am »
You're right. The symmetry control selects Delta Vc, and this adds to one source and subtracts from the other, to keep the overall frequency nearly constant.

Incidentally, I think there may be a sign mistake on the formulas at U2A and U2B non-inverting input.  I would expect it to be (Vref -DeltaVc)/2 and (-Vref-Vc)/2 respectively.  Unless I'm missing something.
Similarly on the inverting inputs, I would expect to see (Vref -IsrcRsense-Vc)/2 and (-Vref+IsinkRSense+VC)/2.

Nope. Remember that a voltage divider between two potentials averages them - a sum and then a division.
U2A inverting: voltage divider between Vc and (Vref - IsrcRsense), giving the average of the two: (Vc + Vref - IsrcRsense)/2
U2A noninvering: v. div. between DVc and +Vref, giving (DVc + Vref) / 2
U2B noninverting: v. div. between Vc and -Vref, giving (Vc + -Vref)/2 = (Vc - Vref)/2
U2B inverting: v. div. between -DVc and IsinkRsense-Vref, giving (IsinkRsense-Vref-DVc)/2

The op amps won't saturate. Consider U2A. Assume Vc = 3V, DVc = 0V, and there's only 500uA flowing (too little: 3V/3k9 should give 769uA). Then the voltage at the inverting input will be higher (lower drop in R19, bringing it nearer to Vref). This will cause the output to drop, increasing the (negative) base-emitter voltage of Q1 and increasing the current.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #56 on: October 06, 2013, 02:09:18 pm »
Finally conquered the goddamn MC1496.... that's the one thing that was slowing me down, so this should start moving a bit faster soon. Schematics tonight.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Everton

  • Contributor
  • Posts: 19
  • Country: ca
Re: Educational function generator kit
« Reply #57 on: October 07, 2013, 03:48:55 am »
Right.  Got it.  That wasn't my brightest moment!

The only other thing I am not clear on is the what the purpose of the varicap.  When the inverting output of the comparator is low it would appear in parralel with C11 allowing the slope of the rising ramp to be adjusted, but I don't quite follow what the effect is when the comparator flips.  It would cause the input to the buffer to jump up (like a voltage doubler),  but why do we want this?

Thanks
If you don't have the time to do it right, where are you going to find the time to do it over?
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #58 on: October 07, 2013, 04:05:35 am »
You're right. This is because the diodes in the bridge act as small capacitors when switched off, allowing a bit of the comparator square wave to be coupled onto the integrating capacitor. You can see that a bit in the scope display a couple posts up, though it is a bit hard to make out through the ringing. The variable capacitor couples the inverse on as well so they can cancel out.

(Note that "varicap" refers to a variable capacitance diode: increasing the reverse bias widens the depletion zone, decreasing the cathode-anode capacitance. A cool device, but none in here! That's just a variable capacitor, a trimmer capacitor or "trim cap".)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #59 on: October 07, 2013, 02:55:56 pm »
Provisional schematic for the amplitude modulator. I still have some component values to play with, gains to optimize, blah blah blah... so it will definitely change. (And I'd like to try to get the carrier fully DC-coupled, though the modulator is so sensitive to tiny differential voltages that it's not easy at all.)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #60 on: October 07, 2013, 06:11:56 pm »
Spec change: Working with higher frequencies below VT and tons of GBW makes PCB layout that is both compact and good difficult. Rather than cramming everything into one tiny PCB with a thick powder coating of tiny SMD passives, the AM section will be removed to a separate PCB which will be an option for those who want amplitude modulation capability.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Educational function generator kit
« Reply #61 on: October 07, 2013, 06:51:31 pm »
When I get some free time, I will see how fast I can go using DMA to feed the DAC on a STM32 chip.

Stay tuned.
================================
https://dannyelectronics.wordpress.com/
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #62 on: October 07, 2013, 08:17:41 pm »
I'd be interested to see that - but don't forget, the whole point of this is a look at analog electronics!
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Educational function generator kit
« Reply #63 on: October 08, 2013, 01:30:57 am »
I wrote a set of routines that sets up the dac, the dma and then use a timer to trigger the dma transfer. On a 24Mhz STM32 chip, easily running 1Khz output (256 points per cycle), and output waveforms are user selectable - I wrote sine, triangle, staircase, inverted staircase and square wave. Waveform is very clean.

One issue I see: the frequency steps at the higher end of the frequency range can be significant. To avoid that, you have to increase the number of points per cycle. However, that lowers the upper end of the reachable frequencies. Essentially, it is a DDS with fixed phase accumulator. The only way for you to alter the frequency is to slow down or speed up the clock.

Not as practical.
================================
https://dannyelectronics.wordpress.com/
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Educational function generator kit
« Reply #64 on: October 08, 2013, 01:44:28 am »
The DAC of the STM32 series is very limited, worst case full scale settling time is 6 us. But you could use an external DAC with some clever usage of the SRAM interface (for the larger STM32 parts), as I've tried:

https://plus.google.com/u/0/117017735090421436012/posts/jQidPgbtKoW

8 MHz sample frequency with the 144 MHz clocked microcontroller is no problem.

But maybe start another thread for your project, this thread is about an analog function generator.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #65 on: October 08, 2013, 02:24:02 am »
A lot of those cheap-ass DDS generators floating around eBay are an 8-bit micro with a CPLD and a "DAC" (pile of resistors). Seems to be a quite usable architecture and not much more expensive than a decent 32-bit micro.

I've got the modulator properly working on breadboard right now, but the breadboard implementation is limited - the circuit's a bit too complex to build on one without assloads of parasitics everywhere, and in a circuit where 40mV at one point counts as "full scale", it really makes a difference. Just finished a quick PCB that I'll etch and test tomorrow, so more scope shots soon.
« Last Edit: October 08, 2013, 02:26:55 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #66 on: October 08, 2013, 06:21:50 pm »
Modulator prototype is done and it works great! Sort of..... somehow I managed to connect it wrong and the modulation input is inverting... :palm: That shouldn't be hard to fix, though.

Scope capture is a 10 MHz carrier modulated by a 1.4 kHz sine wave. I'll do more analysis (linearity, distortion, noise floor, suppression...) once I get the inversion rectified.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #67 on: October 08, 2013, 07:16:27 pm »
Just a copper bridge on the PCB... More tests coming. Here's a ~2 MHz carrier with 1 kHz modulation, triggered on the modulation signal on top, and triggered on the carrier on the bottom. The modulation signal is superimposed on the upper edge of the output, though it's a bit hard to make out here.

|O I just spent ten minutes trying to track down the source of a low-level, roughly 100 MHz oscillation.... finally threw the DSO at it and turned on FFT... it's not 100 MHz, it's 94.3, 100.9 and 106.1 MHz... three local radio stations...

Side question: does anybody have a TDS-300 series DSO that occasionally freezes while trying to save a hardcopy to disk? I'm kind of hoping there's a software bug and I don't have some failing memory or something.
« Last Edit: October 08, 2013, 07:37:56 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #68 on: October 08, 2013, 09:06:49 pm »
Rough plot of the response of the modulator (both the level response of the signal and the frequency response of the carrier). The bandwidth isn't what I was hoping for, but I just ran it in LTspice and confirmed that the simulation showed the same behavior. It looks to be mostly due to the B-C capacitance of the discrete differential amplifier drawing more current from the relatively high impedance (470 ohm) outputs of the modulator. I had originally planned for that to be a DMMT3904W matched pair, but I used a not-so-matched pair of transistors out of the bin to test the circuit and it works fine, so I will probably experiment with replacing them with RF transistors like BFS17W. (I could also decrease the output impedance and increase the modulator's bias current to compensate, but I don't want to risk distortion.)

Edit - sorry about the PDF, that was obnoxious :-[
« Last Edit: October 08, 2013, 09:14:49 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #69 on: October 08, 2013, 09:40:28 pm »
Nice work!

I just noted that the MC1496 is really fast. 300MHz bandwidth. I was searching for a way to do amplitude control up to 200-300MHz. I will try it. They are dirt cheap. Thanks!
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #70 on: October 08, 2013, 09:44:40 pm »
I suspect getting it to work at that frequency would involve immense difficulty. Don't forget, the output is differential and very, very small - you need a differential amplifier with lots of gain to get a usable signal. Mine has a differential gain of 100 across two stages to get 10 Vpp, so you'd need a GBW of 30 GHz... less of course if you don't need such a large amplitude, but it would still not be easy.

As for applications for this chip... I'm kind of wondering now how accurate of an analog multiplier you could make out of it. (The kind used for doing math at low frequency/DC, not modulation at RF) Analog Devices charges a small fortune for their multipliers... The Gilbert cell circuit can work as a full four-quadrant multiplier for very tiny voltages. It looks like the transistors in the 1496 are quite well matched, so maybe with a decent precision op amp to amplify the output, you could do a good job. You'd probably need a second op amp to shift one of the inputs up to a roughly 6V common mode bias, but with a bit of voltage divider cleverness it wouldn't have to be anything amazingly precise.

Too bad there are only 24 hours in a day.
« Last Edit: October 08, 2013, 10:00:20 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #71 on: October 08, 2013, 10:46:16 pm »
I suspect getting it to work at that frequency would involve immense difficulty. Don't forget, the output is differential and very, very small - you need a differential amplifier with lots of gain to get a usable signal. Mine has a differential gain of 100 across two stages to get 10 Vpp, so you'd need a GBW of 30 GHz... less of course if you don't need such a large amplitude, but it would still not be easy.
I want something between 0.1-1Vpp. For the differential amplifier maybe an AD8130 works. I have some laying around. It's for a simple heterodyne sweep generator inspired by this http://hem.passagen.se/communication/meny.html and the Wavetek 2001. But the project have a big probability to fail ;D

Quote
As for applications for this chip... I'm kind of wondering now how accurate of an analog multiplier you could make out of it. (The kind used for doing math at low frequency/DC, not modulation at RF) Analog Devices charges a small fortune for their multipliers... The Gilbert cell circuit can work as a full four-quadrant multiplier for very tiny voltages. It looks like the transistors in the 1496 are quite well matched, so maybe with a decent precision op amp to amplify the output, you could do a good job. You'd probably need a second op amp to shift one of the inputs up to a roughly 6V common mode bias, but with a bit of voltage divider cleverness it wouldn't have to be anything amazingly precise.
Looking at the MC1496 internal schematic I think the DC levels changes with temperature. So it will drift. But I'm not a EE. I have no clue.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #72 on: October 08, 2013, 10:51:20 pm »
The DC levels will drift like hell, but the differential levels should not, as long as the transistors are close together on the die and stay at the same temperature. Of course, the amplifier which subtracts the output will have to have a good CMRR.

Replacing the 3904s with BFS17W worked a treat, so I'll put together a full plot now of the linearity and frequency response. I had attempted to do noise plots as well, but the signal was below the noise floor of the DSO - I'll redo them, since the BFS17W has a higher noise figure.

I miss my Rigol. This TDS-380 is very noisy...

Dear Santa, this year for Christmas I would like a dynamic signal analyzer and a spectrum analyzer, please! I've been a good boy!
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #73 on: October 08, 2013, 11:15:30 pm »
Dear Santa, this year for Christmas I would like a dynamic signal analyzer and a spectrum analyzer, please! I've been a good boy!

Good luck!

btw: I think you can use a sound card as poor man DSA.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #74 on: October 08, 2013, 11:24:35 pm »
Screw the DSA, I want a GPIB adapter... there's nothing quite as fun as stepping the signal generator through 100 combinations of modulation amplitude and carrier frequency and writing down each output amplitude... Except perhaps knowing it's got a nice little port on the back that could automate it all...

Whole bunch of plots coming soon-ish.

OK, plots added - more to come.
« Last Edit: October 09, 2013, 02:02:14 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #75 on: October 09, 2013, 01:44:34 am »
Anybody have any clever ideas for capturing a modulated waveform on an old DSO (TDS-380)? All my attempts look like poo. Even in peak detect mode, it seems incapable of not screwing up the carrier. I wanted some data for more MATLAB analysis...
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #76 on: October 09, 2013, 01:52:28 am »
What do you want to measure?
Perhaps a demodulator (probe) helps?
 
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #77 on: October 09, 2013, 01:56:24 am »
Yes, I wanted to demodulate and measure the distortion of the modulating signal. I was hoping not to spend the time that would be required to build a demodulator probe that distorts very minimally ::)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #78 on: October 09, 2013, 01:59:33 am »
Can't you just measure the distortion of the demodulator with your 3325A and compensate it in software?
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #79 on: October 09, 2013, 02:07:26 am »
Doubtful - a "simple" demodulator probe is pretty much just a diode peak detector, and there's not much compensation I can do for the fact that anything under the threshold voltage is lost. Lost is lost. Even a "lower-distortion" one will have more distortion than this circuit, which has proven to be at least somewhat linear.

I think if I wanted to make a precision demodulator, I'd differentiate the carrier, trigger a fast sample-hold off the zero crossings of the derivative, then LP filter that around half the carrier frequency. It'd be some work to make sure it distorts minimally. I'd rather do it digitally.
« Last Edit: October 09, 2013, 02:09:46 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline adnewhouse

  • Contributor
  • Posts: 39
  • Country: us
Re: Educational function generator kit
« Reply #80 on: October 09, 2013, 02:09:25 am »
Quote
there's nothing quite as fun as stepping the signal generator through 100 combinations of modulation amplitude and carrier frequency and writing down each output amplitude... Except perhaps knowing it's got a nice little port on the back that could automate it all...
This may be the most aggravating thing I've ever heard. I feel your pain. Last year I had to calculate the standard deviation of a huge data set for school, but since it was a learning exercise we had to do it manually. The worst part? I had a calculator with stat functions and a computer less than three feet away. Yet doing it manually was required. Automation is your friend...
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #81 on: October 09, 2013, 02:11:46 am »
Last year I had to calculate the standard deviation of a huge data set for school, but since it was a learning exercise we had to do it manually.

Yep, a "learning exercise", because nothing teaches you how to do something in the real world quite like wasting a large amount of time doing it how you will never, ever do it again in the real world.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline sync

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: de
Re: Educational function generator kit
« Reply #82 on: October 09, 2013, 02:18:52 am »
Doubtful - a "simple" demodulator probe is pretty much just a diode peak detector, and there's not much compensation I can do for the fact that anything under the threshold voltage is lost. Lost is lost.
DC bias the diode. This is used in the HP 810C 410C VTVM. It uses a diode tube with about 7V forward voltage. The lowest value/tick on the scale is 50mV.
« Last Edit: October 09, 2013, 02:21:48 am by sync »
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #83 on: October 09, 2013, 02:21:40 am »
Yeah, that probably should have been obvious. I might play around with that a bit.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline GK

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Educational function generator kit
« Reply #84 on: October 09, 2013, 04:10:16 am »
A diode detector (even biased) will have very poor linearity. Since you have the unmodulated carrier signal avaliable, synchronous demodulation/AM detection with a product detector would be the best way to make a linear detector.

A linear analogue multiplier made with the '1496 will have a temperature dependant scaling factor, independent from internal device matching and external offset trims (log amps have the exact same issue). In any critical/precision application, this has to be externally compensated for, typically with a thermistor. Blow your '1496 with a heat gun and watch the amplitude of the modulated output signal increase.
« Last Edit: October 09, 2013, 04:14:35 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #85 on: October 09, 2013, 04:17:06 am »
Good point - I'll investigate that. I don't think it will be an issue - just like most function generators, it's not a "precision" modulator. But I can look into thermistor compensation if necessary. (Now that I have this working, I'm back on the homework wagon now for a couple days, so things are back to moving slowly...)

(Or were you just referring to my comment about building an analog multiplier with it?)
« Last Edit: October 09, 2013, 04:20:25 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline GK

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Educational function generator kit
« Reply #86 on: October 09, 2013, 04:22:03 am »
Now that I think of it, also look up "clamping amplifiers" from AD - makes it easy to implement a MHz-input, precision half wave rectifier suitable for AM detection.

Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GK

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Educational function generator kit
« Reply #87 on: October 09, 2013, 04:22:45 am »
(Or were you just referring to my comment about building an analog multiplier with it?)


Yes.
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #88 on: October 09, 2013, 04:35:38 am »
Quick question for anybody with a bit more experience with IC manufacturing - am I correct to assume that pin 4 (V-) on the LM7171 op amp goes to the bulk? That chip gets pretty hot even just with its own quiescent current, never mind if it's actually doing something, and I have the room to stick a copper pour under and around it to soak up some of that heat. I'm trying to get the noise down a bit, so probably not a bad idea.

Now that I think of it, also look up "clamping amplifiers" from AD - makes it easy to implement a MHz-input, precision half wave rectifier suitable for AM detection.

Every time someone suggests an AD part, I start to salivate, and my wallet runs and hides.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational f. g. kit - BJT lesson draft
« Reply #89 on: October 20, 2013, 12:49:12 am »
Not much has happened in a few days - waiting on PCBs, working on other stuff, schoolwork.......

But here is a draft of the "how BJTs work" lesson section. Anyone brave enough to dig through eight pages and help me proofread/fact-check? Note that this was written from a "how BJTs are used" perspective, not an "underlying physics" perspective, and has in many places simplified the math. I started with a simplified (forward active region only) Ebers-Moll equation, and derived the hybrid-pi equation from this. The other operating regions are explained in terms of general function, not in their full, mathematically modeled forms.

Note that I have not introduced any of the usual transistor circuits here, with the exception of the emitter follower. This is because the majority of those circuits don't require a BJT, but just a generic transconductance amplifier, and I have chosen to introduce them from that direction. (The text is designed to allow the reader to skip sections he already knows about, and doing that made it more modular.)

Warning: large file. Also, there should be figure and section hyperlinks, but those were stripped when I extracted the section from the full PDF.

bjt.pdf (2.33 MB)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #90 on: October 20, 2013, 05:03:37 am »
Tentative schematic for the AM option module.

Edit: And a draft of the PCB. Quickest way I could export it.... it's almost 3AM and I'm going the hell to sleep now :=\

Edit: Removed files to make room for Dave.
« Last Edit: October 26, 2013, 01:23:24 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational f.g. kit - AM module PCB
« Reply #91 on: October 23, 2013, 05:32:36 pm »
Final PCB for the AM module, to be sent off after the "oh shit!" moment I'm sure I'll have in six or seven hours. ::)

Schematic has not changed, see above.

Since all the headers are towards the top, I may fit one screw/standoff to the bottom side to help fasten it in.

Edit: Removed files to make room for Dave
« Last Edit: October 26, 2013, 01:22:53 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Educational function generator kit
« Reply #92 on: October 24, 2013, 04:50:08 am »
4 mounting holes at corners ?  :-//

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #93 on: October 24, 2013, 04:52:36 am »
No room, really. That board's 50x50mm, that would be a lot of space to lose to mounting holes. Considering it's lightweight, the headers at the upper right and near-upper left should be enough for horizontal support, and for vertical support at the back, and one standoff at the bottom will keep it up and keep it from lifting off.

I don't want to push the components any closer to make more space. I originally had them very tight, with no room for reference designators and barely room to avoid solder bridges. Then I remembered the target audience |O and spread them out more. That's as dense as it needs to be.
« Last Edit: October 24, 2013, 04:54:50 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #94 on: October 26, 2013, 01:11:08 am »
OK, I've got two new PCBs here. I redesigned the comparator PCB layout from scratch - it has a couple problems:

- The input and output are single-wire, ungrounded connections. Stupid, stupid stupid stupid. |O Let's see a 4ns rise square wave have to snake back through the massive loop to the one ground connection that it had......  |O |O I have no idea what I was thinking, I know better than that! :-[

- 0603 is unnecessarily small IMO, I'm backing the size out to 0805, and I also replaced the PMSS3904/6 (SC-70) with MMBT3904/6. They're cheaper, too! I will still use the occasional SC-70 where necessary (BFS17W are much cheaper than BFS17, for instance), and TSSOP for chips with more than eight pins. Those are pretty easy.

I am considering one further small change. The 4151 diodes are a bit hard to find, and depending on the phase of the moon and what the DigiKey and Mouser stockists had for breakfast, they can be available in different footprints. I may see if I can make up a "combo" footprint that will take a SOD-80, MicroMELF, or SOD-123 (at least they're all pretty much the same shape...).

Also, the final final AM module (no big changes, but I tidied it up a bit, it looked a bit crazy).

I'll send these out Sunday night, so hopefully we catch the mistakes that I'm sure they still have...

Nobody seems to bother looking at the 3D renders, so I'll just stop posting them and filling up Dave's server...
« Last Edit: October 26, 2013, 01:12:52 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Educational function generator kit
« Reply #95 on: October 31, 2013, 01:41:32 am »
I would like to have a sample of these for testing...
LAck a decent function gen right now.
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #96 on: October 31, 2013, 01:48:15 am »
These are the only two boards that will be plug-in modules, everything else goes on the single, main PCB (the remaining few options are simple enough to be just "populate optional component U6" or "omit U5 and bridge jumper JP2"), and it'll be a while before there's a sample of that, unfortunately. I tend to get in about five or six hours of design work a week between the other things I'm doing :scared:
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline AndersAnd

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: dk
Re: Educational function generator kit
« Reply #97 on: November 08, 2013, 03:35:18 pm »
Nice project, and a very useful tool to most.

Will the source code, schematics- and PCB CAD-files be available too? Or just the firmware, gerber and and PDF-schematics?

*Naturally, when I changed out the buffer circuit, I swapped the NPN and PNP transistors, and managed to blow up half the damn VCO, including half the diode bridge, one current source, at least half a TL072, and contributed to the extinction of the obsolete 2N5950 JFET...
Wouldn't it be better to base the design on a non obsolete part, or is the obsolete 2N5950 just for prototyping?
Fairchild recommends MMBF4416A as Replacement Part for 2N5950 in their  Obsolescence Notice:
2N5950: http://www.fairchildsemi.com/pf/2N/2N5950.html
MMBF4416A: http://www.fairchildsemi.com/pf/MM/MMBF4416A.html
Pretty similar specs by the looks of it, although MMBF4416A is SMD and 2N5950 is leaded.

 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #98 on: November 08, 2013, 03:43:01 pm »
The final version will have a BF545. It's just a source follower - pretty easy to find replacements as the things inevitably become declared "obsolete"... :rant: I just tested with 2N5950 because I have a pile of them (I bought 100 when production stopped and Mouser was selling them off for peanuts)

Nice project, and a very useful tool to most.

Will the source code, schematics- and PCB CAD-files be available too? Or just the firmware, gerber and and PDF-schematics?

I will make it all available when finished. (Hell, I might toss it into GitHub before then, it's all in a git repo anyway)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline AndersAnd

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: dk
Re: Educational function generator kit
« Reply #99 on: November 08, 2013, 04:25:23 pm »
It's looking like the AVR I was initially going to use is a better fit. Specifically, the ADC on the NXP chip doesn't appear to take an external reference. It is also cheaper - I can probably fit everything into a mega48 or mega88 easily. It also has the benefit of being familiar to a lot of people.
I agree that using an Atmel AVR is a good idea. A very common MCU and cheaper and easier to find locally than many ARM based MCUs. A lot of hobbyists are already familiar with AVR and you can also download a free tool-chain including GCC-compiler. Will you be programming it in C?
And since Arduino became very popular, even more hobbyists has become familiar with AVR.

A lot will already have an ISP-programmer for AVR. But otherwise clones of Thomas Fischl's USBasp (USB programmer for Atmel AVR controllers) can be bought on places like eBay or AliExpress for less than 3.5 USD with free shipping.

Or if you are willing to spend a bit more you can buy a clones Atmel's own AVRISP mkII for less than 13 USD.

And an AVR ISP programmer will be a very useful tool for many other electronics projects too.

Programming the AVR could be part you tutorial too, and something useful to learn for those not already familiar with it. Or you could just link to someone else's online tutorial.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #100 on: November 08, 2013, 04:35:22 pm »
In the current iteration I am using a PIC18F46K20. I'm not too concerned about whether the builder can program it - I'm using a QFN to save space, so I am going to solder the MCU and program it myself. I don't see much of an educational advantage to making programming the MCU part of building the kit - there's no education in "connect USB, connect ISP, type 'make program', voilà".

But yes, I am programming it in C. No assembly, no C++, and Microchip hasn't released an Ada compiler yet ;)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #101 on: November 13, 2013, 08:37:13 pm »
PCBs for the amplitude modulator and comparator are in. (I got the comparator rev. B boards first... ::))






Sadly, not much else has happened in the interim, unless "endless schoolwork" counts. That should let up soon, though.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8518
  • Country: us
    • SiliconValleyGarage
Re: Educational function generator kit
« Reply #102 on: November 14, 2013, 11:34:26 am »
Hallelujah !

Finally someone who draws proper schematics !

How i could have missed this topic until now is a complete mistery ...

Now, i stead of the obsolete 1496 try an ne603 or ad630. Those are analog multipliers.
Work great for modulation and gain adjustment

I havent looked at all schematics as i found this topic literally 2 minutes ago.

Standby for comments...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #103 on: November 14, 2013, 11:39:58 am »
Eh, I picked the 1496 for a reason (simple internal circuit, so I can write a section explaining how it actually works). It is old, but it doesn't seem to be headed for total obsolescence yet.

Hallelujah !

Finally someone who draws proper schematics !

^-^ Just so you know, after putting quite a bit of work into them, this made me smile.

Quote
I havent looked at all schematics as i found this topic literally 2 minutes ago.

Standby for comments...

 :scared: :-DD

I have a schematic for the output amp that I have not posted yet (it's not 100% complete but I will add it later today). Most of the other small pieces of schematic scattered around this thread have not been changed much, other than integrating them into a large, multipage schematic. I will see what I can put together for a total dump of my progress so far in between my classes today.
« Last Edit: November 14, 2013, 11:45:49 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8518
  • Country: us
    • SiliconValleyGarage
Re: Educational function generator kit
« Reply #104 on: November 14, 2013, 11:55:38 am »


Hallelujah !

Finally someone who draws proper schematics !

^-^ Just so you know, after putting quite a bit of work into them, this made me smile.

Seriously, after all the usual tripe and bloodwurst schematics on the internet consisting of scattered loose components wit netnames slapped on their pins , hairballs with wires running through ic symbols and discombobulated schematics with parts under any possible random angle possible and cubistic schematics where every component is a square box, these are a breath of fresh air

LISTEN UP INTERNET : THIS IS WHAT SCHEMATICS SHOULD LOOK LIKE.

I,ve gone quickly over some things. But will study them in detail tonight. One thing i noticed : your prolific usage of massive wet electrolytics .... That needs a makeover with a shotgun. Ssst , be vewey vewey quiet, i'm hunting wectrowitics...
« Last Edit: November 14, 2013, 11:58:13 am by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #105 on: November 14, 2013, 12:00:20 pm »
They're cheap! The alternatives are ceramic, tantalum and film:

Ceramic: voltage coefficient. The analog section runs at +/-15V. Nope.
Tantalum: more expensive, shorter life, catch fire. Nope.
Film: uh, nope.

Most places don't need so many. The AM board has a bunch of local rails that needed decoupling.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #106 on: November 14, 2013, 12:37:36 pm »
More schematics:

- Amplitude modulator, again. In B&W to get around a couple KiCad color plotting bugs |O And a few annotations have been changed
- Output amplifier. This is untested. In particular, the rise time limiter has not been tested at all, and the offset circuit is wrong (non-flat frequency response makes it useless). Also, the feedback loop is a bit long and may need to be compensated. I'll test this circuit next week after my exams...
- Switchable attenuator. Not much to see here
- Block diagram. Also incomplete, but at least shows the general pattern.
- Peak detector, for measuring min and max for display.
- Power supply
- Range switch. This has one error that I know of (no "all deselected" / 5 MHz setting). I'm sure my capacitor choices are up for some criticism! :scared: But that's why I'm posting!
- Phase locker/synthesizer/synchronizer. One incomplete part: R/C filter has not been selected. I may end up needing multiple R's, actually, for different ranges.
- VCO.
« Last Edit: November 14, 2013, 12:44:23 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Educational function generator kit
« Reply #107 on: November 15, 2013, 01:53:18 am »
So the final product will have 2 boards ?

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #108 on: November 15, 2013, 01:57:53 am »
Two primary boards. In order to build the comparator inside the VCO from discrete parts, and have it perform as well as I want it to, I had to place it on a separate board which plugs into the main board. The amplitude modulation option adds a third board due to its size. I am really hoping the modulation generator option will not require a fourth board, but I cannot promise that yet. The add-on boards are all pretty small; the main board is 100mm by 100mm.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Educational function generator kit
« Reply #109 on: November 15, 2013, 02:06:39 am »
Uh .. oh 4th boards, but don't worry, trust your judgment & wisdom  ;), I will just sit tight here lurking & waiting  to hear the final green light from you.  :-+

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #110 on: November 15, 2013, 02:09:01 am »
:-DD Hey, it's a lot to fit onto a board!
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Educational function generator kit
« Reply #111 on: November 15, 2013, 02:15:14 am »
Since the construction is similar to those "shields" thingy  >:D, may be you should consider to name it something like ... "AnalogUino" ... "FunGenUino" ... <puked a lot while typing these> ...  j/k :-DD

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #112 on: November 26, 2013, 07:52:42 pm »
Wow. What a busy semester. I finally got a chance to build and test one of these damn PCBs...

I am happy to say that the performance is significantly better on the PCB than in the prototype. The prototype had a bandwidth of 15 MHz, with noticeable loss starting a bit before 1 MHz. I've only tested this one up to 6 MHz (different signal source, didn't bother switching as I will do a full characterization later tonight), and the response had a slight dip at 1.5 MHz, which recovered, and no real dropoff was present all the way to 6 MHz. I'll decide tonight after taking more measurements whether I want to add a compensation network for that dip. Noise is also much lower, though I haven't yet measured that properly either.

I've also been experimenting with removing components - I've already eliminated the entire offset compensation section (that will be done by the MCU instead, which I have decided not to make optional; it's just too damn useful), and a couple small capacitors, as well as consolidating a couple resistor values. Might go electrolytic hunting tonight at well. The only one that's absolutely 100% necessary is C12 (coupling capacitor for the carrier); everything else is decoupling. Specifically, C1 and C2 (right at the power input) can probably be removed, and C14 (which bypasses the local -8V rail) can probably be removed, as the load on that rail is roughly constant current. I think C6 will be necessary (bypasses the 2V ceiling for the modulation percentage pot; this will need LF decoupling), and C9 may be necessary as this bypasses VCC for the modulator. C10 has a relatively small AC load and may be unnecessary as well, though removing it may un-flatten the frequency response a bit. I may be able to change C6 to a 10uF MLCC, as the voltage is small, but that would require modifying the PCB, which I don't want to do as I already have nine good ones.
« Last Edit: November 26, 2013, 08:10:45 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: Educational function generator kit
« Reply #113 on: November 28, 2013, 12:29:25 am »
Where's the biggest BW limitation?
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #114 on: November 28, 2013, 12:37:08 am »
Both gain stages - the dual BFS17W differential amp and the LM7171. In those configurations they end up giving about equal contributions (as planned). The tightest bandwidth restriction is probably the LM7171, though it's close - lots of gain here, so even a large GBW product is used up fast!

I must update - the higher BW was a mistake, due to the amplitude flatness of the signal generator I was using being much worse than I thought it was. I fully exercised it last night, but didn't have time to analyze the data properly. BW is about the same, actually. Noise has definitely gone down though, which I am very happy about.

There is a roughly constant-amplitude 2nd harmonic distortion that ends up summed with the output, which wasn't nearly as bad in the prototype, so I'm going to have to look into that. Something to do with matching in the bias section before the MC1496, I suspect - I might need to use 1% resistors there.
« Last Edit: November 28, 2013, 12:51:03 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #115 on: December 11, 2013, 01:47:11 am »
Damn, it's been a long time again. I promise, I'm still working on this!

Got the 100 MHz RF oscillator working perfectly! :-+

Oh, wait. It doesn't have one. |O

The present output amplifier has proved damn near impossible to stabilize, despite being damn near impossible to destabilize in simulation... Stupid parastics! :) I'm all out of ways to increase phase margin... On to attempt #2. Instead of an op amp driving a huge feedback loop around the output buffer (yes, that's not the best idea), I'm going to try to use a simple common emitter or cascode-type amplifier. The lack of feedback-controlled offset can be adjusted by the MCU, since the offset is controlled by DAC anyway, and the lack of feedback-controlled gain doesn't matter since the amplitude isn't a precision setting anyway.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Educational function generator kit
« Reply #116 on: December 11, 2013, 01:59:51 am »
Just to let you know, there are lurkers here (at least me) and enjoying your updates ....  >:D

Take your time ironing out those problems.

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #117 on: December 11, 2013, 02:12:22 am »
I am too. I love this kind of stuff - much better than the shit we're doing at school. I spent all today preparing a seven-page writeup of a low battery indicator. Nice to sit down to this for a change after that.

Speaking of seven-page writeups, I've got to get to work on the text. So far all I've got is that section on BJTs.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #118 on: December 11, 2013, 04:38:21 pm »
Jesus. I swear, next time I need an RF oscillator - forget Mr. Colpitts, the LM7171 is much more reliable. ::)

Getting it to work was reasonably simple. I am happy to say that I'm so far doing a good job of proving Danny wrong:

Quote
sqrwave risetime: no longer than 10ns, probably around 5-6ns

Let me be the very to say that if you could indeed design and implement something like that fully in the analog domain, you would have no problem work at any test equipment company as a senior person.

 ;) ;)

To be very sure I hit the 10ns limit, and the 5ns goal, I've been designing for 3ns. As usual, real life isn't quite as good as simulation, so I'm getting 4.5ns. :-+

That's at low amplitude, though. The only source I have for the real signal (high rise time and high amplitude) is the comparator module itself, which is presently tied up with the VCO doing some other tests, so I didn't have an appropriate signal source. That will come a bit later.

The ringing and overshoot are a bit worse than I'd like, but that can easily be attributed to layout. In the "final" PCB, I'll leave a few empty footprints for compensation networks of various types, so I can design those around the final layout without changing the board. (Though the likelihood of a 100% successful first prototype run of the main board is not very high, I admit.)

Some of the overshoot will be from the signal generator itself, as well as the fact that the signal came down a long cable and was not terminated 100% perfectly.

A discrete transistor-based solution was difficult because of the low overhead (output needs to span -10V to 10V before the termination, and the rails are -15V and 15V) - it had to be biased very carefully, and I'm really not a fan of "precision biasing". Recipe for failure IMHO. But taking the output buffer out of the feedback loop did the trick. 7171 stays.

I'll say this: you know you have a high-speed op amp when it doesn't work properly until you trim the leads on the feedback resistors! :D

The rise time limiter works perfectly as well, though I didn't doubt that (I more or less wanted it present in the prototype to ensure that it did not limit anything when switched off.)
« Last Edit: December 11, 2013, 04:40:17 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #119 on: December 11, 2013, 09:38:02 pm »
Since I've decided to make the MCU a required item, and I had a couple channels available in a 12-bit DAC used to set the offset voltage, I decided to restructure the frequency control. It's digital now. The MCU will implement a control loop around that to get a precise frequency (this may allow me to eliminate the PLL FPGA :-+) and also symmetry. That has removed an entire quad op amp, a trimmer, two front-panel pots, two entire auxiliary rails (+/- 12V) and a shit-ton of resistors from the VCO as well. Hell yes!

There is still a range selector. I have no clue how I'd go about removing that.

I know that removes FM. Sorry for anybody who was really wanting it :( I'll put it back if I can find a reasonably simple way, but currently I am quite frightened at how much I'm going to have to squeeze onto a PCB and looking to trim off the fat. It will still do sweep, as the DAC is fast enough for this. Don't know if I'll be able to pull off something more complex with just the MCU and DAC, but I will definitely experiment with it once I have a full prototype.
« Last Edit: December 11, 2013, 09:51:38 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #120 on: December 13, 2013, 01:05:45 am »
Hmm... testing the triangle->sine shaper, and holy hell does the THS4222D get hot. Typical temperature rise for the SOIC package at +/-7.5V is 61 degC! :scared:

Good thing they offer a version with a thermal pad. I'll be using that.

This is coming along more quickly now. :-+ I still have to finish testing the shaper and waveform switch, and I have to test the peak detector, and that's it for the main FG. Then, I have to design the secondary (modulation) signal source, which shouldn't be hard since I only need 100 kHz top frequency and 2Vp-p amplitude. After that it's layout time.

And I still have to do the text. *groan*
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Everton

  • Contributor
  • Posts: 19
  • Country: ca
Re: Educational function generator kit
« Reply #121 on: December 13, 2013, 03:16:19 am »
I am enjoying following along as you build this up (and will likely build my own once the bugs have been ironed out).  However, I am curious to see the text once you write it up.  I think I understand most of the schematics you've posted, but am curious to see how much has escaped me, it hour me knowing it!
If you don't have the time to do it right, where are you going to find the time to do it over?
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #122 on: December 13, 2013, 02:00:12 pm »
I think I will use an AD9838 monolithic DDS generator for the modulation waveform. Very simple, small, and hey, it's only $5. It just needs a filter and op amp for output and an analog switch to select between the triangle/sine and square outputs.

I am not a huge fan of using such dedicated chips. Who knows how long ADI will be making that for? So to avoid having to respin the PCB if it goes away, I will include a small footprint for a "bodge board" to be added later if I have to re-implement the circuit. It might be easier, especially if I end up making a lot of these, to run off an additional little 3x3cm 2-layer PCB than to redo the main 10x10 4-layer, especially since whatever I'd replace it with would almost certainly take up more space.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #123 on: December 14, 2013, 03:29:47 pm »
Success! Here's the sine output. Also, the HEF4053 which I am using as a switch does a fine job of blocking the square wave edges from the sine, which I was a bit worried about.

I'll add the schematic for the shaper/switch section in a few minutes when I get back to my other computer.

Some of the remaining distortion is accounted for by my impatience with the trimmers...... the FFT on my TDS380 is slow and I wasn't too concerned with sitting there tediously tweaking it until all the harmonics disappeared.

I am looking into the possibility of building FFT into the microcontroller for an "assisted calibration" mode. One of my project goals was that it could be assembled and tested with nothing more powerful than a 20 MHz scope, and that does not include FFT capability or a distortion analyzer. Of course, you could just eyeball it, but that's not very good. Shouldn't be too hard to sample the waveform with the frequency down around 100 Hz / 1 kHz and display the relative amplitudes of the 2nd and 3rd harmonics.

Edit: Schematic attached.

2nd edit: Just noticed the incorrect pin numbers on the 4053. E should be 6. Corrected, but not reuploaded.

Wow. This is suddenly coming together pretty quickly. I've got to get an AD9838 so that I can test that section, and I can test the peak detector in the meantime (that one should work just fine, though it might need a bit of HF compensation to work properly for fast waveforms).

I may also be able to bring FM back in, and still use the DAC for frequency control, just by summing the FM signal with the DAC outputs.
« Last Edit: December 14, 2013, 04:00:49 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Everton

  • Contributor
  • Posts: 19
  • Country: ca
Re: Educational function generator kit
« Reply #124 on: December 15, 2013, 12:57:25 am »
I must be missing something here.  It appears to me that you are feeding a triangle wave into a differential amp with an active load to create a sine wave.  What is causing his to form a proper sine wave?  At first I thought you the gain would be non linear due to varying Re, but that would not create a sine wave.  also, seeing that you are using an active load,  I don't honk this would happen anyway.

Please explain s I am confused!

Thanks
If you don't have the time to do it right, where are you going to find the time to do it over?
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #125 on: December 15, 2013, 01:26:03 am »
Because of the bias and levels on the differential amplifier, it ends up being a sort of symmetric pseudo-logarithmic amplifier. And a logarithmic curve can actually be fit surprisingly well to a sine wave - here's sin(x) plotted on log-log axes with a fit. (Sorry about the large size.)

I'm going to have to properly work through the math to write up the explanation for the text, so I'll post that when I've finished.

The circuit is modified for higher bandwidth from NatSemi/TI's app note AN-263 (Sine Wave Generation Techniques), supposedly by Jim Williams, under "Sine Approximation - Logarithmic Shaping". The author claims distortion of 0.35%, which is -50dB. It works great - I just tweaked it more carefully and got the 2nd, 3rd and 4th harmonics all under -60dB; the 5th, 7th, 9th and 11th come above that just a bit (also attached).
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #126 on: December 15, 2013, 01:55:22 am »
Even better, here's hyperbolic tangent (e2x-1)/(e2x+1), which is a much closer fit and is likely to be (or at least, be similar to) this "symmetric pseudo-logarithm".

Note that this only works at small voltages, which is why the voltage gets divided down by a bunch (anywhere from 22 to 45, depending on the trimmer) and then reamplified at the end.

MATLAB says that for a perfect tanh(t) scaled to fit exactly inside sin(t), maximum distortion is -73dB:

Code: [Select]
>> x = -pi/2:0.005:pi/2;
>> y_sine = sin(x);
>> y_tanh = tanh(x)/tanh(pi/2);
>> distortion = y_tanh - y_sine;
>> distortion_db = 20*log(abs(distortion));
>> max(distortion_db)

ans =

  -73.7206
« Last Edit: December 15, 2013, 02:15:48 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #127 on: December 15, 2013, 08:46:18 pm »
Holy shit! It's layout time already! :scared: :scared: :scared: Schematics attached.

There are still a couple circuit sections that are untested, but I'm waiting for parts in the mail. The layout will take a long time and these sections will be relatively quick, so I might as well get started; I won't lose much time if I have to modify or even redo them. I have left most connections to the MCU hanging, as almost all of them can go to any pin, and I will connect them as I see how they fit together on the PCB.

One preemptive explanation: I've chosen six 'standard' decoupling capacitors and given them letter names, which are listed in a table on the first page. In the schematics they are just defined by the letter name. I'm aware it's not the best practice in general; I chose to do this because it will make indexing the parts for the kit easier. Also, I realize that test points are a bit scarce. As the layout is going to be tight, I am going to try to fit in "natural" testpoints (places where it is easy to fit a scope probe without a dedicated spot) as much as possible, and add proper ones only when necessary. The exception is on the VCO outputs, which have high rise time and require careful probing.

I was originally going to use 0603 passives; earlier I changed my mind and went to 0805; I am changing my mind again, as the main board will be rather closely packed. With all I've got to fit on here, y'all are lucky I'm not using 0201... >:D The PCB will be a 100mm x 100mm four-layer.

Please critique, criticize, give helpful advice, or insult at will. :-+

One more change to make, after which I'm not going to bother repacking the schematic as PDFs for you - I am changing the JFET used in the VCO to an MMBF4416. Two reasons: 1) They're a bit cheaper, and I just bought 100 to include with the kits. 2) Their footprint is more common than that of the BF545, but also, the BF545 is specified as a symmetric JFET and will still work even in this "wrong" footprint. This way the PCB should be compatible with a wider variety of JFETs if I have to make substitutions (they do seem to be thinning out).

Edit: Well, here we go. Mother of God that's a lot of components! :scared:
« Last Edit: December 16, 2013, 01:39:19 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #128 on: December 18, 2013, 06:02:54 pm »
Hey, look what arrived today!

Rev A of the comparator. I've had rev B in my hands, assembled and working for some time now...

I hate international post......
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #129 on: December 24, 2013, 09:01:15 pm »
Speaking of the comparator......

I am looking at removing it and using a standard comparator IC. It will clean up the PCB to remove a daughterboard, and remove the cost of the board (and assembly time - it was a complex board!!). I wanted it for educational purposes, but I do have at least one other differential pair.

Of course, the HP-designed one I'm using now has some nice advantages (in particular, very nice symmetry even when operated near its frequency limit) which are proving hard to replicate with an IC.


...eh, never mind. All the comparators I can find that meet my specs need a level translator to work properly here, and by the time I'm done I've only replaced the one diff pair with the comparator IC. Discrete comparator it is!
« Last Edit: December 24, 2013, 09:32:49 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Educational function generator kit
« Reply #130 on: December 24, 2013, 09:45:42 pm »
If you need help with assembly, ship the boards to me. I enjoy hand soldering SMD and am due to have a reflow oven here quite soon
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #131 on: December 24, 2013, 09:46:51 pm »
Well, it is a kit... ;)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Educational function generator kit
« Reply #132 on: December 24, 2013, 09:50:43 pm »
Well, it is a kit... ;)
So I guess reflow would destroy the purpose of it  :). And yes, I know that the end user is supposed to assemble it.
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline quantumvolt

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Educational function generator kit
« Reply #133 on: December 25, 2013, 03:37:35 am »
I've been following your thread and admire your work. And I have been thinking about the size of the components and boards. Your last picture is very revealing - the depth of 2x daughter boards is some 3 keys on a PC keyboard.

My eyesight, my hands and my soldering tools will not be able to succeed in assembling this. I will still follow the project - but if it is to supplement/replace my XR2206 and ad hoc Wien/phase shift oscillators, I will wait and see until there maybe are assembled boards :D.

Continued good luck - it takes a bit to design this from scratch.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #134 on: December 25, 2013, 03:51:54 am »
Yep. That one is done with 0603. The second revision uses 0805, but the main board is still 0603.

Now... if I get it finished and find there is space available, I may upgrade to 0805. I currently have the parts on a relatively coarse grid in most areas, though only about 40% of them are in their "final" locations. But still, assembling this is not for the faint of heart or eye. There are a couple ridiculously minuscule packages which will be pre-soldered (the AD9838, for instance, is only available in a 0.5mm QFN, I had to use the high-thermal-performance version of the THS4222, which is very small, and even the MCP4728 - MSOP-10 - may be small for some), but that still leaves a shitload of 0603.

By the way - I just eliminated an entire schematic page: the peak detector (for amplitude reading). The MCP4728 DAC had one channel unused, so I combined that, a single comparator and a pin change interrupt on the MCU into a sort of "peak-responding SAR ADC". That will free up some PCB space, so an upgrade to 0805 becomes a bit more likely.

Here's an update on the layout effort so far.

Four-layer boards, by the way, are the best thing to happen to a guy who's anal-retentive about grounding. That entire unbroken ground plane layer is the stuff of wet dreams...
« Last Edit: December 25, 2013, 04:17:34 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: Educational function generator kit
« Reply #135 on: December 25, 2013, 10:21:53 pm »
Mail to me and I'll throw it on my spectrum analyzer. You might even get it back  :box:
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #136 on: December 26, 2013, 11:18:17 pm »
I don't have a final price yet, as I haven't put together the BOM script that I want to use and I haven't really finalized the design, but I received a question about pricing today, so I will answer it.

As I'm a "starving college student", I cannot afford to buy a huge batch of parts right away in the beginning, so the first few buyers will have to source many of the parts by themselves. I've bought a few bunches of jellybeans, and plan to buy a couple more, so you can enjoy the cost benefits of those. These are:
- MMBT3904
- MMBT3906
- MMBD4148
- 1N4001
- MMBF4146
- LM1117 in SOT-223 (There's only one... but I bought a long tape of them cheap a while ago and haven't used many, so I might as well share! There is another 1117 but it must be TO-220 for dissipation)

PCBs will be $12 total, or $10 if you omit the amplitude modulator option. They are the main 4-layer board, the comparator, the amplitude modulator, and a small board to hold the front panel buttons (and LEDs if I use any, though I haven't fully designed the panel).

I didn't do a full, proper BOM, as mentioned. I did assemble a list of all semiconductor components, as well as other major parts (enclosure, front LCD, range switch, all the "schmick" capacitors on that switch, and the PCBs). Attached. The total for those came to $84. Expect another $20-$30 for miscellaneous passives and connectors (I did forget the chunky inductors and caps in the power supply, though I am working on cutting them down a bit). The power source will be any 18V-20V 12W+ brick, so a $10 replacement laptop charger will do just fine.

Keep in mind that I have not yet worked hard at cutting the cost. I do hope to shave a good bit off, and I have a few good spots in mind.

That brings the total as of today to around $140.
« Last Edit: December 26, 2013, 11:20:08 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #137 on: December 26, 2013, 11:19:21 pm »
Mail to me and I'll throw it on my spectrum analyzer. You might even get it back  :box:

Even better, mail me the spectrum analyzer so I can take the measurements I need. You might even get it back :box:  >:D  ;)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #138 on: December 30, 2013, 04:04:30 am »
Good news and semi-bad news.

Good news: I finally completed testing everything as well as I can and it all works. Of course, I can't test it all integrated until I have a PCB. The VCO was incredibly layout-sensitive w.r.t. signal distortion, and it took a few etched prototypes to get it right.

No plots unfortunately. My only camera was missing when I did them and I couldn't be bothered to use the slow-as-molasses DSO. I'll redo the tests for inclusion in the Theory of Operation, of course.

Semi-bad news: I am taking a one week holiday from this damn thing. I swear to god, I dreamed about PCB layout last night. It's a lot of work for one guy. I need a short break or I will quickly become incapacitated by all these f*$@ing trees and be unable to see the bloody forest |O
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #139 on: January 05, 2014, 04:53:36 pm »
My PSU kit ended up more of a success than I thought... so until I get them finished and shipped, it is going to take precedence over this one. I'll still resume work tomorrow (one-week break will be over), but if both of them have tasks to be done, it will come first.

Sorry to anyone who thinks this means I'm giving up. Hell no I'm not, I've sunk a lot of work and money into this already! :D But I'd rather this take a bit longer to finish, than to work on it exclusively and finish nothing else.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline echen1024

  • Super Contributor
  • ***
  • Posts: 1660
  • Country: us
  • 15 yo Future EE
Re: Educational function generator kit
« Reply #140 on: January 05, 2014, 05:51:53 pm »
My PSU kit ended up more of a success than I thought... so until I get them finished and shipped, it is going to take precedence over this one. I'll still resume work tomorrow (one-week break will be over), but if both of them have tasks to be done, it will come first.

Sorry to anyone who thinks this means I'm giving up. Hell no I'm not, I've sunk a lot of work and money into this already! :D But I'd rather this take a bit longer to finish, than to work on it exclusively and finish nothing else.
Which PSU kit is this?
I'm not saying we should kill all stupid people. I'm just saying that we should remove all product safety labels and let natural selection do its work.

https://www.youtube.com/user/echen1024
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #141 on: January 05, 2014, 05:57:11 pm »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #142 on: January 08, 2014, 12:56:57 am »
Sorry to anyone who thinks this means I'm giving up. Hell no I'm not, I've sunk a lot of work and money into this already! :D But I'd rather this take a bit longer to finish, than to work on it exclusively and finish nothing else.

I have to apologize very sincerely for this, but I am at least temporarily giving up. This is quite simply too expensive for me to continue at the time, in both time and money, and probably will be for at least a couple months. :( As fun as this project is, I have yet to find a money tree in this forest where I live.

I will certainly keep going with simpler, less ambitious kits, though. The power supply is coming along quickly, and I've got an idea already for the next. I have a hint: the idea came to me after seeing the recently posted teardown of a Keithley SMU.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Educational function generator kit
« Reply #143 on: January 08, 2014, 01:05:02 am »
at least temporarily giving up

Keyword highlighted, I have shelved many projects for a variety of reasons.  When you get back to it, it will be with a freshened spark and new/enhanced ideas.

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Educational function generator kit
« Reply #144 on: January 08, 2014, 01:07:02 am »
Definitely. I've had a few ideas rolling around in my head that would require ripping up most of the project as I have it, and I didn't want to implement them because - well, they'd require ripping up most of the project as I have it. I'll come back with lots of fresh ideas - I already have some.

When I do come back to this, I'm going to redesign it to follow the HP 3325A's plan - all-analog signal path, but all-digital controls. Everything will be integrated into the design from the beginning (e.g. no separate AM module, as the AM circuitry will be used as the main amplitude control). Though I am considering a full multi-board solution, with each system block on a separate PCB, to avoid 1) ridiculously small parts and 2) a ridiculously dense board.
« Last Edit: January 12, 2014, 02:34:15 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf