RQ: someone with an oscilloscope...

Discuss x0x construction and related issues

Moderators: Altitude, adafruit_support_bill, adafruit, phono, mome rath

Re: RQ: someone with an oscilloscope...

Postby antto » Wed Sep 29, 2010 2:03 am

yet so simple looking, this is a very complicated shaper

i wasn't really sure about the recording conditions when i did the previous VCO recordings, my PC was acting strange (even when recording at 192KHz - the recorded content was just 44100 upsampled to 192K) and the x0xb0x was acting strange too (sawtooth?)

today i rebooted everything (erm, actually the power went down for 5 minutes :roll: ) and re-recorded but with carefully monitoring the conditions
Image
yes, this now looks just like the simulation
and indeed the sawtooth upper part tends to get smoother

i also uploaded the recording itself, it includes various notes (transposed)
sawtooth and square side-by-side
note: the whole recording slowly "moves" this is a post-effect of my "undo" filter but it's slow enough that it doesn't matter
interesting what happens when i switch OFF the x0x at the end ;]
x0x_osc_raw004_undoHP2_44100.rar [16.5MB RAR / 33MB WAV]
note: the original recording was 192K sampling rate, but i downsampled it to 44100 (without antialiasing) for size
i think modeling this shaper is just too complicated and my brain can't handle it, also, it might result in pretty complicated code (too CPU intensive)
i post the recordings just if anyone finds it interesting or useful
i'm gonna build a model which only approximates the overal output waveform not a circuit simulation ;]
this whole thing was rather useful to me
thanks to everyone
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1030
Joined: Thu Apr 15, 2010 2:21 pm

Re: RQ: someone with an oscilloscope...

Postby phono » Wed Sep 29, 2010 2:28 pm

i would gladly oblige but i cant dump from my dso atm i never added it when i built it, but if i can find the kit (its around somewhere) ill see if i can add it, i need to do this since i want to update the avr firmware
Image
x0x #733 Image SH-101 MC-202 TB-303 TR-606 TR-808 TR-909 MKS-50 Juno-106 A-100 Virus-B E-6400 SX-150 Monotron
User avatar
phono
 
Posts: 1502
Joined: Wed May 02, 2007 3:01 pm
Location: forum whore aka 2Cv

Re: RQ: someone with an oscilloscope...

Postby phono » Wed Sep 29, 2010 2:30 pm

oops reading the first page hehe sorry, seems like you have this fixed now
Image
x0x #733 Image SH-101 MC-202 TB-303 TR-606 TR-808 TR-909 MKS-50 Juno-106 A-100 Virus-B E-6400 SX-150 Monotron
User avatar
phono
 
Posts: 1502
Joined: Wed May 02, 2007 3:01 pm
Location: forum whore aka 2Cv

Re: RQ: someone with an oscilloscope...

Postby antto » Thu Sep 30, 2010 9:45 am

my approximitation failed at some point, and it's quite difficult to keep on the road
thus, i'm still looking at the circuit and simulation output

i used LTspice this time, looking here and there
i noticed something..
Image
this is the VCO simulated at 5Hz (top image) and 12.5Hz (bottom)
i've scaled the bottom image to the same number of cycles as the top one just to make it simpler

the RED signal is obviously the "high-shelf" sawtooth (C10 R34 R35)
it's basicaly the same as the sawtooth only with an additional sharp edge (added by the formed HP filter)

the CYAN signal is the C11 LP-filter thing
it looks like, in the first part it tryies to reach either some high level (maybe the 12V source) or the n003 signal (high-shelf sawtooth)

now the interesting part
i *think* the middle point (point of transistor activation) looks like the crossing point of the RED and CYAN signals (with some bias)
i mean, in both images the RED goes down, while the CYAN tryies to go up but when it reaches a little over the RED level - BANG, the transistor activates

then, the CYAN signal seems to filter the RED one

also, the RED signal (high-shelf sawtooth) seems to get affected by the transistor SATURATE state at the end, which can also be noticed in the CYAN signal

am i right?
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1030
Joined: Thu Apr 15, 2010 2:21 pm

Re: RQ: someone with an oscilloscope...

Postby antto » Thu Sep 30, 2010 10:21 am

the CYAN signal rise part looks the same at both frequencies
so C11 must be reaching for a fixed level in that period
after that, it seems it just follows the "fall" of the RED signal
and on the next cycle of the sawtooth - it starts to rise again, from the point where it was after following the RED signal
hm.. ;]

EDIT: one more thing, in the same spirit..

the saturation point, i think it works the same way as the above

when the transistor is "active" the green signal is a flipped copy of the sawtooth (or the high-shelf sawtooth)
it goes "up"

i think the cutoff level is reached when this inverted sawtooth level is above the CYAN level or something of that sort..
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1030
Joined: Thu Apr 15, 2010 2:21 pm

Re: RQ: someone with an oscilloscope...

Postby guest » Thu Sep 30, 2010 11:55 am

so the red signal is the base voltage
and the cyan is the emitter voltage
so when the red is higher than the cyan
the transistor is off

as the red starts to go lower than they cyan
the transistor starts to turn on
and when the difference is .6v the transistor is fully on
at this point the transistor acts as an emitter follower
which means the cyan voltage will follow the red voltage
with a somewhat fixed offset of .6v

at this point the output voltage will be scaled and inverted version
of the red voltage
the ratio is r36/r45
since the red voltage creates a matching current in r45
and any current through r45 must also go through r36
and the output is off r36

this continues until the cyan voltage gets within .2v of the output
this is when the transistor begins saturation
after the base drops .6v below the collector
the output now just follows the base with .6v offset

and then the big spike happens and everything resets
the cyan tries to charge back up to 12v
at a rate determined by c11 and r45
guest
 
Posts: 3119
Joined: Fri Feb 17, 2006 4:35 am

Re: RQ: someone with an oscilloscope...

Postby antto » Thu Sep 30, 2010 11:58 am

YES! it makes sense now!
thank you thank you thank you :mrgreen: :mrgreen: :mrgreen:
time to code now ;]
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1030
Joined: Thu Apr 15, 2010 2:21 pm

Re: RQ: someone with an oscilloscope...

Postby antto » Mon Oct 04, 2010 6:27 pm

re
this is where i got so far:
Image
this is my "model" compaired against output data from LTspice
erm, the Blue and Red curves are mine
the Cyan and Green are from LTspice
and uhm, it's additive blending
but any way, i added 3 arrows

first, the C11 raises up to 12V at 7.2Hz speed
then, when transistor is active, C11 seems to be forced to follow base signal
and finaly, when the transistor hits saturation state - i *think* C11 now feeds something like 7.31V again acting as a lowpass filter, but this time with 15.9Hz speed
and the output is "shaped" by this curve approximately like: out = min(out,c11)

tho, the 7.31 value i mentioned seems to vary at higher frequencies, it goes lower (or my model is simply wrong again)

and the third arrow - i couldn't figure out this smoother transition there (my Red signal simply has a sharp edge there)
what causes it? some shaping voodoo in the transistor or is it like another lowpass filter (which would be easier to emulate)

oh and the last question: while transistor is active, the base signal is inverted and scaled by 0.4545
but it also has this offset which i can't really solve
and it also varies depending on frequency
currently i did it like so:
out = (b - off) * -0.4545 + off
(b is the base signal, "off" is the so called offset which was ~7.35, a familiar number, but it has to be raised at higher frequencies, or my model is wrong, yet again)
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1030
Joined: Thu Apr 15, 2010 2:21 pm

Re: RQ: someone with an oscilloscope...

Postby guest » Wed Oct 06, 2010 3:50 pm

the rounding of the edges has to do with the transistor voodoo
the transistor comes on slowly

the equation you have for the output in the active mode is correct
but the two offsets are different
it should be

Vo = (11.8v - .6v - Vb)*10k/22k + 5.333v = -.4545*Vb + 10.423
guest
 
Posts: 3119
Joined: Fri Feb 17, 2006 4:35 am

Re: RQ: someone with an oscilloscope...

Postby antto » Thu Oct 07, 2010 3:17 am

-0.4545*base + 10.423 didn't work, it looked correct for the very low freqs
as i said, i have to raise that offset for the higher frequencies..

i gave up with the transistor voodoo, and used an additional LP filter to "smooth" the raising edge (knee) when transistor is active
the resulting curve looks right, but then, the frequency of this new filter has to be changed depending on the sawtooth frequency, which means my "model" is wrong but i think i'll leave it for now

here's how it sounds: click
thanks guest! you're great
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1030
Joined: Thu Apr 15, 2010 2:21 pm

Re: RQ: someone with an oscilloscope...

Postby guest » Thu Oct 07, 2010 12:54 pm

that sounds great

are you varying Vb with higher frequencies
due to the effect of c10

the other thing to try is including c11 in the model
Vo = (11.8v - .6v - Vb)*10k/22k + 1uF*Vp*F*10k + 5.333v
where Vp is the sawtooth peak to peak voltage
and F is the frequency in kilohertz
this is a simplified model which breaks down pretty quickly
you can see at 1kHz it adds an offset of 60V
guest
 
Posts: 3119
Joined: Fri Feb 17, 2006 4:35 am

Re: RQ: someone with an oscilloscope...

Postby antto » Thu Oct 07, 2010 1:05 pm

yeah, my "base" signal is: (saw + 0.269 * hpfC10(saw))
the C10 filter is set to 159Hz

tho, in the simulation, the base (base is the red signal) is more than that - when the transistor saturates - the base is kinda looks like the emitter signal

i'm sure this all means i _very_ feedback loop where all of the 3 things (base emitter collector) affect each other and the result is MADNESS

so my model doesn't do it, my base signal is simply the sawtooth + a highpass-ed version of it..
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1030
Joined: Thu Apr 15, 2010 2:21 pm

Previous

Return to Making x0x

Who is online

Users browsing this forum: Altitude and 1 guest

Stuff to buy from the Adafruit store and links to product documentation!


New Products [113]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]