I want to build a 60.0000 Hz source at 110V, only needs to be 5VA, so I can use a synchroscope to watch the grid frequency wobble around. I wasn't sure where to start so this will be very helpful. I'll still need some kind of an amplifier or transformer to get the voltage up from an IC at 5V to 110V. Also not sure if the synchroscope will work on square waves or if I have to generate sine waves
5VA is still quite a lot. If you're outputting that through a transformer you'll be needing to put about an amp in. And for maximum transformer efficiency you'll want to make it sinusodial. There are easier ways to watch grid frequency.
I was thinking of mounting this old synchroscope like a clock, except of course it doesn't tell time just how much faster or slower the grid frequency is to 60 Hz.
What easier ways do you suggest for kind of a grid frequency display other than a multi-meter in Hz mode?
The core problem is getting an accurate enough reference. That project uses an RTC IC; you might want to try building something that uses a PLL on a GPS pulse-per-second output.
The second problem is cleanly spotting where the zero-crossing is. You can take a mains feed from a current transformer or a regular transformer and low-pass filter it appropriately. It is then easy enough to use an op-amp to spot the zero-crossing.
Thanks for the links. Indeed if the synchroscope needle is turning clockwise I know the grid frequency is greater than 60 and if counter clockwise then less than 60 and exactly 60 no movement of the needle at all.
To me there is something about watching the inertia of the entire system change and it controlling itself to stop frequency excursions and then AGC or other human interventions to restore the balance.
One variant how to do that involves something like UCC3750 (ie. telco ringer waveform generator), another is just using sufficiently high powered audio power amplifier.
Decades ago, in college, they made us build and calibrate our own function generator, oscilloscope, and so forth from various boards and parts, as well as painstakingly document the creation and testing of these devices. I still have the rather thick lab book. I can only imagine how much more complex the situation is now!
It's not really a function generator without DC offset and proper amplitude control. I don't want to be overly negative, it's a cool project. I think there's definitely something to be said about having polished interface to a low end function generator. However, there needs to be more information on specification such as ENOB, sample rate, max Vpp, max offset and bandwidth.
Wouldn't that be pretty easy to do as well? The most crude way to have a DC offset is to just pipe the output through a voltage divider with a potentiometer no? As for amplitude control, an op amp can be used again with a potentiometer to control the resistors needed for a specific gain right?
Sure, the voltage divider works ... if the load impedance is high. Not a good idea for a 50 Ω load.
Op amp needs a dual-rail power supply, so it needs some auxiliary power, then power electronics to get both rails. Stuff starts to get complicated, and now that $1500 Keysight box starts to looks worth its price...
This. A function generator is not a trivial piece of digital electronics. It's a complex, highly analog beast, where the digital component of the circuit is actually rather small. Nowadays a dedicated IC (such as the XR2206) is the starting point for a home-made FG.
I'd even argue that the XR2206 is pretty obsolete when it comes to function generation methodologies.
For one thing, it's very limited in frequency - 1MHz max, and dependent on analog components to generate it.
For another thing, it's really limited in waveform types. Practically, you can only generate sine, triangle, and square waves. Modulation is possible, but requires extra hardware to pull off.
The advantage I see of the DDS is that, once the signal generation portion of the product is software based, you can push upgrades to functionality via software updates. Not something any XR2206 can do!
Why compare a commercially available top of the line function generator with a hobby project?
At this level you can add a couple of simple components and get 95% of the functionality and accuracy of the commercial one for a couple of bucks. Go higher than that and you might as well shell out the money for an army surplus one, but that does not get you what he wanted: an opportunity to tinker and learn.
Why compare a commercially available top of the line function generator with a hobby project?
Because as soon as you do, you start to realize that you can get quite a ways with commodity hardware. Hence, why I started this project. The research I've done on the frontend of this on what's available in the market suggests to me that there's a niche for something that's a little cheaper, and a little easier to use. I also have a hunch that portability is a nice feature for most folks as well.
There is a whole branch of Chinese manufactured pc peripherals aimed squarely at this space, digital scopes, spectrum analyzers and so on, don't they make a function generator?
Please don't take the comments I wrote above as overt criticism, I was trying to point out some of the potential pitfalls in DIY function generators. As I said your project seems really interesting, especially if the software interface is polished.
Not at all! They're all things I'm learning myself. Some were lessons I knew I was going to have to learn, but there have been a few I didn't really expect to learn about.
That HP manual was a great link. I've been studying it over the last few days. Thanks for sending it. :)
The only one I'm really kicking myself over is not including an antialiasing filter at the DAC output. Seems like a bushleague mistake considering I paid all that money to get this EE degree.
I can definitely sympathize, but anytime you take on a new project like this for the first time you're bound to at least make some stupid mistakes. I'll be following the project closely, hopefully you manage to overcome all the difficulties!
I'm not comparing it to a commercial product, I was linking a datasheet that describes how the output stage of a function generator is built. It takes a lot more than "a couple simple components" to get 95% of the functionality. I think building your own function generator is a great hobbyist project, I just wanted to point out some not so obvious gotchas.
Is there an image of the board somewhere on the public internet?
I've been reading about this on and off for 30-40 minutes now and it sounds cool. But I really just want to know what it looks like!
Edit: Finally browsing this on an actual computer, and of course there's a big honking image of the board right there on the first page. Did not see that on mobile (Android, Chrome).
It’s not a function generator. It’s a software person having a first stab at what they think a function generator is, and then discovering that it’s more complicated and harder than they realised.
It’s a first step in a learning project, not a product. They say as much in the article.
Well... it is a function generator by definition, and they are attempting to sell it, so it is also a product. I'm going to go ahead and also say that this person has had some hardware development experience as well. Not very many people could put all this together in a couple months without any HW background.
Not very many people could put all this together in a couple months without any HW background.
You are correct! I'm a professional EE by trade during the day.
I've had a lot of fun on this first pass learning about direct digital synthesis, STM32 microcontrollers, and serial consoles. The next revision, which I'm just beginning to work on, will feature a whole nother batch of electronic concepts I'm interested in. Small sampling of what I expect to learn about next inlcudes: chebyshev filters, error budgets, and multistaged opamp design.
Except the fact that XR2206 and all similar analog sig-gen-on-a-chip devices are obsolete and essentially unobtainable as raw parts. Ok, you can buy cheap chinese "arduino-like" module that purportedly is built around such chip....
I made something very similar in college many years ago too.
It's a fun project, but it's not really a business, unless you can make something unique and clearly express what it is. As a visitor to your web page, I can't tell that.
That's not a reason to stop -- we all had failed businesses at some point and you learn a lot -- but you do need to clearly articulate the value and what you're going for.
Another (free) option: If you are doing things that only require audio bandwidth, you can construct any arbitrary function generator in VCVrack and send it through the audio output. You can trivially do fm modulation, wavetable synthesis, frequency domain and phase shift synthesis, etc. A push/pull follower made from 2 transistors, an opamp, and a pot for adjustable gain would probably be a good addition. You can also use standard midi (see rs232) messages and audio inputs to control modulation etc.
Edit: also wanted to mention the python-rtmidi library, which can construct virtual midi interfaces. It synergizes nicely when used as a control interface.
One issue with your standard phone or laptop audio output is that its clock is not overly precise.
I learned this when I tried to combine the output of multiple sources generating a sawtooth wave from the same file - any two sources would sweep at around 1-2Hz.
It's still usable, just not in scenarios where you have many of them.
That's interesting. Were these two hardware outputs from the same audio device, or two different computers? It's true built in audio on most mobos is notoriously bad, and most musicians and podcasters use an external audio interface. I would imagine those don't suffer the same problems (plus they usually support higher bandwidth), though at that point the cost becomes non-negligible.
Some amount of relative drift in inevitable when the sources are independent, but yeah this suggests that the precision is only on the order of 1/48k. I cant imagine the hardware oscillator being that imprecise; crystals and mems are both better than 1/1M. I wonder if it's somehow software related. Ive seen some mysterious stuff with built in audio like variable input latency. if the output latency fluctuated similarly it might effectively introduce a low frequency modulation.
The subtitle is "do you want to get one to try?", but I can't figure out how I would do that. I might be missing a link or something, but you might want to make the funnel more obvious.
I also have no idea what the specs are; bandwidth, drive, interface, etc., so I am not really sure whether I'd be interested. I would suggest adding a brief summary of the device's capabilities to the top.
edit: just realized that you're suggesting people e-mail you to express interest at the end, but I'm probably not going to go to the trouble of writing an e-mail for the faint prospect of maybe getting a board.
The subtitle is "do you want to get one to try?", but I can't figure out how I would do that. I might be missing a link or something, but you might want to make the funnel more obvious.
Yeah, I borked that one. Shoot me an email at the blog contact link if you want one. I plan on making a little wordpress page to migrate specs and sales info onto this weekend.
I also have no idea what the specs are; bandwidth, drive, interface, etc., so I am not really sure whether I'd be interested. I would suggest adding a brief summary of the device's capabilities to the top.
Believe it or not - when it comes to specs, neither do I at this point. I've mostly been focused on implementing the serial console and UI features. I've got a vision for the next rev that I hope to complete in the next month or two.
45 comments
[ 2.2 ms ] story [ 93.1 ms ] threadPersonally as a product I'd be likely to buy it struggles without amplitude control
What easier ways do you suggest for kind of a grid frequency display other than a multi-meter in Hz mode?
People have built mains frequency counters: https://fowkc.wordpress.com/2013/12/10/mains-frequency-displ... (via https://hackaday.com/2013/12/12/mains-frequency-display/ )
The core problem is getting an accurate enough reference. That project uses an RTC IC; you might want to try building something that uses a PLL on a GPS pulse-per-second output.
The second problem is cleanly spotting where the zero-crossing is. You can take a mains feed from a current transformer or a regular transformer and low-pass filter it appropriately. It is then easy enough to use an op-amp to spot the zero-crossing.
To me there is something about watching the inertia of the entire system change and it controlling itself to stop frequency excursions and then AGC or other human interventions to restore the balance.
Thanks for the ideas and links.
Op amp needs a dual-rail power supply, so it needs some auxiliary power, then power electronics to get both rails. Stuff starts to get complicated, and now that $1500 Keysight box starts to looks worth its price...
Here's one kit:
http://electronics-diy.com/electronic_schematic.php?id=128
For one thing, it's very limited in frequency - 1MHz max, and dependent on analog components to generate it.
For another thing, it's really limited in waveform types. Practically, you can only generate sine, triangle, and square waves. Modulation is possible, but requires extra hardware to pull off.
The advantage I see of the DDS is that, once the signal generation portion of the product is software based, you can push upgrades to functionality via software updates. Not something any XR2206 can do!
At this level you can add a couple of simple components and get 95% of the functionality and accuracy of the commercial one for a couple of bucks. Go higher than that and you might as well shell out the money for an army surplus one, but that does not get you what he wanted: an opportunity to tinker and learn.
Because as soon as you do, you start to realize that you can get quite a ways with commodity hardware. Hence, why I started this project. The research I've done on the frontend of this on what's available in the market suggests to me that there's a niche for something that's a little cheaper, and a little easier to use. I also have a hunch that portability is a nice feature for most folks as well.
(Hi Jacques!)
That HP manual was a great link. I've been studying it over the last few days. Thanks for sending it. :)
The only one I'm really kicking myself over is not including an antialiasing filter at the DAC output. Seems like a bushleague mistake considering I paid all that money to get this EE degree.
http://cushychicken.github.io/bfunc-design-doc/
I'm just starting to get to work on the second version of this board, and I'm planning on addressing all of these in that design.
https://www.amazon.com/HiLetgo-AD9850-Generator-0-40MHz-Equi...
I've been reading about this on and off for 30-40 minutes now and it sounds cool. But I really just want to know what it looks like!
Edit: Finally browsing this on an actual computer, and of course there's a big honking image of the board right there on the first page. Did not see that on mobile (Android, Chrome).
It’s a first step in a learning project, not a product. They say as much in the article.
You are correct! I'm a professional EE by trade during the day.
I've had a lot of fun on this first pass learning about direct digital synthesis, STM32 microcontrollers, and serial consoles. The next revision, which I'm just beginning to work on, will feature a whole nother batch of electronic concepts I'm interested in. Small sampling of what I expect to learn about next inlcudes: chebyshev filters, error budgets, and multistaged opamp design.
Adding some might help with goal nr 5. :-)
A very stupid oversight of mine. Will be fixed once I spend some time getting a wordpress page set up this weekend.
It's a fun project, but it's not really a business, unless you can make something unique and clearly express what it is. As a visitor to your web page, I can't tell that.
That's not a reason to stop -- we all had failed businesses at some point and you learn a lot -- but you do need to clearly articulate the value and what you're going for.
Edit: also wanted to mention the python-rtmidi library, which can construct virtual midi interfaces. It synergizes nicely when used as a control interface.
I learned this when I tried to combine the output of multiple sources generating a sawtooth wave from the same file - any two sources would sweep at around 1-2Hz.
It's still usable, just not in scenarios where you have many of them.
Also I didn't have a second one to confirm that both have a good, steady sample rate.
I also have no idea what the specs are; bandwidth, drive, interface, etc., so I am not really sure whether I'd be interested. I would suggest adding a brief summary of the device's capabilities to the top.
edit: just realized that you're suggesting people e-mail you to express interest at the end, but I'm probably not going to go to the trouble of writing an e-mail for the faint prospect of maybe getting a board.
Yeah, I borked that one. Shoot me an email at the blog contact link if you want one. I plan on making a little wordpress page to migrate specs and sales info onto this weekend.
I also have no idea what the specs are; bandwidth, drive, interface, etc., so I am not really sure whether I'd be interested. I would suggest adding a brief summary of the device's capabilities to the top.
Believe it or not - when it comes to specs, neither do I at this point. I've mostly been focused on implementing the serial console and UI features. I've got a vision for the next rev that I hope to complete in the next month or two.