Author Topic: Educational function generator kit  (Read 39057 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: 2366
  • 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: 2366
  • 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: 1665
  • 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: 2366
  • 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
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1433
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!
.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf