Good news. Can't wait to see your magic. You are tenacious and talented.
Very dangerous combination; but your definitely one of the white hat engineers, so I'm not terrified.
promising indeed esp for fixed installs.. but far more limited for portable designs.
I don't yet know how to construct the bitstream... but I'm sure I'll figure it out. And once I have everything running, we should have relatively high-fidelity sine waves output without needing ANY additional components or chips! The uC would directly drive the single 8-pin DIP H-bridge output stage. I like it. :)/Steve.
In constructing the bit stream, maybe there's something to be learned from the 1-bit A/D and D/A converters used in digital audio products. They operate at sample rates of several MHz. They aren't purely digital but might be worth a look.
In that case, constructing the bit stream is simple:
Since I'm totally lame when it comes to all that math and stuff, I'd just start pumping signals into the circuit and measure what output you get for what density.
I have designed an absolutely minimal 20-cycle inner loop that allows us to output a continuous 8-bit bitstream at a rate of 6.4 megabits/second. A 16khz sine wave would then be expressed as a 400-bit long bitstream... or 100 bits per quadrant. And, intuitively, that seems pretty good for approximating a smooth-curve sine function (WAY better than 16 fixed-size PWM blocks). The entire 400-bit long bitstream, at 8-bits per byte, would therefore consume just 50 bytes of RAM.
In that case, constructing the bit stream is simple:Ha! Oh yeah... it's simple from 1000 feet. A real piece of cake! Pretty pictures!
NOW we're really cooking with gas!!/Steve.
In that case, constructing the bit stream is simple:Ha! Oh yeah... it's simple from 1000 feet. A real piece of cake! Pretty pictures!My apologies. I should have realized you'd already be working on the optimal solution, way beyond the generic one I referenced. Perhaps the link will be useful to others to illustrate the general concept.
Do you sometimes have dreams that reveal a solution? Sometimes, when I'm occupied with a particular project or task, I start dreaming it. I can only imagine that is happening to you, especially as you devote so much focus to an optimal solution.
If you are 100% into generating the signal, how will you monitor it? These chips are cheap enough you could use two.
I assume you will use an interrupt on release of the trigger switch to stop the output.
Is it possible to limit the output duration with out adding code to the loop?
There is a video on youtube about piezo tweeters to control dogs (http://www.youtube.com/watch?v=kmejVIQshMA title BARKING DOG NEXT DOOR - HIGH FREQUENCY SOUND (More Info) ). It looks like he started with the same tweeters mentioned here. But, he says that they are louder without the horn and recommends a tube to focus the sound. Steve mentioned a tube but I never found a reference to a tube in the threads I read. If the video is true the unit could be built using 1-1/2" PVC for the tube and maybe something a little smaller for the battery and PCB.
Do you feel that the inner diameter of the tube should be some whole number fraction factor of lambda?
R&D Progress Log #3 Anchor.
**** Build of configuration Debug for project TQC 20140301 1857 ****
"C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
'Building target: TQC 20140301 1857.out'
'Invoking: MSP430 Linker'
"C:/ti/ccsv5/tools/compiler/msp430_4.2.1/bin/cl430" -vmsp --abi=eabi -O4 --opt_for_speed=0 --advice:power="all" --symdebug:none --define=__MSP430G2452__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal -z -m"TQC 20140301 1857.map" --heap_size=80 --stack_size=80 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.2.1/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.2.1/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="TQC 20140301 1857_linkInfo.xml" --rom_model -o "TQC 20140301 1857.out" "./main.obj" "./AdjustableTrebleShooter-v0.5.obj" "../lnk_msp430g2452.cmd" -l"libc.a"
<Linking>
remark #10371-D: (ULP 1.1) Detected no uses of low power mode state changes using LPMx or _bis_SR_register() or __low_power_mode_x() in this project.
remark #10372-D: (ULP 4.1) Detected uninitialized Port 1 in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port 2 in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
"../lnk_msp430g2452.cmd", line 124: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".reset" size 0x4 . Available memory ranges:
>> Compilation failure
RESET size: 0x2 unused: 0x2 max hole: 0x2
error #10010: errors encountered during linking; "TQC 20140301 1857.out" not built
gmake: *** [TQC 20140301 1857.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
You are correct that the project has stopped. Steve is busy with sqrl, spinrite 6.1 and security now. He doesn't have time for this project.
I don't know when or if it will be restarted. It hasn't moved anywhere.
Regards
Adam