8038 Function generator

Discussion in 'The Projects Forum' started by bance, May 25, 2013.

  1. bance

    Thread Starter Member

    Aug 11, 2012
    315
    34
    Hi all,

    I mentioned in DRkilljoy's function generator post 'here', that I had just breadboarded an Icl8038 based function generator. Well I had and it was based on 'this' circuit.

    It worked quite well, There was some distortion of the various wave forms, but that may well have been due to the fact that I didn't have much in the way of decoupling, and also that it was on a breadboard.

    So anyway the ICL8038 is able to provide a sweep function, but that circuit didn't use this in it's design. I understand that a sweep function is useful, and I wanted it, so I started to google for a circuit that did provide this function.... Noooo joy.

    But I did find 'THIS' circuit, when I looked at it closely, I realised, that it was a much more sophisticated design. I liked the way that it filtered out the DC offset, amplified the signals to a standard level and provides a switching range. All in all, a much more proffessional design, rather than the almost reference datasheet design from the other website, but still no sweep function! So without having found a circuit that provides the said sweep function, I have to take it upon myself to do it!!!

    I've built the circuit on my breadboard and it works really well (some pictures below), I've had to substitute some cap's until I can get some of the correct tolerance but all is near enough as it should be.

    I expect to receive my polystyrene caps in a day or two, so meanwhile. I'd like to discuss the sweep function issue.

    From the datasheet (page 6) :-


    I take it that the signal that I need to apply at pin 8 is a ramp of some sort! If that's correct could I possibly use a dual op-amp instead of a single for IC5, providing a saw tooth by way of a switch in order to achieve a sweep function? I'm going to try this anyway....

    Also I was thinking I could possibly add in a small PIC (with an ADC) to provide an LED output, maybe even switch that, so as to give a frequency counter as well.

    I'm going to take this one step at a time though, so far I have a working basic design, I'm going to transfer this to matrix board, to see if I can do that successfully... then add in the extra features one by one.

    What do you think? (I know about the Pic based gen's that are available)
     
  2. Dr.killjoy

    Well-Known Member

    Apr 28, 2013
    1,190
    156
    Last edited by a moderator: May 25, 2013
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    I think you did a very presentable layout. Neatness doesn't matter to an electron but it does matter to the poor human trying to follow the circuit.

    Converting to a matrix board (I dunno that exact term, but sounds like a more permanent soldered board) is a great idea. It should teach you some more practical things.

    The same with expanding the circuit; you'll learn some more about what works and what's a problem (and also teach you that you can imporove a circuit until it no longer works ;)).

    Personally I would use an oversized board till you are all done adding things, even if it is too large for a nice box.

    Wait till you have the final version to fit it into a nice box, build that clean, and use it for years.
     
  4. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Yep, applying a sawtooth wave from another opamp should give you the sweep function.

    Congrats on getting it all working too!
     
  5. Trimalchio

    New Member

    May 3, 2013
    11
    0
    Last edited: May 27, 2013
  6. Dr.killjoy

    Well-Known Member

    Apr 28, 2013
    1,190
    156

    I found these

    Everything You Always Wanted to Know
    About the ICL8038
    http://www.intersil.com/content/dam/Intersil/documents/an01/an013.pdf

    DDS Function Generator my favorite but a little over my head for now



    http://elm-chan.org/works/asg/report_e.html
     
  7. Trimalchio

    New Member

    May 3, 2013
    11
    0
    Yes, DDS looks pretty complex, and I was just looking for something fairly basic and simple. I was wondering if you'd seen the "Everything you wanted to know ...." document. Seems to have a few confessions that the original datasheet wasn't all that it could have been. The circuit I posted seems to have taken all that stuff into account. I have seen other comments that the 8038 gets rubbishy if pushed higher than about 100Kc/s. Strange that the vast majority of 8038 circuits don't provide an external sweep input, but tend to use the sweep input just for "internal" frequency control. I may start building that circuit soon - be interested to know what success you have.
     
  8. bance

    Thread Starter Member

    Aug 11, 2012
    315
    34
    Hey all,

    Thanks for the encouragement, been busy soldering onto matrix board and working out ramp generators..... got three circuits on the breadboard at the moment, a simple 555 based integrator, an lm324 op-amp circuit and a 4029 counter with an R-2R(DAC), all with varying success.

    The 555 circuit works quite well but the ramp is not very linear, also I need to find a way to bias it so that the ramp is between 10-12 volts.

    The LM324 circuit worked yesterday but not today!!!! Haven't got a clue why.
    I haven't bothered to look at it. because I've been putting the counter/DAC circuit together.

    The first time I made a 2R-R DAC, what a NUMPTY......

    I want to try to get this working because I think that I will get the most linear ramp and the cleanest(quickest) reset from it. Also the ramp as is, gives rather long steps..... not sure why this is, could be the clock rate (most likely IMHO) or the individual resistance value (chosen arbitrarily), although I think the latter affects the impedance of the circuit rather than the step rate. And that's not all, the step seem's to skip about a bit, probably not wired correctly!

    Anyway I looked at the links sent, and I'm impressed with your "google-ability" I have to admit I'm a bit 'brute force and wade through it', which get's tiresome....(note to one's-self:= learn regular- expressions)

    I've included some pictures.... schematics to follow.

    Once again thanks all for your interest and encouragement.

    Steve.
     
  9. Dr.killjoy

    Well-Known Member

    Apr 28, 2013
    1,190
    156
  10. Trimalchio

    New Member

    May 3, 2013
    11
    0
    Looks very interesting and well thought-out. Looking for a circuit diagram - any tips on where this is in the various files attached to the link?
     
  11. Dr.killjoy

    Well-Known Member

    Apr 28, 2013
    1,190
    156
    All the way down at the bottom under download file....
     
  12. bance

    Thread Starter Member

    Aug 11, 2012
    315
    34
    Hey guys.

    I don't think this chip is capable of 400khz output, at least not clean. usable output. The shape of that square wave is dubious to say the least... if you read the text the author says that
    Whereas the EEW circuit uses an op-amp and resistor divider to attenuate all signals to a common level, this suggests to me that the latter design has been focused toward a usable, quality output, only constrained by the limitations of the chip it's self.
    It's not all about "this goes up-to eleven"
    Both the App note and the datasheet contend that the chip will not produce accurate waveforms beyond 200khz. Think about it, the output frequency depends on the voltage at pin 8 and the the capacitor at pin 10. when you get to the higher frequencies you are relying on a cap that at best is 20% accurate.
    More is not always better........
    However I do like the addition of a digital output and I think that the project was a good one, if a little over ambitious.

    All the best Steve.
     
  13. Trimalchio

    New Member

    May 3, 2013
    11
    0
    Yes, I was also a bit dubious about the 400 kHz bit - I,ve heard that 8038 limps a bit above 100kHz. The built-in f meter is something that I've been looking for a circuit for for ages - with a suitable buffered input, it could be switched to measure either the output frequency, or to make external measurements. But, I'm having a hell of a job getting some of these files to open (so can't get an overall circuit diagram) - possibly problem with Windows 7 security and permiissions settings. Can other people open them OK?
     
  14. bance

    Thread Starter Member

    Aug 11, 2012
    315
    34
    Sorry got that wrong, the higher frequencies are given by the lower value cap's but then the stray capacitance in the circuit has more effect, and this case 2pf gives a 10% error at 200khz. two pieces of wire wound together at about 1 inch long will produce just such a capacitance if not more....

    Sorry @ Trimalcio don't use windows so can't help with the files.... do you have eagle? I think these files are eagle files. Its free to use I think.

    Steve.
     
  15. bance

    Thread Starter Member

    Aug 11, 2012
    315
    34
    I was thinking about using a zero crossing detector and then divide by two in software, by way of an MCU, for the frequency meter. Should be fairly simple code!
     
  16. Dr.killjoy

    Well-Known Member

    Apr 28, 2013
    1,190
    156
    :(What are you talking about lol...
    Sorry but when you guys get like this I have to turn my head and walk away because I have no clue what the hell you talking about and my brain starts to hurt ... But anyways I am good at finding stuff and what I was trying to do was find different designs in order to help you along or anyone else with there build or redesign ...Where my heart is in welding since I am a 6th generation welder and I love working with metal but I can't right now because of where I live ....
    Oh sorry about thread jack...
     
  17. bance

    Thread Starter Member

    Aug 11, 2012
    315
    34
    Hey Jason,

    I don't think you hi-jacked the thread, I was really pleased with your contribution, it all helps....

    The zero crossing thing was just an attempt to explain to Trimalchio about how I might go about the frequency counter since that is what he's particularly interested in. But that is for later, first I want to get the sweep function going....

    Anyway we've had visitors the last couple of days so I haven't been able to spend much time working on this, but I'm sure I'll get some more to post soon!!
     
  18. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    There's a lot of "PIC based frequency meter" type kits on the internet, these have a nice LCD display.

    It might be easiest to buy one of those kits and just install it in the same box as the frequency generator.
     
  19. Trimalchio

    New Member

    May 3, 2013
    11
    0
    Thanks THE RB, I have also been thinking about a kit as a sensible way forward. Having a built-in meter removes the problem of calibrating the generator. Trouble is that the meter kits I've seen go up to over 5 MHz-ish, when you only need 100-200 kHz top - and you presumably pay for that - they aren't that "DIY cheap". But, I might go that way.
     
    Last edited: Jun 1, 2013
  20. bance

    Thread Starter Member

    Aug 11, 2012
    315
    34
    Roman you are definitely right it would be easier, but not so much fun, and I would probably learn less! I won't discount going that route, but I might have a go at it anyway. I had a quick search for frequency counter kits, and came across an old post of yours at electro-tech online, did you ever build that?

    First I need to get the sweep function working, so I posted some pictures earlier, anybody know why there's a gap in the waveform generated by the R-2R? I know the waveform is stepped, but if I use two 4029's for 8 bit resolution. I think I'll have a clean waveform.... Or is this not the right way to go?

    I've managed to get the op-amp sawtooth generator working and a level shift circuit to get it to the correct range, unfortunately I'm using the parts I have on hand and I don't have an op-amp that swings rail to rail. I've enclosed some more pictures, you can see the waveform clipping before it reaches +12volts. The datasheet for the 8038 (or rather the app-note) states that the modulating signal must go higher (in voltage) than that on pins 4&5 and suggests using a diode to drop the voltage to manage this. I've put two 1N418's in series but it's not enough, maybe I'll try an led....

    Can anybody suggest what frequency the modulated signal should be? I'm assuming that I need a fairly long rise time and a fast reset. What should the output look like when the sweep function is active? How can I test if it works?

    I've also enclosed the schematics for the sawtooth circuits.

    Steve.
     
Loading...