How would I go about creating a variable tone generator 30kHz to 50kHz? - Page 1
Forum section: electronics / beginners

author: Chaotech
author_rank: Newbie
timestamp: July 06, 2023, 06:29:10 am
content: First, I am aware I cannot hear these tones and I do not intend to listen to them this is for experimental research purposes. That said, I wish to be able to create these tones individually like on old analog tone generators or from digital input fed to something like that of a piezoelectric speaker but my understanding of these devices is lacking. I do have some component level soldering background and an old O-scope but its been more than 20 years since using themThat said, Any suggestions would be welcomed. Eventually I would love to be able to control it programmable with something like Arduino or RaspberryPi but that would be future evolved versions. The later version might actually be easier for me as I am a career computer programmer. I understand there is a lot to this request, I do not ask every detail unless you wish to spend the time, but from a high level I should be able to work my way there. Thanks

author: Ian.M
author_rank: Super Contributor
timestamp: July 06, 2023, 06:34:08 am
content: You need to specify what you mean by tone generator!Do you mean a sinewave oscillator, or would you prefer a squarewave or some other waveform?

author: EggertEnjoyer123
author_rank: Frequent Contributor
timestamp: July 06, 2023, 06:39:01 am
content: AD9833 plus an op amp amplifier.You'd probably also want an anti imaging filter, but you can probably just use a simple RC lowpass filter for that one (a cutoff of 100kHz would probably work). Any decently fast op amp (maybe ~10MHz bandwidth) would work.

