#avr Logs

Apr 08 2017

#avr Calendar

12:17 AM daey_ is now known as daey
01:35 AM daey_ is now known as daey
01:44 AM daey_ is now known as daey
02:11 AM Thrashbarg_ is now known as Thrashbarg
06:22 AM polprog: the board works :)
06:34 AM _ami_: polprog: which one? :)
06:47 AM polprog: _ami_: the mosfet driver
06:55 AM polprog: http://m.imgur.com/ZfbFLvr,X2swCO5
09:29 AM Emil: polprog: just post the full links :D
11:07 AM Emil: polprog: but looks good, a bit better soldering but that comes with time
11:12 AM Jan-: has anyone here ever built circuitry to connect an audio signal to the comparator on an avr?
11:13 AM Jan-: we have an audio signal that has essentially square waves in it representing serial data
11:13 AM Jan-: but being an audio signal, it's tiny
11:14 AM Lambda_Aurigae: add an opamp
11:14 AM Lambda_Aurigae: or a 2n2222 transistor amplifier
11:16 AM Lambda_Aurigae: I believe jarzta has done similar
11:16 AM Lambda_Aurigae: at least, he built a bootloader that listens to audio from a cellphone.
11:32 AM Jan-: that was our first approach
11:32 AM Jan-: the problem is with only 5v power available it doesn't give much headroom for amplification.
11:33 AM Jan-: we tried the most obvious approaches; if anyone has a diagram they can refer us to that's known to work, that'd be great
11:38 AM Lambda_Aurigae: should only need to get it up to maybe 2V peak to peak
11:38 AM antto: Jan- opamp comparator
11:38 AM Jan-: we tried the most obvious approaches
11:38 AM Jan-: it's pretty tricksy
11:38 AM antto: why?
11:38 AM Jan-: the signal out of a cellphone's audio output for instance is only about 0.75v
11:39 AM antto: is it AC-coupled?
11:39 AM Jan-: from the cellphone yes, but going into the AVR it needs not to be. it needs to be virtual earth at that point.
11:39 AM Jan-: or, to put it another way, sat up at a 2.5V DC offset.
11:39 AM Jan-: although the accuracy of that really isn't so critical.
11:40 AM antto: then that's more of a problem, not the amplitude
11:40 AM Jan-: well that we had working
11:40 AM antto: a comparator with hysteresis would help
11:40 AM Jan-: the problem is that with 741s and TLO series opamps below a certain point it just collapses into oscillation
11:44 AM Lambda_Aurigae: I'm not seeing the tagsu schematics online....that's the device he did the audio modem on.
11:44 AM antto: i successifully got MIDI from audio with such a comparator
11:44 AM Jan-: what sort of parts and values did you use
11:44 AM antto: AC-coupled audio
11:45 AM antto: Jan- i used a circuit simulator (falstad) to get a rough idea about the whole thing, then i used some rail-to-rail opamp
11:45 AM antto: or was it
11:45 AM antto: could've been lm358 even
11:46 AM antto: since the comparator has hysteresis, it has to have an adjustment somewhere (a trimpot or so)
11:47 AM antto: oh, i think i still got that sitting on the breadboard
11:47 AM Jan-: theoretically we could use the comparator on the AVR
11:48 AM antto: bah, i can't read the label
11:48 AM * Jan- steps out for a bite to eat, back soon, sorry, it just got done
11:50 AM antto: TLC272
11:52 AM Jan-: never heard of them
11:52 AM Jan-: I think we have 741s :)
12:15 PM julius_: hi guys
12:16 PM Jan-: OK, I'm back, and full of ice cream
12:16 PM julius_: finding friends fast...are we? ;)
12:20 PM julius_: i can make my avr "crash" when uncommenting line 87 in this code: https://bpaste.net/show/a948398c4723 any idea why?
12:20 PM julius_: it does not print the ascii table after enabling that line
12:20 PM julius_: im using my phone with a bluetooth terminal emulator
12:20 PM julius_: somehow sending a string via i2c and it stops working
12:23 PM Jan-: errr I don't know.
12:23 PM Jan-: all I'd say is, last time I had a wierd no-apparent-cause crash, I was running the AVR out of memory.
12:37 PM julius_: kinda hard to find ram usage for i2c
12:38 PM julius_: its running on a atmega32 with 2kb of ram
12:58 PM Jan-: 2k is not a lot of ram
12:58 PM Jan-: I've run into the end just by writing big functions.
01:29 PM twnqx: // this is from rtc.h from the exploreembeeded example: #define C_Ds1307ControlRegAddress_U8 0x07u // Address to access Ds1307 CONTROL register
01:29 PM twnqx: you crash it by defining?
02:33 PM julius_: twnqx: im not sure what you mean
02:33 PM twnqx: i posted the line numbered 87...
02:33 PM julius_: yes
02:34 PM julius_: oh wait..
02:34 PM julius_: no...my bad. i meant line 86
02:34 PM julius_: the code as posted does transfer ascii chars every 3 seconds as expected, and they differ from the last one transfered
02:35 PM julius_: goes like 0...9, then : ; and so on
02:36 PM julius_: but as soon as 86 is enabled it does send nothing
02:51 PM julius_: when i disable the uart and just use a led to show activity (making sure the chip didnt crash) i can initialize i2c, but when i try to send the first data it crashes again
02:51 PM julius_: https://bpaste.net/show/6710bb80bbff
02:51 PM julius_: oh wait...one second
02:52 PM julius_: false alarm, still the same crashing scenario
04:04 PM twnqx: well, since I don't know the code...
04:04 PM twnqx: but what exactly is that thing waiting for?
04:05 PM twnqx: 'cause waiting for a start sounds to me like a software slave I2C implementation
10:54 PM JanC is now known as Guest95326
10:54 PM JanC_ is now known as JanC