#garfield Logs
May 10 2021
#garfield Calendar
12:39 AM rue_shop1: haha I shifted the wrong way to make 10 bits into 8
03:39 AM polprog: it is, you just need to add an antialiasing filter
03:39 AM polprog: and the nyquist and shannon theorem works out
07:48 AM aandrew: yep I had a *great* book on digital signal processing that explained this well but can't remember the stupid title anymore
08:34 AM rue_mohr: what cutoff do you use for it?
08:35 AM rue_mohr: not just Fsample/2
09:11 AM aandrew: well you need to make sure you have enough filtering to eliminate enough energy above fsample/2
09:11 AM aandrew: so a simple rc with a cutoff at fsample/2 would be insufficient
09:19 AM rue_mohr: I'd expect that
04:46 PM polprog: i found a book in PDF that lists the part numbers for COMECON-produced ICs and their western counterparts
04:46 PM polprog: useful, as usually the COMECON part nos dont show up in datasheet search or google
04:48 PM polprog: https://historiainformatyki.pl/skan.php?doc_id=1503&type=pdf&for_download=1
05:22 PM polprog: wow. These transformers from the trash TV board can make a 100V sine wave on the secondary easil
05:22 PM polprog: y
05:22 PM polprog: im feeding them about 1V amplitude (so 2vpp) and i had to stop
05:22 PM polprog: but around 30-ish khz they are AMAZING
05:22 PM polprog: connecting a 1:1k probe from the high voltahe resistor
05:26 PM polprog: 42-43 khz is the peak
05:26 PM polprog: noo that doesnt make sense
05:27 PM polprog: i have to work it out
05:27 PM polprog: 410mV in
05:27 PM polprog: scope reads 34.4V out
05:27 PM polprog: and thats via a 1M-1k divider
05:27 PM polprog: 34V across the 1kohm
05:27 PM polprog: what the fuck
05:27 PM * polprog moves it away so that his hands are not over it when typing
05:28 PM polprog: 3.4kV???
05:28 PM polprog: that cant be it
05:32 PM polprog: ah nah
05:32 PM polprog: i had the probe on the primary side at 1:1 instead 1:10
05:32 PM polprog: so it's 340V
05:32 PM polprog: wait no
05:32 PM polprog: ermagherd
05:33 PM polprog: i have it all screwed uo
05:33 PM polprog: up
05:34 PM polprog: 42.15kHz; 6.3Vamp input, 810mV output reading = 810V output
05:36 PM polprog: the optimal region seems to be between 30khz and 100kHz
05:37 PM polprog: 3V in -> 610V out
05:37 PM polprog: 203:1 ratio
05:38 PM polprog: so probably 200 since the divider is not exactly 1000x
05:38 PM polprog: and that's in transformer mode of operation, id like to see the flyback on that thing
06:27 PM Tom_itx is now known as Tom_L
06:34 PM rue_mohr: polprog, its rated for 30kv
06:34 PM polprog: what is?
06:35 PM polprog: it looked like kv range from the creepage distances
06:35 PM rue_mohr: the flyback secondary
06:35 PM rue_mohr: usually have a votlage multiplier on them
06:37 PM polprog: these just go to the connectors
06:37 PM polprog: i wonder what was that from, plasma TV?
06:38 PM rue_mohr: hmm
06:38 PM rue_mohr: I cant get that whole pdf
06:38 PM rue_mohr: just the first 500k
06:38 PM polprog: for the transformers or that one i linked?
06:38 PM rue_mohr: oh that is the whole doc
06:39 PM rue_mohr: strange
06:39 PM polprog: yeah it's just tables and the toc
06:41 PM rue_mohr: interesting
08:28 PM Tom_itx is now known as Tom_L
09:07 PM rue_shop1: 17.0365kHz
09:13 PM aandrew: woo
09:13 PM aandrew: on set tomorrow :-)
09:13 PM aandrew: excited and nervous
09:13 PM rue_mohr: heh
09:13 PM rue_mohr: whats the nature of it?
09:13 PM rue_mohr: you a game show host or an extra?
09:14 PM aandrew: well I can't provide specific details but there's a famous horror movie franchise involving a demented doll. My son is the child version of the main character
09:14 PM rue_mohr: heh, good show
09:14 PM rue_mohr: now where did I put that utility
09:15 PM rue_mohr: 159Hz filter?
09:16 PM rue_mohr: hmm
09:16 PM rue_mohr: ok
09:16 PM rue_mohr: 1k 1uf
09:16 PM rue_mohr: heh, I'll throw it some floating point and see if it can keep up
09:18 PM aandrew: heh
09:19 PM rue_mohr: zippo:/files/programming/c/RC_filter/kcalc# ./a.out -R 1k -C 1u -S 17.0365k
09:19 PM rue_mohr: / Fc = 159.15494309
09:19 PM rue_mohr: #define SR 17036.50000000
09:19 PM rue_mohr: #define k 17.5245724055
09:20 PM rue_mohr: now I have to watch the gains carefully
09:24 PM rue_mohr: Vi = AdcValue - 512.0; // 0->1024 -> -512->512
09:24 PM rue_mohr: Vo += (Vi - Vo) / k ; // low pass
09:24 PM rue_mohr: PORTD = (Vo/4)+128; // -512->512 -> -128->128 -> 0->255
09:24 PM rue_mohr: on the adc 0-1024 is 0-5V, on the dac 0-255 is 0-5V
09:39 PM rue_shop1: hahah ok
09:39 PM rue_shop1: it cant do that math fast enough
09:39 PM rue_shop1: not at 8Mhz
09:41 PM rue_shop1: I wonder how I divide by 17.5 in integer
09:46 PM rue_shop1: heh with integer its saturating
09:48 PM rue_shop1: hey thats pretty good tho
09:49 PM rue_shop1: if I force it down to a constant 10kHz sample rate it might completely match
09:49 PM rue_shop1: 13.177khz
09:50 PM rue_mohr: zippo:/files/programming/c/RC_filter/kcalc# ./a.out -R 1k -C 1u -S 13.177k
09:50 PM rue_mohr: / Fc = 159.15494309
09:50 PM rue_mohr: #define SR 13177.00000000
09:50 PM rue_mohr: #define k 13.6671064744
10:05 PM rue_shop1: wow it came out pretty good condsidering
10:05 PM rue_shop1: using 16 bit math
10:06 PM rue_shop1: integer
10:06 PM rue_shop1: it matches pretty darn good with a real filter