Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Max038 Function Generator

Status
Not open for further replies.

Vitesse

New Member
Hi guys, I had tried using an XR2206 design to try and make a function generator but no matter what I did I just could not get it giving a stable output. So I thought I'd give the Max038 a try and seeing several other people have successfully used them in the past for this purpose.

Just wanted to get some input regarding my design at the minute to spot any mistakes and potential problems, its still work-in-progress so I have done a schematic of what I currently have breadboarded at the moment (attached).

I've checked the +/- 12V and +/-5V rails for stability using a scope and there is no noticable ripple. This time I'm taking no chances and used 4700uF 50V electrolytics between the bridge rectifier and the regulators along with 0.1uF.

You can see the results of the new circuit using the Max038 Vs the output I was getting from the XR2206 in the photo, there is a slight glitch in the sine wave however it seems I might just have a dodgy potentiometer as just tweaking it eradicates it, can anyone spot any problems with the circuit or anything I should add to improve stability etc? Already betting much better results than I was with the old XR2206 circuit.

Another thing I would like to pick your brains about is a recommendation for an OpAmp for the output stage, I need something dual-rail (+/-12V), the original circuit I borrowed ideas from was a bit obsolete and I've tried searching for an equivalent but with no luck.

I'm planning on adding controls for DC offset, using a PIC 16F4550 (bit overkill) with a 20x4 LCD and a simple pushbutton interface for frequency range selection, SPi digipot for Coarse adjustment with a normal pot for fine adjustment, and frequency counter. Considering my electrical/mechanical rather than electronics background this is a fairly ambitious project for me so all advice and assistance is greatly welcomed :)
 

Attachments

  • max038-psu.gif
    max038-psu.gif
    99.7 KB · Views: 1,056
  • max038main1.gif
    max038main1.gif
    10.2 KB · Views: 1,012
  • comparison1.jpg
    comparison1.jpg
    357.4 KB · Views: 534
Last edited:
Cheers Ian, just looking for it now, I've got some spiking on the square wave output that I'm trying to resolve before I go any further at the moment, it seems to be present at all frequencies. Not totally sure what to try at present although from re-reading the Max038 datasheet maybe my bypass capacitors are still inadequate as they recommend 1uF ceramic, or 1uF electrolytic in parallel with 1nF ceramic. I am currently using 100nF polyester film.
 
When building a function generator... DON'T scrimp on the parts list.... Use quality components... Make sure every ground path is as big as you can get it... Keep the high frequency paths straight, small as possible and uncuttered.... Make sure all unused pins are grounded and decoupling caps everywhere...
 
Cheers for the advice Ian, this is a bit of a first for me doing anything to do with high-frequency circuit design and getting it right when it comes to making the PCB. I was thinking whenit does come to the PCB stage of using mostly SMD components so I can have decoupling caps as close to the ICs as possible (also saves on drilling) and having the regulators, bridge rectifier and smoothing capacitors on a separate PCB. Also my thinking was that a double-sided board would give better grounding
 
Strangely mate mine seems to work quite well, however the square wave isnt perfect i'm getting almost like an overshoot on the rising-edge and a slight in the middle of the upper peak of the waveform.

Added a general-purpose dual-rail op-amp ua741 to amplify the output. I know this isnt really suitable for the finished circuit but I just wanted to test that things worked as expected and here's the result (attached), I would assume the op-amp doesnt react quickly enough as the square wave is being nearly turned into a triangle wave. However it amplifys the sine and triangle waves with no problem. Presumably I'll need a high speed precision op-amp for the output and preferably a non-inverting one
 

Attachments

  • squarewave-opamp1.jpg
    squarewave-opamp1.jpg
    342.3 KB · Views: 349
  • sinewave-opamp1.jpg
    sinewave-opamp1.jpg
    387.3 KB · Views: 361
Just down to luck or maybe just because i've gone overkill with decoupling caps everywhere and every +/- supply to the 038 or any of the op-amps and pots etc all have 10uF electrolytics too. Given the poor performance I got with the XR2206 on the other thread I was posting in I'm positively chuffed with how this is turning out so far.

Since I cant really do much with the circuit for now until I get hold of the new op-amps I'm gonna start work on getting the PIC added in and getting the frequency range selection working from it, I was trying to get my head around how this will work so i've attached a partial schematic to get some feedback on wether people think this will work as expected or not?

I've omitted all the other stuff from that schematic just for clarity, I was planning on driving the PIC output low to ground each capacitor through the PIC however on reflection I dont think this will work, another option would be switching them to ground using a transistor possibly say a BC547 and driving the base from the PIC.
 

Attachments

  • rangeselection.gif
    rangeselection.gif
    10.8 KB · Views: 462
Few months ago I completed the design of a filter where caps are progressively added in parallel. Each one is the collector load of an NPN transistor with emitter to ground turned on by a pin of a PIC.

Try it. It works
 
So something like this then?

If that'd work it might be helpful at the PCB stage as it means I could use capacitors close to the COSC pin of the Max038 and have the transistors right next to them, then the longer traces would be just the base connections back to the PIc which would hopefully reduce interference overall
 

Attachments

  • piccontrolcaps1.jpg
    piccontrolcaps1.jpg
    123 KB · Views: 708
So something like this then?l

Yes like that.

The first time I tried it, was to switch caps in a design with the 2206 IIRC.
 
Status
Not open for further replies.

Latest threads

Back
Top