This is the kind of electronics video I like most. Detailed schematic and explanation, through to breadboarding, testing and troubleshooting. I'm off to watch part 2 now, thanks.
Thanks for this. Just built a slightly similar version with no counter and am much happier with the output than I was with a "barebones" XR2206 circuit I tried before. Will you by chance be putting up schematics or a layout?
Wonderful! As it happens, i've been planning for a couple of years to build a function generator with the XR2206, of which I bought two on ebay already. Fantastic!
Oh boy my 1st homebrew project! I purchased an XR2206 kit via the Internet a while back for the sole purpose of soldering experience (plus I like to make noises). I did a very poor job in assembling the unit but it did work as best as the poor design and choice of parts allowed (the IC is a clone that can only operate at lower voltage). Well, long story short I recently removed every component off the PCB for the sole purpose of DEsoldering experience! 😂Let's see if I can put something together that meets the most of the requirements you have here. At the very least it should provide all the waveforms with sweepable frequency and amplitude. Thank you for your hard work!
This video is quite old now. Back then you didn't have PD capable USB chargers. You had to use a transformer and bridge diodes! Now days you do and they are super handy for powering projects! I use a PD 3.0 or 3.1 trigger module to get the output voltage I want. Any PD 3.X charger will provide 5v, 9v, 12v, 15v, 20v and 28v (PD3.1). This will power just about anything at 5 amps max or less. 100% of my small projects use a PD 3.x trigger board instead of a dedicated power supply. I have BT speakers that I converted to PD 3.0 power from micro USB. What took many hours to charge at 5v and 1 amp boosted to 8.2v now charges at 8.2v and 5 amps. What happens after PD 3.x enters your device, like needing 5v or 3.3v, is done with linear regs or small DC-DC. I power my o-scope, cameras, tracker, battery testers, load tester, etc all on trigger boards and PD 3.X capable USBC wall bricks. Many of the multi port versions negotiate each connection independently. A single 4 port USBC charger can be charging my phone at 15v, powering my tracker at 9v, my load tester at 12v and powering my scope at 20v all at the same time. One power supply source that covers just about everything!!! Sometimes the output DC isn't super clean, but that's easy to resolve with an electrolytic cap on the trigger board.
Very good project, I have been wanting to build a function generator for some time now but have not found a suitable design, but with the aid of your excellent video guidance I will now press on and commit to having a go myself. Thanks for sharing your invaluable knowledge.
Thank you David. adding this to my list of to do projects. I really enjoy the educational style and detail you put into these videos. I know it takes a great deal of work to do that, thank you! would love to see a tour of your lab setup.
Thanks David. I think you must have got the name David from my www.scullcom.com website which I also use to host some of my youngest son David's comic's and art. Regards, Louis
This project looks like a lot of fun. Your presentation of it was very good. clear, concise and it would be pretty simple for a beginner to understand too. I have been building something very similar in the past few weeks (bah... eBay shipping times), but it's interesting to see another approach to the same problem I tackled, I will be keeping an eye on your channel from now on. There seems to be a new EE channel popping up every week these days, and I'm glad yours is such high quality. Keep up the good work, Scullcom Hobby Electronics , you've earned a subscriber. peace
Exactly just in time project as I'm planning to builtd a function generator out of this IC and in fact I already bought one from Ebay. Great!!! Keep it up :)
32768 is the maximum of a signed int, seeing as you will have no negative values you could make it an unsigned int (this being the variable that is counting the frequency) this should allow you a range from 0- 65535. cheers!
Actually, the range is from -32768 to +32767. A more convenient way would be to use an unsigned 32-bits and use a few digits on the left side for the decimal portion (0.000 to 4294967.296). Just my 2 cents.
The cost differences being what they are (minimal), I would *never* bother with the lower-end numbers in the 1N400x parts, except for things like putting one across a relay coil or similar application, and only because I have salvaged a bunch of those. I can see a manufacturer going with those lower numbers, but for the hobbyist it's just not worth bothering with them. On the function generator portion of things, I like the 8038 chip. I build a function generator that goes from 20-20,000 Hz with no range switching. The output amplitude is consistent no matter what waveform is chosen, and I also have an optional DC offset available with a switched potentiometer that you pull to activate. I didn't choose to implement any pulse width option in this instrument as I see a pulse generator as being a separate bit of test gear. It was odd to see that "wall wart" give up when you were only pulling about 120mA or so out of it. I have boxes of those things and I don't think that I've seen any that were rated any less than a few hundred mA. On the issue you're having with the frequency counter, perhaps you have some variable declared as "int" when it should be "unsigned int". :-)
Thats a smashing project :-D, who doesnt need a signal generator and mark/space ratio control as well :-D. I guessed wrongly, i thought the compliment to the voltage standards would have been a digital multimeter, perhaps using the icl7106 or maxim equiv, but the project has to interest you first :-), you have to enjoy what your doing :-D, also there are loads of cheap multimeters around :-). The ICL8038 (old old lol ) came to mind when i looked at the title, the xr2206 looks quite similar in some ways to the old 8038, i seem to remember when i used one i connected a twin-T filter on the output for 1khz and adjusted the purity preset for cleanest output, using a amplifier and speaker +ears ha ha :-). Not sure about the counter part, i never did get the hang of mini computer jibberish, although i did make a l/c meter with a pic chip and display (not my code lol). I would use a pic based counter as there are circuits out there+code, real counter chips like the icl7126 seem obsolete :-(
zx8401ztv Thanks. I thought this project may be of interest to the hobbyist. I have some other project ideas for later. I also remember the ICL8038 which I have a few of but I find the XR2206 a little better.
Scullcom Hobby Electronics Yes im sure your right, the 8038 is an old device and possibly a pain to get, the 2206 is better :-) Dont forget, you need to enjoy your projects, there is nothing worse for you than producing videos based on demand. And you can swap to other "look inside" items if you find a nice one you really like :-D
Scullcom Hobby Electronics Nice work, you seem to know your stuff. A class A hi fi transistor audio amplifier would be a cool project or even a transistor radio, I could see you being up to making a nice project.
AC plug-pack adapters are unregulated until they're loaded, then only very roughly; they rely on the natural regulation point of the transformer *at rated load*. You were initially seeing 12V from the 78L12 because the 9VAC plug-pack was very lightly loaded and not in regulation. Once the Arduino and 74HC were added, its transformer was pulled into regulation and you were getting, at best, 11.3VDC at the input to the 78L12, which obviously isn't enough to accommodate its dropout voltage [9VAC times 1.414 equals 12.7VDC rectified, minus 1.4V (two diode drops in the bridge) equals 11.3V]. Neat project! I'm off to view Part 2...
FlyingShotsman Thanks for your comments. You will see in Part 2 of this project that I am now using a small 12 volt DC output switch mode power supply which has a maximum output rating of 5 Amps (more than enough). These modules are low cost on eBay.
the easiest way to fix the counter overflow issue is to declare the counter variable as unsigned int; that way the Arduino ide removes the negative range and extends that to a full 16bit positive range of 0-65k
Hello. I made the generator and I managed to get an 8hz sine wave...now I have to play that wave on a 4ohm coil through a final stage...can you guide me how to make the assembly?...the final stage it doesn't have to modify the sine wave, just be able to reproduce it on the coil...
Are you sure that power adapter is 9VAC. Because wouldn't that mean that there is only around +7.8 Volts or so going into the +12 Volt voltage regulator. Thumbs UP! on all your videos. GREAT JOB! David Lee.
+ElectronicWizzard That's 9VAC _RMS._ The peak voltage is about 12.7 volts. It's like the wall socket power ... 120VAC, is actually the RMS value. The peak voltage is about 169V. ... Hmm, that still is strange. The regulator likely will need a good 13 or 14V to get a reliable 12V output. (It has a minimum voltage drop) And, that's without compensating for the rectifying diodes, so it would be more like 11V (Depending on the load, that is! Unloaded, or at light load, the diode drop is lower.) I think he should change his transformer to a 10V or 12V AC transformer!
+Benjamin “Ozias” Esposti The 9V AC will charge the capacitor on the input to the regulator to around 12.7V less two diode drops in the bridge, so about 11.3V. The regulator needs about 14V at the input for 12V out, and with 11.3V the output will be 9V or so. As you say, a 12V AC transformer should suit, giving 15.6V into the regulator.
+Benjamin “Ozias” Esposti Thanks to both yourself and ElectronicWizzard for you comments. I may not answer to all the remarks every time but I still appreciate all comments as it also helps others who view my videos. Regards.
Hi Scullcom, do you fancy having a go at design/build of a time mark generator? It's difficult to justify the expense of buying a nice Tektronix or HP one on eBay (if one can be found) for something to be used once or twice per year. It would be great if you could consider it. :-)
Could you perhaps do some tutorials on simple protection circuits? For example: Over voltage, polarity, over current and so on. It is very difficult to find quality detailed instruction on protection circuits. Also a tutorial on basic fan control would be great, such as activating a fan when a MOSFET is getting too hot.
Adil Malim Thanks. The XR2206 can cover the frequency range from 0.01Hz to more than 1MHz. Simply add different value timing capacitors across pins 5 and 6 of the IC.
Hi, thank you for the video. I am currently planning to use your circuit for my own function generator. One question though: Why do you disconnect the resistor network from pin 8 when not using the pulse/ramp mode? I am thinking about using a rotary selector switch to control the different output signals and want to see how many different poles and positions I need for that.
Thanks for your comments. The XR2206 has two oscillator timing resistor options on pin 7 and pin 8. For normal operation of Sine and Triangle waveform pin 7 is used and pin 8 is normally left unused (simply left disconnected). In my circuit I am using pin 8 timing to adjust the width of the pulse in pulse mode. Depending on the logic level at pin 9 (Frequency Shift Keying Input), either one or the other of these two timing input pins (7 or 8) is activated as the oscillator timing resistor input. Pin 9 is normally left open (not used) in normal mode and in that case pin 7 is used as the default timing resistor pin. You will notice in my circuit I switch pin 9 to the pulse output pin 11 and this causes the timing pin to switch between pin 7 and pin 8 also at the same time I switch in pin 8 with its timing resistor - we now have two timing resistors available. This now allows the timing of the pulse to change (toggle) as pin 9 switches from positive to negative pulse. In this way we can alter the pulse width. Hope this explains things. Regards, Louis
Hi Louis, I got that, the question is just why you disconnect the timing resistor at pin 8 with the switch. Is there some influence on the timing when pin 8 is connected but pin 9 and 11 are not connected?
eNBeWe You could just use a single pole switch between pin 9 and pin 11 if you wish and leave the resistors on pin 8 connected. This should work fine as when pin 9 is left floating pin 7 timing resistors are used by default.
Hello there, I'm an EE student(still a novice). I was curious on why add a Schmitt trigger buffer into the arduino input, thinking of the hysteresis, won't it effect measures for the frequency? Also, what is the idea behind using the arduino to measure the frequency? I can imagine from a square wave input, the arduino through coding can count each rising edge per second and display the frequency, but how are you doing that for the sine wave and triangle wave? Or does that work only of the square wave that is matched the waveforms. Sorry writing a lot😅
+thewld2 The reason I used the Schmitt Trigger buffer feeding the Arduino was to ensure the waveform was a clean square wave so that the frequency counter function worked accurately. When you select the sine wave and triangle wave for the output you still use the output from pin 11 of the XR2206 to feed the frequency counter. The outputs at pins 2 and 11 of the XR-2206 are always present no matter what output option you select.
I've been watching your videos since Martin Lorton mentioned your channel, and I enjoy them quite a bit. Just a quick question: why are you counting graticule squares when your Rigol DS1074Z scope has a "Volts peak-to-peak" measurement function?
brian52008 My mention of counting graticule squares is a bit old school and also for the hobbyist they may have an older scope. Your right the Rigol DS1074Z scope has a "Volts peak-to-peak" measurement function which I could use.
+Scullcom Hobby Electronics Also, you should use a 10VAC or 12VAC transformer! 9VAC is insufficient to get enough voltage for the 12V regulator to operate properly.
Great stuff, very well explained. Following your instructions I have built a slightly modified version, it works very nicely but I've got a small spike on both sine and triangular waves at the top and at the bottom, it gets worse at higher frequencies. I've tried many workarounds, but none of them worked. A lot of people write about this issue in many forums, but haven't found a working solution yet. Do you have any idea on this regard? Thanks for your good work.
+Headstone Graveyards I have found that this problem may be affected by the symmetry adjustment. Also the bias voltage supplied to pin 3 can cause issues - try changing the value of the 10 uF capacitor by either decreasing to 1 uF or increasing to 25uF. As the circuit is simply supplied with a single positive supply it needs a bias voltage on pin 3 to simulate a centre point. You could also modify the circuit for a dual +12 & -12 power supply which is likely to solve your issue, in this case pin 12 would connect to the -V supply and pin 4 to the +V supply; in this case the other end of the capacitor on pin 10 would connect to the -V supply and not ground. Also the bias voltage arrangement for pin 3 would need to change so it was taken across the +V an -V supplies and not between +V and ground. Also I think the bottom legs of the two potentiometer would go to -V supply.
+Scullcom Hobby Electronics Thank you very much for your response. I tried everything you proposed, but the spike was always there. I solder the pcb hoping that a parasite capacitance from the breadboard was the problem but that didn't help. I decided then to start from the beginning with the bare minimum components (the only components I saved from the pcb are the potentiometers and the xr2206 itself) and testing every step. This time, the spikes weren't there. I guess that a faulty component was the source of the issue. I am happy though that the first time it didn't work as I have learned a lot. My next project will be a function generator build up just using op amps to produce all the kind of waves.
Thanks. The 9V input is AC and once rectified and smoothed gives about 13V to 14V which is then fed to the 12V Regulator. If you mean to add an addition 9V Regulator yes you could do that but there is no real need, as it just adds more cost. I think I did change the 78L05 to a LM7805 in a TO220 package which handles the voltage drop OK - maximum input voltage can be as high as 35V but usually 10V to 12V is used. Regards, Louis
@@scullcomhobbyelectronics1702 If you are using an external AC power transformer rated as 9VAC, hopefully its actual voltage is somewhat higher. 9 VAC rms is only 9x1.414=12.726 volts peak. This voltage is applied to the 3300uF input capacitor through two silicon diodes at 0.6V drop each, so the input voltage to the 78L12 would be only 12.726 - (2x0.6) = 11.526 VDC. Not high enough. Also, you did mention that the external power source had to be AC and not DC. I don't think that is true. You can apply a DC voltage of either polarity to the input, and the bridge will route the + and - lines appropriately. A DC "wall wart" of around 15VDC or slightly higher would work fine.
I assume that you meant "to connect the 12V and 5V regulators in parallel"? Yes, I think that would be a good way to do it. With the present series connection, the 12V regulator has to supply enough current for both the 12V and 5V rails. With a series connection, the 12V regulator will not have to supply as much current, but the 5V regulator will have higher power dissipation. For a one-off hobby project either series or parallel will work, but if you use the series connection, upgrading the 12V regulator to the higher-current LM7812 might be a safer option.
Nice project. Question! Why breadboard from left to right, and not as the circuit diagram, right to left? It just seems more logical. Perhaps you have a reason! Anyway Thanks for posting.
Seem to to be doing similar stuff,I had some xr2206's turn up as you posted this and I,m sorting a voltage standard also.You say you are using a op amp on the out put,is that used as a buffer to regulate wave levels and chained for bandwidth? Nice Channel keep going.
Paul Millard Yes I will be using an OP Amp as a buffer. I will cover it in Part 2 of this project. I hope to get Part 2 done in the next 2 weeks. At the moment I have other commitments which I need to do first so sorry for the delay.
I guess I'm missing something here, but why in the world would you not use just a dc power wall wart to power the unit. They are all over the place but trying to find an ac wall wart in a flea market would be a pain. BTW I like the video very much.
+Joseph Nicholas Thanks for your comments. The power input can either be an AC 12 power pack or a 12 DC Power pack. If you use a DC power supply unit then the bridge rectifier on the project will simply act as reverse voltage protection on the power input which means the DC supply could be connected either way and the unit will still work OK.
Hi Arun, In order to get 20V p-p you would have to change the output stage to give that level of voltage swing. This would also need a modified power supply that could feed that extra voltage level. It is possible but would require a redesign of the circuit. Regards, Louis
Thank you for creating this great project with such attention to detail, its an inspiration to us all. BTW I found this Phase-shifter circuit on the net www.tedpavlic.com/teaching/osu/ece209/lab1_intro/lab1_intro_phase_shifter.pdf , which provides a frequency -dependent phase shift with unity gain. I can now use your function Generator with the XY mode on the oscilloscope. It needs your expertise to work out how to incorporate it into the design! Again, many thanks,
I had a look at the link you provided. You could try adding this circuit in the output stage between U3B pin 5 and the switch SW4 in my schematic. Direct link to schematic I am referring to below: www.scullcom.com/Function_Generator_Schematic.pdf
Thank you for your reply, your suggestion works perfectly. I think I'll have to make a second complete circuit so that I an create Lissajous patterns! Again many thanks.
The source code is just for the frequency counter LED display. An explanation may require another video. At the moment I am working on another project. I would recommend you check out John Boxall's web site where he give a very good explanation of using MAX7219 and LED display with Arduino and explains the source code. The direct link to his page is below: tronixstuff.com/2013/10/11/tutorial-arduino-max7219-led-display-driver-ic/
Great video, very well done and documented. I just got a question, the XR2206 witch you use are cheap Chinese one or are the original? The reason I asked is because the Chinese copy has some issues regarding the power supply voltage, if you have time just have a look at forum.allaboutcircuits.com/threads/problems-with-a-xr-2206-function-generator.101369/page-2 . Thanks and keep doing this kind of videos
Thanks for your comment. The XR2206 are original which I purchased many years ago. As you say there are cheap Chinese ones also available on ebay. I did buy a couple to test in the circuit and they seemed to work OK. Thanks for the link. Regards, Louis
+omsonic I agree, but it's still nice to build your own, at least to some degree. I don't want to attempt building a computer motherboard from scratch ... talk about a real headache, hundreds of hours of work, and expensive equipment!
This is the kind of electronics video I like most. Detailed schematic and explanation, through to breadboarding, testing and troubleshooting. I'm off to watch part 2 now, thanks.
Thanks for your comments.
I agree
I've been trying to find a good design for one of these for ages. Wow, great job. HUGE thumbs up from me!
+ilike56K Many thanks.
Sorry for the delay in posting Part 2 of this project. This is due to other commitments. I will try and post Part 2 with in the next 2 weeks.
Thanks for this. Just built a slightly similar version with no counter and am much happier with the output than I was with a "barebones" XR2206 circuit I tried before.
Will you by chance be putting up schematics or a layout?
Scullcom Hobby Electronics I'm waiting for the final design as I want to build this as well sir :)..
Wonderful! As it happens, i've been planning for a couple of years to build a function generator with the XR2206, of which I bought two on ebay already. Fantastic!
Oh boy my 1st homebrew project! I purchased an XR2206 kit via the Internet a while back for the sole purpose of soldering experience (plus I like to make noises). I did a very poor job in assembling the unit but it did work as best as the poor design and choice of parts allowed (the IC is a clone that can only operate at lower voltage). Well, long story short I recently removed every component off the PCB for the sole purpose of DEsoldering experience! 😂Let's see if I can put something together that meets the most of the requirements you have here. At the very least it should provide all the waveforms with sweepable frequency and amplitude. Thank you for your hard work!
This video is quite old now. Back then you didn't have PD capable USB chargers. You had to use a transformer and bridge diodes! Now days you do and they are super handy for powering projects! I use a PD 3.0 or 3.1 trigger module to get the output voltage I want. Any PD 3.X charger will provide 5v, 9v, 12v, 15v, 20v and 28v (PD3.1). This will power just about anything at 5 amps max or less. 100% of my small projects use a PD 3.x trigger board instead of a dedicated power supply. I have BT speakers that I converted to PD 3.0 power from micro USB. What took many hours to charge at 5v and 1 amp boosted to 8.2v now charges at 8.2v and 5 amps. What happens after PD 3.x enters your device, like needing 5v or 3.3v, is done with linear regs or small DC-DC. I power my o-scope, cameras, tracker, battery testers, load tester, etc all on trigger boards and PD 3.X capable USBC wall bricks. Many of the multi port versions negotiate each connection independently. A single 4 port USBC charger can be charging my phone at 15v, powering my tracker at 9v, my load tester at 12v and powering my scope at 20v all at the same time. One power supply source that covers just about everything!!! Sometimes the output DC isn't super clean, but that's easy to resolve with an electrolytic cap on the trigger board.
What a fantastic presentation. The best I have seen in a long while. Thank you Sir.
Very good project, I have been wanting to build a function generator for some time now but have not found a suitable design, but with the aid of your excellent video guidance I will now press on and commit to having a go myself. Thanks for sharing your invaluable knowledge.
+Fred Morris Thanks for your comments and good luck with your own project.
Thank you David. adding this to my list of to do projects. I really enjoy the educational style and detail you put into these videos. I know it takes a great deal of work to do that, thank you!
would love to see a tour of your lab setup.
Thanks David. I think you must have got the name David from my www.scullcom.com website which I also use to host some of my youngest son David's comic's and art.
Regards,
Louis
Scullcom Hobby Electronics it all makes sense now :) thanks Louis.
Excellent project. Defiantly one that I'll be trying, once you've completed the series. Many thanks.
Mark Garth Your welcome.
This project looks like a lot of fun. Your presentation of it was very good. clear, concise and it would be pretty simple for a beginner to understand too. I have been building something very similar in the past few weeks (bah... eBay shipping times), but it's interesting to see another approach to the same problem I tackled, I will be keeping an eye on your channel from now on. There seems to be a new EE channel popping up every week these days, and I'm glad yours is such high quality.
Keep up the good work, Scullcom Hobby Electronics , you've earned a subscriber.
peace
Exactly just in time project as I'm planning to builtd a function generator out of this IC and in fact I already bought one from Ebay. Great!!! Keep it up :)
Hi'gak Iya Thanks for your comments.
I love your video's. Very concise . Thank you for taking the time to make them so people like me can learn!
Glad to hear you found it helpful. Regards.
32768 is the maximum of a signed int, seeing as you will have no negative values you could make it an unsigned int (this being the variable that is counting the frequency) this should allow you a range from 0- 65535. cheers!
Actually, the range is from -32768 to +32767. A more convenient way would be to use an unsigned 32-bits and use a few digits on the left side for the decimal portion (0.000 to 4294967.296). Just my 2 cents.
Keep the videos coming! Enjoying the build videos in particular.
Red Resistor I will do my best.
Perfect for me as I have the ability but not the knowledge - a big thank you
Enjoy :)
Great informative videos. Thank you for your time and effort putting them together and sharing.
Thanks Mart.
The cost differences being what they are (minimal), I would *never* bother with the lower-end numbers in the 1N400x parts, except for things like putting one across a relay coil or similar application, and only because I have salvaged a bunch of those. I can see a manufacturer going with those lower numbers, but for the hobbyist it's just not worth bothering with them.
On the function generator portion of things, I like the 8038 chip. I build a function generator that goes from 20-20,000 Hz with no range switching. The output amplitude is consistent no matter what waveform is chosen, and I also have an optional DC offset available with a switched potentiometer that you pull to activate. I didn't choose to implement any pulse width option in this instrument as I see a pulse generator as being a separate bit of test gear.
It was odd to see that "wall wart" give up when you were only pulling about 120mA or so out of it. I have boxes of those things and I don't think that I've seen any that were rated any less than a few hundred mA.
On the issue you're having with the frequency counter, perhaps you have some variable declared as "int" when it should be "unsigned int". :-)
Nice project. I'm going to have to make this. Need to find me one of the 74HC14 IC. Gotta find part 2 now.
Great video... I always wanted to build a simple function generator and this video is taking me step by step... Thanks
Otto Krauth Your welcome
Thats a smashing project :-D, who doesnt need a signal generator and mark/space ratio control as well :-D.
I guessed wrongly, i thought the compliment to the voltage standards would have been a digital multimeter, perhaps using the icl7106 or maxim equiv, but the project has to interest you first :-), you have to enjoy what your doing :-D, also there are loads of cheap multimeters around :-).
The ICL8038 (old old lol ) came to mind when i looked at the title, the xr2206 looks quite similar in some ways to the old 8038, i seem to remember when i used one i connected a twin-T filter on the output for 1khz and adjusted the purity preset for cleanest output, using a amplifier and speaker +ears ha ha :-).
Not sure about the counter part, i never did get the hang of mini computer jibberish, although i did make a l/c meter with a pic chip and display (not my code lol).
I would use a pic based counter as there are circuits out there+code, real counter chips like the icl7126 seem obsolete :-(
zx8401ztv Thanks. I thought this project may be of interest to the hobbyist. I have some other project ideas for later. I also remember the ICL8038 which I have a few of but I find the XR2206 a little better.
Scullcom Hobby Electronics Yes im sure your right, the 8038 is an old device and possibly a pain to get, the 2206 is better :-)
Dont forget, you need to enjoy your projects, there is nothing worse for you than producing videos based on demand.
And you can swap to other "look inside" items if you find a nice one you really like :-D
Scullcom Hobby Electronics Nice work, you seem to know your stuff. A class A hi fi transistor audio amplifier would be a cool project or even a transistor radio, I could see you being up to making a nice project.
This is going to look good along side my 5v precision reference standard.
I plan to do this project and maybe use it in my Ham Radio Club project plan, too. Great Video. Thanks
Good luck with your project.
AC plug-pack adapters are unregulated until they're loaded, then only very roughly; they rely on the natural regulation point of the transformer *at rated load*. You were initially seeing 12V from the 78L12 because the 9VAC plug-pack was very lightly loaded and not in regulation. Once the Arduino and 74HC were added, its transformer was pulled into regulation and you were getting, at best, 11.3VDC at the input to the 78L12, which obviously isn't enough to accommodate its dropout voltage [9VAC times 1.414 equals 12.7VDC rectified, minus 1.4V (two diode drops in the bridge) equals 11.3V]. Neat project! I'm off to view Part 2...
FlyingShotsman Thanks for your comments. You will see in Part 2 of this project that I am now using a small 12 volt DC output switch mode power supply which has a maximum output rating of 5 Amps (more than enough). These modules are low cost on eBay.
Indeed, it turned out quite nice. Well done, sir.
the easiest way to fix the counter overflow issue is to declare the counter variable as unsigned int; that way the Arduino ide removes the negative range and extends that to a full 16bit positive range of 0-65k
Adil Malim Thanks I have had a few good suggestions and will try and fix the issue before Part 2 of this project.
Your videos are very educational, good job
Antilevitation Thank you.
Nice project. Thank you sir.
Hello. I made the generator and I managed to get an 8hz sine wave...now I have to play that wave on a 4ohm coil through a final stage...can you guide me how to make the assembly?...the final stage it doesn't have to modify the sine wave, just be able to reproduce it on the coil...
What is the lowest frequency you obtained with a clean squarewave?.... mine craps out at around 60Hz
Are you sure that power adapter is 9VAC. Because wouldn't that mean that there is only around +7.8 Volts or so going into the +12 Volt voltage regulator. Thumbs UP! on all your videos. GREAT JOB! David Lee.
+ElectronicWizzard
That's 9VAC _RMS._ The peak voltage is about 12.7 volts.
It's like the wall socket power ... 120VAC, is actually the RMS value. The peak voltage is about 169V.
... Hmm, that still is strange. The regulator likely will need a good 13 or 14V to get a reliable 12V output. (It has a minimum voltage drop)
And, that's without compensating for the rectifying diodes, so it would be more like 11V (Depending on the load, that is! Unloaded, or at light load, the diode drop is lower.)
I think he should change his transformer to a 10V or 12V AC transformer!
+Benjamin “Ozias” Esposti The 9V AC will charge the capacitor on the input to the regulator to around 12.7V less two diode drops in the bridge, so about 11.3V. The regulator needs about 14V at the input for 12V out, and with 11.3V the output will be 9V or so. As you say, a 12V AC transformer should suit, giving 15.6V into the regulator.
+Steven Heaton Thanks for the comments.
lol neither ElectronicWizzard nor myself were thanked .... oh well .. *hides in a hole*
(XDDD)
+Benjamin “Ozias” Esposti Thanks to both yourself and ElectronicWizzard for you comments. I may not answer to all the remarks every time but I still appreciate all comments as it also helps others who view my videos. Regards.
Hi Scullcom, do you fancy having a go at design/build of a time mark generator?
It's difficult to justify the expense of buying a nice Tektronix or HP one on eBay (if one can be found) for something to be used once or twice per year. It would be great if you could consider it. :-)
Could you perhaps do some tutorials on simple protection circuits? For example: Over voltage, polarity, over current and so on. It is very difficult to find quality detailed instruction on protection circuits. Also a tutorial on basic fan control would be great, such as activating a fan when a MOSFET is getting too hot.
SeaMonkey Thanks for your comments. I will consider your suggestions for a future video.
How you chouse 3300uF after diode bridge? What ripple is posible after diode bridge and before DC converter? Thank you!
I have given some details in my previous answer to your other question.
Regards,
Louis
Great video!
Amazing project! Will definitely build this one up. Whats the absolute maximum frequency that this IC can produce?
Adil Malim Thanks. The XR2206 can cover the frequency range from 0.01Hz to more than 1MHz. Simply add different value timing capacitors across pins 5 and 6 of the IC.
Hi, thank you for the video. I am currently planning to use your circuit for my own function generator.
One question though: Why do you disconnect the resistor network from pin 8 when not using the pulse/ramp mode? I am thinking about using a rotary selector switch to control the different output signals and want to see how many different poles and positions I need for that.
Thanks for your comments.
The XR2206 has two oscillator timing resistor options on pin 7 and pin 8. For normal operation of Sine and Triangle waveform pin 7 is used and pin 8 is normally left unused (simply left disconnected). In my circuit I am using pin 8 timing to adjust the width of the pulse in pulse mode. Depending on the logic level at pin 9 (Frequency Shift Keying Input), either one or the other of these two timing input pins (7 or 8) is activated as the oscillator timing resistor input. Pin 9 is normally left open (not used) in normal mode and in that case pin 7 is used as the default timing resistor pin.
You will notice in my circuit I switch pin 9 to the pulse output pin 11 and this causes the timing pin to switch between pin 7 and pin 8 also at the same time I switch in pin 8 with its timing resistor - we now have two timing resistors available. This now allows the timing of the pulse to change (toggle) as pin 9 switches from positive to negative pulse. In this way we can alter the pulse width.
Hope this explains things.
Regards,
Louis
Hi Louis,
I got that, the question is just why you disconnect the timing resistor at pin 8 with the switch. Is there some influence on the timing when pin 8 is connected but pin 9 and 11 are not connected?
eNBeWe You could just use a single pole switch between pin 9 and pin 11 if you wish and leave the resistors on pin 8 connected. This should work fine as when pin 9 is left floating pin 7 timing resistors are used by default.
Hello there, I'm an EE student(still a novice). I was curious on why add a Schmitt trigger buffer into the arduino input, thinking of the hysteresis, won't it effect measures for the frequency? Also, what is the idea behind using the arduino to measure the frequency? I can imagine from a square wave input, the arduino through coding can count each rising edge per second and display the frequency, but how are you doing that for the sine wave and triangle wave? Or does that work only of the square wave that is matched the waveforms. Sorry writing a lot😅
+thewld2 The reason I used the Schmitt Trigger buffer feeding the Arduino was to ensure the waveform was a clean square wave so that the frequency counter function worked accurately. When you select the sine wave and triangle wave for the output you still use the output from pin 11 of the XR2206 to feed the frequency counter. The outputs at pins 2 and 11 of the XR-2206 are always present no matter what output option you select.
Good Show Today!
Mooky Mann Thanks.
I've been watching your videos since Martin Lorton mentioned your channel, and I enjoy them quite a bit. Just a quick question: why are you counting graticule squares when your Rigol DS1074Z scope has a "Volts peak-to-peak" measurement function?
brian52008 My mention of counting graticule squares is a bit old school and also for the hobbyist they may have an older scope. Your right the Rigol DS1074Z scope has a "Volts peak-to-peak" measurement function which I could use.
Isn't that 78L05 working a tad too hard with an input of 12V?
David Jubb Thanks. I have changed it to a 1 Amp version and added a small heatsink.
+Scullcom Hobby Electronics
Also, you should use a 10VAC or 12VAC transformer!
9VAC is insufficient to get enough voltage for the 12V regulator to operate properly.
Great stuff, very well explained.
Following your instructions I have built a slightly modified version, it works very nicely but I've got a small spike on both sine and triangular waves at the top and at the bottom, it gets worse at higher frequencies.
I've tried many workarounds, but none of them worked. A lot of people write about this issue in many forums, but haven't found a working solution yet.
Do you have any idea on this regard?
Thanks for your good work.
+Headstone Graveyards I have found that this problem may be affected by the symmetry adjustment. Also the bias voltage supplied to pin 3 can cause issues - try changing the value of the 10 uF capacitor by either decreasing to 1 uF or increasing to 25uF. As the circuit is simply supplied with a single positive supply it needs a bias voltage on pin 3 to simulate a centre point. You could also modify the circuit for a dual +12 & -12 power supply which is likely to solve your issue, in this case pin 12 would connect to the -V supply and pin 4 to the +V supply; in this case the other end of the capacitor on pin 10 would connect to the -V supply and not ground. Also the bias voltage arrangement for pin 3 would need to change so it was taken across the +V an -V supplies and not between +V and ground. Also I think the bottom legs of the two potentiometer would go to -V supply.
+Scullcom Hobby Electronics Thank you very much for your response.
I tried everything you proposed, but the spike was always there. I solder the pcb hoping that a parasite capacitance from the breadboard was the problem but that didn't help.
I decided then to start from the beginning with the bare minimum components (the only components I saved from the pcb are the potentiometers and the xr2206 itself) and testing every step. This time, the spikes weren't there. I guess that a faulty component was the source of the issue.
I am happy though that the first time it didn't work as I have learned a lot.
My next project will be a function generator build up just using op amps to produce all the kind of waves.
+Headstone Graveyards Glad to hear you fixed your problem.
Fantastic video! Question...
Why is 12V feeding into the 5V regulator? Wouldn't it be better to connect the 12V and 9V regulators parallel?
Thanks. The 9V input is AC and once rectified and smoothed gives about 13V to 14V which is then fed to the 12V Regulator. If you mean to add an addition 9V Regulator yes you could do that but there is no real need, as it just adds more cost. I think I did change the 78L05 to a LM7805 in a TO220 package which handles the voltage drop OK - maximum input voltage can be as high as 35V but usually 10V to 12V is used.
Regards,
Louis
@@scullcomhobbyelectronics1702 If you are using an external AC power transformer rated as 9VAC, hopefully its actual voltage is somewhat higher. 9 VAC rms is only 9x1.414=12.726 volts peak. This voltage is applied to the 3300uF input capacitor through two silicon diodes at 0.6V drop each, so the input voltage to the 78L12 would be only 12.726 - (2x0.6) = 11.526 VDC. Not high enough. Also, you did mention that the external power source had to be AC and not DC. I don't think that is true. You can apply a DC voltage of either polarity to the input, and the bridge will route the + and - lines appropriately. A DC "wall wart" of around 15VDC or slightly higher would work fine.
I assume that you meant "to connect the 12V and 5V regulators in parallel"? Yes, I think that would be a good way to do it. With the present series connection, the 12V regulator has to supply enough current for both the 12V and 5V rails. With a series connection, the 12V regulator will not have to supply as much current, but the 5V regulator will have higher power dissipation. For a one-off hobby project either series or parallel will work, but if you use the series connection, upgrading the 12V regulator to the higher-current LM7812 might be a safer option.
Nice project. Question! Why breadboard from left to right, and not as the circuit diagram, right to left? It just seems more logical. Perhaps you have a reason! Anyway Thanks for posting.
elboa8 No real reason, it was just one of those things. It just I had the pots mounted on one side otherwise I could turn the breadboard around!!
cool video many thanks
Wayne Turner Your welcome
No matter what, I cannot get the "Random "function to work mate
Seem to to be doing similar stuff,I had some xr2206's turn up as you posted this and I,m sorting a voltage standard also.You say you are using a op amp on the out put,is that used as a buffer to regulate wave levels and chained for bandwidth?
Nice Channel keep going.
Paul Millard Yes I will be using an OP Amp as a buffer. I will cover it in Part 2 of this project. I hope to get Part 2 done in the next 2 weeks. At the moment I have other commitments which I need to do first so sorry for the delay.
Could you also reliably have a variable capacitor for the frequency
In the circuit I described a variable capacitor would not be practicable as the timing capacitor values are large at 0.22uF and 0.02uF.
Hi;
I had a similar problem when using 78m05.
From the 78L12 datasheet: "Output Current up to 100 mA"
Try a regular 7812 instead.
Thanks for the comment.
can you make circuit of discharge speed of spark plug coil in milli or nano second
just try to find the ilusive xr2206
what is the capacitance of capacitor connected between pins 5 and 6 ? Can't read that properly.
The value of the capacitor is 0.02μF.
I guess I'm missing something here, but why in the world would you not use just a dc power wall wart to power the unit. They are all over the place but trying to find an ac wall wart in a flea market would be a pain. BTW I like the video very much.
+Joseph Nicholas Thanks for your comments. The power input can either be an AC 12 power pack or a 12 DC Power pack. If you use a DC power supply unit then the bridge rectifier on the project will simply act as reverse voltage protection on the power input which means the DC supply could be connected either way and the unit will still work OK.
Great video. Could someone give me the location of the correct FreqCounter library?
Ron Henderson The link to the FreqCounter library is interface.khm.de/index.php/lab/interfaces-advanced/arduino-frequency-counter-library/
Ron Henderson Ron just update the link to the FreqCounter library above.
🌹🌹🌹👍❤️
can the amplitude be increased to 20vp-p
Hi Arun,
In order to get 20V p-p you would have to change the output stage to give that level of voltage swing. This would also need a modified power supply that could feed that extra voltage level. It is possible but would require a redesign of the circuit.
Regards,
Louis
Hi
nice videos ,can you make a video on 2 channel function generator ?
Just watch this video twice.
Thank you for creating this great project with such attention to detail, its an inspiration to us all. BTW I found this Phase-shifter circuit on the net www.tedpavlic.com/teaching/osu/ece209/lab1_intro/lab1_intro_phase_shifter.pdf , which provides a frequency -dependent phase shift with unity gain. I can now use your function Generator with the XY mode on the oscilloscope. It needs your expertise to work out how to incorporate it into the design! Again, many thanks,
I had a look at the link you provided. You could try adding this circuit in the output stage between U3B pin 5 and the switch SW4 in my schematic. Direct link to schematic I am referring to below:
www.scullcom.com/Function_Generator_Schematic.pdf
Thank you for your reply, your suggestion works perfectly. I think I'll have to make a second complete circuit so that I an create Lissajous patterns! Again many thanks.
can you make it to Mhz
I would look at another design for higher frequencies in the MHz region.
Can you give please give explanation of source code?
The source code is just for the frequency counter LED display. An explanation may require another video. At the moment I am working on another project. I would recommend you check out John Boxall's web site where he give a very good explanation of using MAX7219 and LED display with Arduino and explains the source code. The direct link to his page is below:
tronixstuff.com/2013/10/11/tutorial-arduino-max7219-led-display-driver-ic/
thanks a lot :)
Great video, very well done and documented. I just got a question, the XR2206 witch you use are cheap Chinese one or are the original? The reason I asked is because the Chinese copy has some issues regarding the power supply voltage, if you have time just have a look at forum.allaboutcircuits.com/threads/problems-with-a-xr-2206-function-generator.101369/page-2 . Thanks and keep doing this kind of videos
Thanks for your comment. The XR2206 are original which I purchased many years ago. As you say there are cheap Chinese ones also available on ebay. I did buy a couple to test in the circuit and they seemed to work OK. Thanks for the link.
Regards,
Louis
using a 2206 is kinda cheating.
+omsonic
I agree, but it's still nice to build your own, at least to some degree.
I don't want to attempt building a computer motherboard from scratch ... talk about a real headache, hundreds of hours of work, and expensive equipment!
Depends on your goal. Wiring up an XR2206 is MUCH harder than putting together a simple Esaki oscillator.
dat lab
Why so serious?..... I havn't seen you smile once during he whole series?..... electronics is supposed to be fun man......
bulid