author: RoGeorge
author_rank: Super Contributor
timestamp: July 06, 2023, 06:59:19 am
content: Quote from: Chaotech on July 06, 2023, 06:29:10 amYou may want to search for an AWG (Arbitrary Waveform Generator). Almost any AWG can go from 0 Hz (DC) to many MHz, which will cover the range you are interested. Siglent and Rigol are trustworthy brands yet not very expensive, and they have many models less than $1000.Modern lab instruments (like e.g. an AWG, oscilloscope, power supply, etc.) can be controlled remotely by SCPI (Standard Commands for Programmable Instruments). Instruments marked as LXI (LAN-based eXtensions for Instrumentation) can receive commands by LAN (Local Area Network). Older/second hand would usually have GPIB (General Purpose Interface Bus) instead of LXI.Sure you can try to build a generator in many ways. How easy/cheap/time consuming would be depends of the signal you need and the skills + time you want to put in it. If you can afford a generator, either new or second-hand, I would rather buy a generic one than one build a dedicated one.If you define very well what signal you need, a microcontroller (or maybe just a soundcard followed by a mixer, or by a PLL (Phase-locked loop) at its output might be enough.For the sound/ultrasound producing part, meaning amplifiers and electro-acustic transducers, that's another story. Can be many ways, you need to define what you want to achieve (put some specs and numbers), or tell what you want to study, such that people can point to relevant ways of doing that.

author: Anthocyanina
author_rank: Frequent Contributor
timestamp: July 06, 2023, 07:06:21 am
content: for about 6$ you can make this awg from this instructable:https://www.instructables.com/Arbitrary-Wave-Generator-With-the-Raspberry-Pi-Pic/i built it and designed a simple 3 transistor amplifier for it, and in the end it was like 20$ for everything, and fairly usable for the cost. i think it's the simplest to build yourself, and maybe also even the cheapest.

author: Chaotech
author_rank: Newbie
timestamp: July 06, 2023, 08:51:13 am
content: Quote from: RoGeorge on July 06, 2023, 06:59:19 amI'll check into this thank you for the detailed response!

author: Chaotech
author_rank: Newbie
timestamp: July 06, 2023, 08:57:19 am
content: Quote from: Ian.M on July 06, 2023, 06:34:08 amGood question, I didn't say much to this fact but I had hoped that there may be a solution which can provide both variable frequency AND waveform. As I do not know the particular waveform required to achieve the desired outcome. I only know the most likely frequency range theorized to produce certain effects.

author: Chaotech
author_rank: Newbie
timestamp: July 06, 2023, 09:05:10 am
content: Quote from: Anthocyanina on July 06, 2023, 07:06:21 amOh I like this.. its definitely a challenge starting from my lack of experience with Raspberry Pi but these are the kind of challenges I enjoy. I also have a friend who has continued to do component level work nearly every day since I stopped 20+ years ago he repairs medical equipment professionally and old radios, receivers & amplifiers as a side hustle he might answer a question or two along the way. Perhaps a few more for you as well

author: Terry Bites
author_rank: Super Contributor
timestamp: July 06, 2023, 11:05:23 am
content: The DDS route is ideal. I'd save myself the bother and search ebay or aliexpress for "DDS 1HZ-500KHz Function Signal Generator Sine Square Triangle Wave Frequency" 3 bucks, whats not to love? You may need a buffer/ power amp to drive your transducer.

author: SmallCog
author_rank: Frequent Contributor
timestamp: July 06, 2023, 11:25:11 am
content: A lot of cheap kits to do this, most use the XR2206 chipThis is an example, but not necessarily a recommendation:https://www.ebay.com.au/itm/401622278851?mkcid=16&mkevt=1&mkrid=705-154756-20017-0&ssspo=a26ASYzTSl2&sssrc=4429486&ssuid=fd5nzGNrSmq&var=&widget_ver=artemis&media=COPY] https://www.ebay.com.au/itm/401622278851?mkcid=16&mkevt=1&mkrid=705-154756-20017-0&ssspo=a26ASYzTSl2&sssrc=4429486&ssuid=fd5nzGNrSmq&var=&widget_ver=artemis&media=COPYIf you want a challenge you could DIY a solution based on this IC rather than buy a kit.

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: July 06, 2023, 11:27:22 am
content: Are you working on a bat repeller?

author: Ian.M
author_rank: Super Contributor
timestamp: July 06, 2023, 12:52:11 pm
content: Quote from: Chaotech on July 06, 2023, 08:57:19 amLets not play guessing games. Give us the overview of the application and the 'effects' you are hoping for, and we'll be able to suggest what sort of signal source you probably need and how to amplify its output to whatever levels you require. There's almost certainly a user here with relevant experience!I hope the following is irrelevant:Unfortunately if your desired outcome involves 'free energy', or 'over-unity', or high efficiency far field wireless power transmission, or reactionless propulsion, and similar subjects contrary to the laws of physics as generally known*, we may get a little sarcastic, but if you promise you will conduct your experiments scientifically and report your results (including negative ones) honestly, we'll promise to help with apparatus design, unless we believe its a serious risk to your health and safety, and restrain ourselves to pointing out flaws in your experimental setup and your understanding of the underlying physics that may be giving you bogus positive results.* As electromagnetism has been a major research field for over 200 years, there's very little 'low hanging fruit' left to investigate within the capabilities and budget of a garage inventor.

author: Terry Bites
author_rank: Super Contributor
timestamp: July 06, 2023, 01:28:03 pm
content: XR2206, I thought they died out in the 80's. Did they never go away or were they resurected.Superby bad frequency tempco I recall.

author: ve7xen
author_rank: Super Contributor
timestamp: July 06, 2023, 06:24:54 pm
content: 30KHz - 50KHz is within range of a 192Ks/s audio DAC.Raspberry Pi (and most other SBCs) offer native I2S, so as long as the board you want to use supports 192KHz+ sample rates, all you need is a cheap I2S breakout board for such a DAC. For example, PCM5102A boards are all over AliExpress/eBay for < $5 and will run at up to 384Ks/s (~172KHz max practical output frequency). Since your frequency range is well within this, I think this is probably the simplest/cheapest way to achieve the signal generation, and will produce the best quality signal. You will still might need to add some post processing to add gain, DC offset etc, but you'll need this anyway. It also has the advantage that you can use the wide variety of existing software (e.g. sox) to generate any waveform you want (within the available bandwidth).An RF DDS like AD9850 or that family is another option, but will cost more, perform worse, and be less flexible in waveforms than an audio solution at these frequencies, and you'll likely have to write more software yourself (though there are signal generator projects for these chips) but of course you'll have a much larger frequency range available.

author: Chaotech
author_rank: Newbie
timestamp: July 07, 2023, 03:21:19 am
content: Quote from: Terry Bites on July 06, 2023, 11:05:23 amCheap & ready made?? What's not to love! Although I imagine being of cheap Chinese manufacturing techniques the tolerances listed are likely best-case scenarios but should be ok for a start.

author: Chaotech
author_rank: Newbie
timestamp: July 07, 2023, 03:41:01 am
content: Quote from: Ian.M on July 06, 2023, 12:52:11 pmSo first off, what I am doing has nothing to do with anything you listed there though it would be considered fringe science. However, I don't think we should just so easily write off something because its "long been researched". Right now we two major theories in physics relativity and quantum mechanics which cannot be unified not to mention the dozens of niche theories. The fact that we don't have one singular theory says we don't have it right. Nikola Tesla, Clark Maxwell, René Descartes, Isaac Newton are just a tiny few names who all believed in the existence of an aether. Now-a-days we're chasing our tails looking for dark energy and dark matter to explain the problems in our theories when during Isaac Newton's time they KNEW that the aether exists. Anyone who thinks we have it right now ask themselves this one question, "How does light which slows down when passing through say glass speed back up after existing it?" There are dozens of young physicists currently reinvestigating the aether and they find that it solves all of these problems but mainstream science does not want to listen. Also there is a company in Texas currently testing Nikola Tesla's wireless energy technology its called Viziv Technologies. Most people immediately think lightning bolts flying through the air but its not at all like that. Tesla wanted to create sympathetic standing scalar waves between the tower and the receiving device. The technology is what we need in a time like this and I don't think we should write anyone off for trying something that big brother says is impossible as we've all seen they're wrong A LOT. That being said, I am not trying to work on wireless power or free energy or the like. But that doesn't mean I wish to share every detail of what I hope to do. I hope this answer satisfies your curiosity for the time being. Below are a couple links about Viziv if you wanna read about it or see the tower.https://texashillcountry.com/mysterious-tesla-tower-texas/

author: Ian.M
author_rank: Super Contributor
timestamp: July 07, 2023, 07:01:07 am
content: I was sorta expecting that . . . .If you believe you've got a patentable (and demonstrable) idea, or evidence of anything new to science, you'd obviously be extremely unwise to disclose it before you've applied for the patent / published in a peer reviewed scientific journal. In that case you'd have to give us specifications for the signal(s) you need including tolerances on all levels and waveform features and we can help you design/develop a method of generating it/them, or tell you why it cant be done (within your budget). The down-side is: without the overview you risk us missing a far cheaper (or more efficient, or more reliable etc.) method of achieving the desired effect, and if your needs change, there's a risk that whatever methods we proposed will be totally unsuitable for the changed needs so you'd have to scrap it and start over.p.s. If you believe in the existence of an aether, you have to be able to explain the negative results of both theMichelson-Morley experiment(and its successors), andFizeau's series of experimentsand their successors, without contradicting yourself!

author: Infraviolet
author_rank: Super Contributor
timestamp: July 07, 2023, 09:53:37 pm
content: You might find the best way to make this sort of thing software controllable is to have a digital potentiometer chip (MCP42100 or similar) controlled from a Pi, Arduino or other SBC or MCU. You can then have an analog, or part analog part digital circuit, doing the frequency generation, and varying the resistance varies the frequency.If these tones are to be square waes, a 555 in astable mode with the MCP42100 making both resistors variable could easily do this.

author: Ian.M
author_rank: Super Contributor
timestamp: July 08, 2023, 12:39:16 am
content: A Pi Pico + a simple R-2R DAC can be used as a 125 Msps, 8 bit resolution AWG.Seehttps://www.instructables.com/Arbitrary-Wave-Generator-With-the-Raspberry-Pi-Pic/for details.That's 2500 samples to define an arbitrary 50KHz waveform, so low pass filtering the result to remove sampling artefacts should be reasonably simple unless you need very fast risetime pulse waveforms.

author: MathWizard
author_rank: Super Contributor
timestamp: July 08, 2023, 02:21:17 am
content: It may not be that accurate but what about just some 555 tone generator circuits ? That should be cheap and easy. You could have set steps, or variable tone pretty easy.I've always wanted to make a police siren with 555's, something else to look up one of these days.

author: EPAIII
author_rank: Super Contributor
timestamp: July 08, 2023, 06:47:31 am
content: OK, I and many others here do have the skills to build a "tone generator". But the chances of our building one that fills your needs from this description and the scant other details in your posts are almost zero. If you want a generator for whatever purpose you have in mind and you are unwilling to share that purpose, then YOU need to develop a list of specific specifications. Things like what do you actually mean by "create these tones individually" (every waveform generator I have ever seen only creates one tone at a time - some devices can mix two tones from separate generators but that's another story). Also things like Voltage or power levels, accuracy in levels and frequency, accuracy in the waveform, what do you need to adjust and how, what are the input specifications of the device that these waveforms will be sent to (speaker, earphones, an amplifier that then goes somewhere, some kind of transducer (for instance, as used for Sonar if they will be used in a liquid), and probably even other details that I can not even think of.This is the problem when you want to remain silent on the use that these waveforms will be put to. If you don't tell us the purpose, then you must spell out the details, IN DETAIL.Beyond that I suggest that you spend some time looking at these search results:Arbitrary Waveform Generator:https://www.amazon.com/s?k=arbitrary+waveform+generator&crid=3V9S9BO4QQ505&sprefix=arbituary+waveform+generator%2Caps%2C6350&ref=nb_sb_ss_sc_1_28https://www.aliexpress.com/w/wholesale-arbitrary-waveform-generator.html?catId=0&initiative_id=AS_20230707224411&SearchText=arbitrary+waveform+generator&spm=a2g0o.home.1000002.0Waveform Generator:https://www.amazon.com/s?k=waveform+generator&crid=C1ZLNMTBW4KJ&sprefix=waveform+generator%2Caps%2C274&ref=nb_sb_ss_ts-doa-p_1_18https://www.aliexpress.com/w/wholesale-waveform-generator.html?catId=0&initiative_id=AS_20230707224504&SearchText=waveform+generator&spm=a2g0o.productlist.1000002.0If you are looking for something in the $5 to $25 range, be sure to scroll down and look at the second and following pages.Quote from: Chaotech on July 06, 2023, 06:29:10 am

author: Terry Bites
author_rank: Super Contributor
timestamp: July 08, 2023, 08:23:51 am
content: Even a rudimentary ee bench needs a function generator and a scope.Get an entry level usb scope with built in generator. Kill a few brids with one stone.https://www.aliexpress.com/item/1005005286495122.html?spm=a2g0o.productlist.main.23.6cf21256gpCWQG&algo_pvid=15361ad7-1b71-49f3-a43b-62b70f87d173&algo_exp_id=15361ad7-1b71-49f3-a43b-62b70f87d173-11&pdp_npi=3%40dis%21GBP%2112.38%214.19%21%21%2115.31%21%21%402145274c16887997267284070d0754%2112000033950503556%21sea%21UK%210&curPageLogUid=486nHpITWAyrAlso see DPA-1698 Dual-CH DDS Function Signal Generator Power Amplifier 0-100KHz 10W*2 $50.

author: Manul
author_rank: Super Contributor
timestamp: July 08, 2023, 09:15:49 am
content: Quote from: Chaotech on July 06, 2023, 06:29:10 amIn my opinion, research is done usinginstruments, period. So if you want to focus on research side, then do yourself a favour and invest into one. Otherwise you will be drowned in developing your own generator with all expected and unexpected difficulties, wasting your time which you can use for your experiments. With an instrument you get ease of use, accuracy, flexibility, trusted outcome, repeatability and also you look serious when you take lab selfies. So get yourself a cheap AWG, it will serve you here and in other projects.Afterthe research is done, you may decide to build your own circuit according to the exact specs found during research. That's how it should be done. Always focus on your real goals.

author: BillyO
author_rank: Super Contributor
timestamp: July 08, 2023, 04:57:41 pm
content: Quote from: Chaotech on July 07, 2023, 03:21:19 amThose "DDS 1HZ-500KHz Function Signal Generator Sine Square Triangle Wave Frequency" units are 99.9% non-functional. IF you can find the original, then it's pretty good but the market is flooded with clones that used fake TL072 op-amps that just don't work. They may be cheap, but throwing you money away is never a good idea.