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

0 Members and 1 Guest are viewing this topic.

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 :)
 

Online 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 :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf