#avr | Logs for 2014-06-17

Back
[00:20:05] <rue_more> why do people always ask lufa questions when the creator isn't here?
[01:43:40] <oakwhiz> Well it seems that I have encountered some success with LUFA
[01:43:54] <oakwhiz> lsusb reports that a "03eb:204f Atmel Corp. LUFA Generic HID Demo Application" is connected...
[03:42:19] <Valen> yaaay
[03:42:24] <Valen> everybody is back
[04:44:07] <malinus> Jartza, I've ordered the scope :). We gonna be scope-buddys now. Is the 40k depth bad, or can you cope with it?
[12:19:58] <Jartza> malinus: I haven't had problem with 40k so far
[13:13:11] <malinus> Jartza, oh okay. I guess it doesn't matter that much usually
[13:13:33] <malinus> except if you want to analyze stuff that takes a long time
[14:10:40] <bitd> Why do some mcu's come with a blob of black stuff over it, covering it.
[14:10:49] <bitd> Is that just so people wont figure out what chip was used?
[14:11:34] <Lambda_Aurigae> probably.
[14:11:48] <Lambda_Aurigae> some boards are made with the bare chip on the board rather in a chip package.
[14:12:16] <Lambda_Aurigae> they put the chip on the board and connect wires to the chip connection points and to the board then put epoxy over it to hold it together.
[14:12:57] <bitd> Hah, I see.
[14:13:00] <bitd> Well that makes sense.
[14:13:44] <bitd> Chip on board?
[14:19:14] <bitd> Pretty cool method.
[14:26:09] <Lambda_Aurigae> you see it in calculators and other small electronics.
[14:29:30] <Lambda_Aurigae> and it is definitely not something you will do at home in your garage.
[14:52:49] <Jartza> malinus: might be because I also have logic analyzer, so that's still better for any protocol analysis
[14:53:02] <Jartza> but oscope is better for signal quality measurements
[15:32:17] <Tom_itx> so now he's gotta go get one of those too??
[15:33:33] <Jartza> he should :D
[15:34:09] <Jartza> I got the saleae logic 16
[15:35:18] <Tom_itx> i should grab their new software update
[15:38:39] <Shavik> I've got some experience with the ATMega328 and 2560 as standalone chips, and I'm aware of the cpu finder tool avr has. But in your opinion, what is a good step up from the ATMega328? Looking for maybe one more uart and some more DIO
[15:39:00] <Shavik> I'm aware of shift regs and such too. but Also looking to expand the flash for large code bases, etc
[15:43:04] <Jartza> xmega?
[15:46:46] <Lambda_Aurigae> Shavik, I like the atmega1284p
[15:47:00] <Shavik> I'll check it out
[15:47:08] <Shavik> We're doing embedded medical devices
[15:47:29] <Shavik> Need longer hardware life cycles so wanted room to breath that 32kb didn't really offer
[15:47:36] <Lambda_Aurigae> 128k flash, 32k sram, 20MHz, dual usarts, i2c(twi), spi, lots of i/o...comes in a 40pin dip.
[15:47:45] <Shavik> That sounds like what I'm talking about
[15:47:48] <Shavik> I'll check that out
[15:47:53] <Lambda_Aurigae> the most sram of any 8bit processor I've found so far.
[15:48:00] <Lambda_Aurigae> and I love that it comes in a dip package.
[15:48:03] <Shavik> Really appreciate it. If anyone else has some suggestions, I'll invetigate those too
[15:48:07] <Lambda_Aurigae> if it only had hardware usb it would be perfect.
[15:48:13] <Shavik> I'll probably be doing something like a TQFP or something
[15:48:20] <Shavik> Won't be needed my application
[15:48:24] <Lambda_Aurigae> dip is good for testing and playing though.
[15:48:33] <Shavik> lots of little AVR's tied to an embedded linux computer via rs485
[15:48:43] <Shavik> Yea, I will need to get some in before I order
[15:48:52] <Shavik> all our boards have to be tiny though so SMD is only way we can go
[15:48:53] <Lambda_Aurigae> for usb these days I've been using the pic32mx250f128b..28pin dip with usb device and otg.
[15:48:56] <Shavik> for the density required
[15:49:14] <Shavik> Our existing hardware guy that is offshore is primarly PIC. I haven't really done anything with them
[15:49:33] <Lambda_Aurigae> the pic32 is not a real pic though...it's a 32bit mips processor with pic peripherals.
[15:49:39] <Shavik> So we're moving from PIC on existing devices to me doing AVR
[15:49:40] <Shavik> Oh
[15:50:02] <Lambda_Aurigae> runs at 50MHz with pipelining so it is a quick little chippy.
[15:50:34] <Lambda_Aurigae> usually I don't care for pic much myself...hate their manuals...but that particular chip is super powerful for the cost...
[15:50:58] <Lambda_Aurigae> for most things microcontroller I stick with AVR still....just easier to work with in my opinion.
[15:51:59] <Lambda_Aurigae> and I still play with the maxim ds89c450 chips on occasion...I love being able to execute code from external sram or eeprom or flash.
[15:53:24] <Shavik> I can see where that would be useful, currently a bit over my skill level though
[15:54:01] <Lambda_Aurigae> if that's over your skill level, I don't want to be hooked up to any medical devices you make with an avr!!!!
[15:54:01] <Lambda_Aurigae> hehe
[15:54:09] <Shavik> I am going to have to create a small circuit to play audio from a PC output across a twisted pair wire with returning mic input on it's own pair
[15:54:13] <Shavik> ;)
[15:54:15] <Shavik> Good luck
[15:54:19] <Shavik> I kid
[15:54:53] <Shavik> I do note my limits. I find it's important to note what you know and what you don't.
[15:54:55] <Lambda_Aurigae> I bet the core that the ds89c450 is based off of is in use in more medical equipment than any other microcontroller.
[15:54:59] <Shavik> Don't do stuff blindly
[15:55:02] <Lambda_Aurigae> it's an 8052.
[15:55:25] <Lambda_Aurigae> big brother to the 8051...perhaps the most popular microcontroller of all time....or at least most pervasive.
[15:57:50] <Roklobsta> a) it's old b) patents have expired.
[15:57:58] <Lambda_Aurigae> yup.
[15:58:04] <Roklobsta> silabs have sold 100MHz 8051's for years.
[15:58:04] <Lambda_Aurigae> and there's a lot of code out there for it.
[15:58:25] <Shavik> Do you have any other suggestions that are similar to the atmega1284p just to have options?
[15:58:39] <Roklobsta> something armish
[15:58:46] <Shavik> Eh
[15:58:51] <Shavik> Wanting to stick with AVR if possible
[15:58:59] <Roklobsta> why
[15:59:01] <Lambda_Aurigae> there are plenty of small to medium to large arm chips out there.
[15:59:09] <Lambda_Aurigae> there is always the xmega,,,which is AVR on steroids.
[15:59:09] <Shavik> small team's knowledge is all AVR
[15:59:19] <Shavik> would be too big of a dev switch at this time
[15:59:24] <Shavik> we are in small time crunch
[15:59:29] <Shavik> a small*
[15:59:31] <Roklobsta> to make a what?
[15:59:36] <Shavik> multiple small devices
[15:59:49] <Shavik> connected via a 485 bus
[15:59:49] <Roklobsta> what io do you need?
[16:00:05] <Roklobsta> are you requiring much ram/rom?
[16:00:10] <Shavik> 128k would be nice
[16:00:15] <Shavik> for rom
[16:00:30] <Shavik> 32k is a bit constrained on our current 328p's
[16:00:36] <Roklobsta> why so much rom?
[16:00:59] <Shavik> We are looking to have room to expand
[16:01:13] <Shavik> hardware revisions are expensive in our market
[16:01:25] <Roklobsta> so you need all the i/o the 128x have?
[16:01:43] <Shavik> Preferably more
[16:01:48] <Shavik> 2560 is definitely overkill
[16:02:05] <Lambda_Aurigae> there is a 128K version of that too but not as much sram.
[16:02:30] <Roklobsta> how much sram do you need? is 9k enough?
[16:02:32] <Roklobsta> 8
[16:02:43] <Shavik> I think it's pretty obvious that you guys are a few steps ahead of me. Just wanted to mention that and that I appreciate your help and advice.
[16:02:51] <Shavik> Yea, I would believe so for quite some time
[16:02:57] <Shavik> Would be hard to use more than that I'd imagine
[16:03:10] <Lambda_Aurigae> not really.
[16:03:15] <Shavik> Going to be polling these devices from a linux embedded arm device via rs485
[16:03:22] <Shavik> Well for our application that is
[16:03:23] <Lambda_Aurigae> I do some matrix math on the atmega1284p that takes a good 14K.
[16:03:29] <Shavik> I've used more on personal projects :)
[16:03:56] <Lambda_Aurigae> you need more than 32 i/o pins?
[16:04:08] <Shavik> Talking just plain dio?
[16:04:13] <Lambda_Aurigae> yeah.
[16:04:15] <Shavik> We have little use for any analog pins
[16:04:48] <Lambda_Aurigae> basically, how many i/o? you want 128K of flash and at least 8K of sram..
[16:05:28] <Shavik> 20-30 would be far better than we have now
[16:05:33] <Roklobsta> 485 is only 2 pins
[16:05:35] <Lambda_Aurigae> atmega1280 has 86
[16:05:35] <Shavik> Yea
[16:05:58] <Lambda_Aurigae> atmega1284p has 32.
[16:06:09] <Lambda_Aurigae> atmega1281 has 54
[16:06:37] <Lambda_Aurigae> do you need picopower?
[16:07:09] <Shavik> Need? no. I had entertained the idea of us implementing it at some point
[16:07:15] <Shavik> but thats mostly feature creep :P
[16:07:30] <Lambda_Aurigae> of the ones that fit your requirements so far, the atmega1284p is the only one with picopower.
[16:08:08] <Lambda_Aurigae> it is also the fastest at 20MHz and has 16K of sram.
[16:08:10] <Shavik> 1284p is looking pretty good
[16:08:23] <Lambda_Aurigae> http://www.atmel.com/v2PFResults.aspx#%28actives:!%288238,8394,8362,8282,8431,8300,8358,8392,8378,8445,8236,8449,8474,8248,8264,8447,8256,8254,8286,8462,8429,8458,8466,8400,8302,8278%29,data:%28area:%27%27,category:%2734864[33180[33085]]%27,pm:!%28%28i:8238,v:!%2812,14%29%29,%28i:8394,v:!%284,12%29%29,%28i:8362,v:!%2811,12%29%29,%28i:8282,v:!%284%29%29,%28i:8431,v:!%2819,22%29%29,%28i:8300,v:!%284,8%29%29,%28i:8358,v:!%2811,51%29%29,%28i:8392,v:!%28
[16:08:23] <Lambda_Aurigae> 0,1%29%29,%28i:8378,v:!n%29,%28i:8445,v:!%285,6,9%29%29,%28i:8236,v:!%287,12%29%29,%28i:8449,v:!%281,6%29%29,%28i:8474,v:!%280%29%29,%28i:8248,v:!%280,1%29%29,%28i:8264,v:!%281,4%29%29,%28i:8447,v:!%280,1%29%29,%28i:8256,v:!%281%29%29,%28i:8254,v:!%287,13%29%29,%28i:8286,v:!%280,1%29%29,%28i:8462,v:!%280,4%29%29,%28i:8429,v:!%281,5%29%29,%28i:8458,v:!%280,1%29%29,%28i:8466,v:!%281,2,4%29%29,%28i:8400,v:!%282,12%29%29,%28i:8302,v:!%280%29%29,%28i:827
[16:08:23] <Lambda_Aurigae> 8,v:!%280,1%29%29%29,view:table%29,sc:1%29
[16:08:26] <Lambda_Aurigae> oops.
[16:08:29] <Lambda_Aurigae> that don't work for squat.
[16:08:30] <Shavik> hell of a link
[16:08:32] <Lambda_Aurigae> sorry.
[16:08:34] <Lambda_Aurigae> it'
[16:08:43] <Lambda_Aurigae> it's the atmel microcontrollers selector.
[16:09:33] <Shavik> And as far as reliably of our devices
[16:09:38] <Shavik> It'll be UL tested
[16:09:43] <Shavik> not just the little ones either
[16:09:43] <Shavik> lol
[16:09:57] <Shavik> 1069
[16:10:20] <Lambda_Aurigae> my highschool chemistry/physics teacher worked at UL for his first job out of university waaay back when.
[16:10:25] <Lambda_Aurigae> he loved destroying things.
[16:10:40] <Shavik> It's soooo expensive to talk to them :|
[16:10:45] <Lambda_Aurigae> yup.
[16:10:55] <Lambda_Aurigae> and you have to provide so many of the devices for them to test too.
[16:11:01] <Shavik> yea. we're ready
[16:11:26] <Lambda_Aurigae> depending on the device, it could be several hundred or more sometimes from what I hear.
[16:11:33] <Shavik> Under FDA scrunity as well. So red tape and documents everywhere
[16:11:42] <Lambda_Aurigae> yup.
[16:11:46] <Shavik> maybe scrunity isn't a good word. We're required to have inspections
[16:11:50] <Lambda_Aurigae> this is why I don't make anything to sell.
[16:12:01] <Shavik> It's enough to drive one mad
[16:12:04] <Shavik> I don't recommend
[16:12:06] <Shavik> ha
[16:12:13] <Lambda_Aurigae> I just fix things.
[16:12:18] <Lambda_Aurigae> printers and copiers mostly.
[16:12:20] <Lambda_Aurigae> a few scanners
[16:12:24] <Lambda_Aurigae> and the occasional shredder.
[16:12:51] <malinus> Jartza, the salea logic 16 seems expensive. I can't see why one of those $10 20mhz logic analyzer wouldn't be good enough?
[16:13:04] <Lambda_Aurigae> malcom2073,
[16:13:05] <malinus> at least for avr-stuff
[16:13:06] <Lambda_Aurigae> grrr
[16:13:12] <Jartza> malinus: sure they will be good enough
[16:13:18] <Jartza> depends what you need
[16:13:21] <Lambda_Aurigae> malinus, look at the logic shrimp...awesome little toy...and there is a big brother to it now.
[16:13:31] <Shavik> I have the 8 channel Salea or whatever
[16:13:33] <Shavik> it's pretty nice
[16:13:38] <malinus> Lambda_Aurigae, is it $10?
[16:13:51] <Jartza> I just heard so much good about saleae I had to order one
[16:14:09] <Jartza> but of course if you have to pay yourself, it's a bit different
[16:14:10] <Lambda_Aurigae> I think there are copies out there about that price.
[16:14:13] <warsh> Jartza: did you pre-order a new Pro version?
[16:14:14] <Lambda_Aurigae> the official one is about 30.
[16:14:39] <Jartza> that saleae was paid by my employer
[16:14:49] <Jartza> warsh: nope, the 16 logic version
[16:15:04] <Lambda_Aurigae> http://dangerousprototypes.com/docs/Logic_Pirate new logic pirate...big brother to the logic shrimp.
[16:15:04] <warsh> ah, still a nice piece of hardware
[16:15:06] <Jartza> I've been using scanaplus from ikalogic quite a lot
[16:15:07] <malinus> Jartza, did you get yours for free?
[16:15:10] <Jartza> and I was happy with that too
[16:15:34] <Jartza> malinus: well.. not for free, of course it belongs to my company...
[16:15:49] <Lambda_Aurigae> and you can make it yourself if you like...even with all through hole parts..
[16:16:17] <malinus> Jartza, I should probably buy stuff like this over my company too ;P
[16:16:24] <malinus> even though it isn't related, haha
[16:16:36] <Jartza> http://ikalogicstore.com/index.php?id_product=11&controller=product
[16:16:42] <Jartza> that's also quite working product
[16:17:02] <Jartza> I like the signal generation possibility too
[16:18:12] <Jartza> http://ikalogicstore.com/index.php?id_product=12&controller=product
[16:18:20] <Jartza> and even cheaper without box :D
[16:18:46] <Jartza> (some soldering required ;))
[16:18:52] <Lambda_Aurigae> hmmm...the serial sram chips they use, they can overclock...HMMMmmmm...
[16:18:56] <Jartza> but.... whoa
[16:19:03] <Lambda_Aurigae> wonder if I can overclock them for my vga project...hmmm.
[16:19:08] <Jartza> I got my modem to 16kbps
[16:19:16] <Jartza> then I was wondering, what if I try stereo
[16:19:20] <Jartza> and interleave the signals a bit
[16:19:29] <Jartza> so, that did work.
[16:19:56] <Jartza> although I dropped the speed per channel to 12kbps
[16:19:57] <Lambda_Aurigae> that ikalogic device looks like an AVR based version of the logic shrimp.
[16:20:07] <malinus> Jartza, you are talking about "your modem" all the time. Mind filling me in? You probably already did but I might have forgotten or missed it
[16:20:11] <Jartza> but with stereo I get 23kbps
[16:20:55] <Jartza> malinus: this is just something I started to try, as I only had one pin free on attiny85 and I needed a way to transfer data from phone, tablet, laptop, pc... etc to the attiny
[16:21:04] <Jartza> so I thought, why not audio
[16:21:14] <Jartza> I was aiming for somewhere around 400bps
[16:21:54] <Jartza> then I found out some softmodem-packages etc... but they were cumbersome and sort of too complicated (and also slow) and quite bloated
[16:22:10] <Jartza> I wanted something simple, so I remembered the old c64 datasette and variable length bit coding...
[16:22:33] <Jartza> so I made a simple version. One pin change interrupt + one timer/counter
[16:22:42] <Jartza> the actual interrupt is 13 lines of C
[16:23:15] <Jartza> and the speed was WAY better I never expected
[16:23:35] <Jartza> I'm gonna release it some day when it's more finalized
[16:23:41] <Jartza> if someone ever needs one
[16:23:58] <Jartza> shenanigans:firmware jartza$ avr-size --format=avr --mcu=attiny85 modem.o
[16:24:03] <Jartza> Program: 262 bytes (3.2% Full)
[16:24:40] <Jartza> that's the code for "single channel" modem.
[16:25:10] <Jartza> 12kbps with really simple hardware (like 2 resistors, 2 caps and 1 diode)
[16:25:16] <Jartza> 16kbps with an opamp
[16:34:58] <malinus> Jartza, have you tried normal encoding?
[16:35:13] <Jartza> what's "normal" encoding? :)
[16:36:22] <malinus> Jartza, haha sorry. I meant, just something like manchester.
[16:36:52] <Jartza> yeah, but it complicates the code quite much
[16:37:07] <Jartza> this is also auto-adapting
[16:37:24] <Jartza> so I generate the audio samples, and the modem speed depends of the samplerate I play the samples back
[16:37:39] <Jartza> with 16k samplerate it's averaging 4kbps, with 48k samplerate it's averaging 12kbps :)
[16:37:50] <Jartza> and basically you can use anything in between
[16:39:37] <malinus> Jartza, I don't really understand how it works. So how is it encoded exactly?
[16:39:59] <Jartza> just short pulses with different delay in between
[16:40:12] <Jartza> short delay equals 0, long delay equals 1
[16:40:22] <Jartza> and then there is a sync pulse, and the pulse length is calculated from that
[16:40:43] <Jartza> but I'll release the source code when it's finalized
[16:40:52] <Jartza> also with an explanation and with the schematics
[16:41:39] <malinus> Jartza, so there are always only two types of delays for each communication?
[16:41:42] <Lambda_Aurigae> so, adaptive to a point so you don't need crystal?
[16:41:57] <Jartza> I'm not using a crystal no
[16:42:01] <malinus> nice
[16:42:06] <Jartza> running attiny with internal 8Mhz clock atm
[16:42:21] <Jartza> that was also one point, I don't have free pins for crystal either :)
[16:42:28] <Lambda_Aurigae> wonder what you can get at 20MHz with a nice stable clock..
[16:42:48] <Lambda_Aurigae> and are you going to make a transmitter as well eventually?
[16:42:57] <Jartza> eventually I hope so too
[16:43:13] <Jartza> two-way communication would be great
[16:43:22] <Jartza> although I guess it would be half-duplex
[16:43:51] <Jartza> but for my purposes now, it's actually too fast :D
[16:44:20] <Jartza> so I'm using the extra speed to actually resend data twice, in blocks of 8 bytes with crc
[16:44:34] <Jartza> I send blocks like 1,2,3,4,1,2,3,4....
[16:44:36] <malinus> Jartza, how does the package look like?
[16:44:45] <Lambda_Aurigae> send one forward, one backward, and one as a parity of the other two...
[16:45:00] <Lambda_Aurigae> parity/xor
[16:45:02] <Jartza> nah, I'm using simple crc8
[16:45:26] <Jartza> I can still lose 4 full packages (32 bytes) and get good data.
[16:45:36] <Jartza> that's usually enough for any blurps there might be in transmission
[16:46:10] <Jartza> actually, each "package" is 10 bytes
[16:46:21] <Jartza> first byte is sequence number, 8 bytes of data and 1 byte of crc
[16:47:06] <Jartza> malinus: actually there are 3 different delays. the longest is the sync-pulse.
[16:52:57] <Lambda_Aurigae> Jartza, I have a variety of different AVRs and need to set my dev stuff up again soon. when you get ready to release the code let me know...
[16:53:14] <Lambda_Aurigae> testing it on different chips will give me an excuse.
[16:54:44] <Jartza> sure
[16:54:58] <malinus> Jartza, do you have github?
[16:55:00] <Jartza> for now it works with attiny85 and 84
[16:55:03] <Lambda_Aurigae> maybe even port it to a couple of other platforms.
[16:55:24] <Jartza> that could be great
[16:55:25] <malinus> Jartza, have you made some special software for pc/mobile platforms?
[16:55:39] <malinus> or how does it work?
[16:55:40] <Jartza> not yet, just a simple python-script to generate the modem data
[16:55:46] <Lambda_Aurigae> ok, now I want to reproduce another old technology!
[16:55:57] <Jartza> but I'm thinking of creating the android & iphone code for that too at some point
[16:56:01] <Lambda_Aurigae> anybody remember the watch with the calendar on it that you could program by holding up to your monitor?
[16:56:21] <Jartza> my current own need has already a website where you can generate the data file and download it as a .wav :)
[16:56:41] <Jartza> Lambda_Aurigae: I actually also thought of that :D
[16:56:42] <malinus> oh I see
[16:56:45] <Jartza> but monitors are so slow
[16:56:56] <Jartza> malinus: and eventually the code will be in bitbucket, yes
[16:57:05] <Jartza> although I've done this on my work-time, so basically our company owns the code
[16:57:11] <Lambda_Aurigae> I'm thinking 2 light sensors and 2 spots on the monitor...one for clock, the other for data.
[16:57:11] <Jartza> but have agreed on "double license"
[16:57:27] <Jartza> as long as you use it for hobby projects, just give credits and release your own code :)
[16:57:49] <Jartza> but if you would like to use it commercially, then I guess someone needs to pay some miniscule compensation :D
[16:58:00] <Jartza> (as if anyone ever needs that for commercial purposes...)
[16:58:26] <malinus> Jartza, how well does the hantek show up the transmissions :)?
[17:00:45] <Jartza> sure it does :)
[17:01:41] <Kre10s> I know its fairly easy to use sdcards in SPI mode with avrs... How easy is it to do the FAT stuff so that PCs won't have a problem with them?
[17:01:44] <Jartza> https://www.dropbox.com/s/wnjn0abrq44t7nx/IMG_20140614_202736.jpg
[17:01:47] <Jartza> like that :)
[17:02:10] <Lambda_Aurigae> Kre10s, there are a couple of fat libs for the avr.
[17:02:23] <Kre10s> nice
[17:02:41] <Lambda_Aurigae> http://elm-chan.org/fsw/ff/00index_e.html
[17:02:59] <Lambda_Aurigae> http://elm-chan.org/fsw/ff/00index_p.html this is very limited but much much smaller.
[17:03:36] <Jartza> malinus: and what was amazing, the modem actually still works even with this signal https://www.dropbox.com/s/ujyvmjxbmizujwk/IMG_20140614_022738.jpg
[17:03:52] <Jartza> that's from nexus 4, volume is turned down to get quite low peak-to-peak
[17:04:04] <Jartza> agh
[17:04:05] <Jartza> wrong image
[17:05:04] <Jartza> https://www.dropbox.com/s/za2og29h4hirvuq/IMG_20140615_224738.jpg
[17:05:11] <Jartza> sorry, the filename was so close :D
[17:05:56] <Jartza> the cursor in that image (the white dotted line) is at 1.65V, which should be the trigger level of the pin change interrupt, when running at 3.3V
[17:09:18] <malinus> Jartza, wow that's pretty cool. I guess using an opamp would help though. thanks a lot
[17:10:25] <Jartza> yeah, it would
[17:10:41] <Jartza> but as I'm really new to electronics, I need to figure out the opamps :)
[17:11:07] <Jartza> https://www.dropbox.com/s/pec8ahbtr1bflvr/skema.png
[17:11:15] <Jartza> but here's the "el cheapo" solution :)
[17:11:31] <Jartza> the result can be seen in scope-images :)
[17:11:54] <malinus> hehe :D
[17:13:11] <Lambda_Aurigae> http://www.amazon.com/Engineers-Mini-Notebook-Amp-Circuits/dp/B000DZG196
[17:13:28] <Lambda_Aurigae> everything you ever needed to know about opamps from the mid 70s.
[17:14:14] <Lambda_Aurigae> http://www.forrestmims.com/engineers_mini_notebook.html
[17:14:18] <Lambda_Aurigae> new version.
[17:14:50] <Jartza> Lambda_Aurigae: yeah, friend of mine already brought me a pile of books :)
[17:15:04] <Lambda_Aurigae> but did he get you the engineers mini notebooks?
[17:15:09] <Lambda_Aurigae> Mims is awesome.
[17:15:10] <Jartza> nope
[17:15:13] <Lambda_Aurigae> hand drawn books.
[17:15:15] <Jartza> I'm not an engineer ;)
[17:15:24] <Jartza> I'm really at the basics currently
[17:15:27] <Lambda_Aurigae> those are what I got started with as a kid.
[17:15:31] <Lambda_Aurigae> those are the basics.
[17:15:39] <Jartza> I wish I had started as a kid
[17:15:45] <Lambda_Aurigae> Getting Started in Electronics by Forrest M. Mims III
[17:15:49] <Lambda_Aurigae> best book ever written.
[17:16:35] <Lambda_Aurigae> and the mini notebooks are done the same way...the original ones anyhow...hand drawn, hand written.
[17:16:40] <Jartza> I need to check those
[17:17:09] <Jartza> what I really would like is to get basically the signal first amplified and then maybe squared :)
[17:20:11] <Jartza> I already did some tests with diodes and transistors
[17:20:18] <Jartza> actually even with optocoupler
[17:20:32] <Jartza> that actually worked great up to around 6kbps
[17:20:47] <Jartza> then I found out that the 4n35 is quite slow
[17:21:42] <Jartza> but it's all learning process, which I like
[17:21:49] <Jartza> it's good to learn new things
[17:22:17] <Lambda_Aurigae> ok..off to make sawdust...gotta cut some more on the tree that fell last night in the storm.
[17:23:56] <Jartza> ouch
[17:24:21] <malinus> Jartza, but yeah a simple opamp is less than $1, and pretty simple to use imho.
[17:24:56] <Jartza> quite versatile at least
[17:25:25] <Jartza> I have few dozen lm358 around
[17:25:32] <Jartza> I've been testing with those
[17:25:52] <malinus> how did they do?
[17:30:37] <Jartza> malinus: well, quite ok so far
[17:30:47] <Jartza> but I'm not exactly grasping everything with op-amps yet :)
[17:30:57] <Jartza> (been working with them for 4 hours now)
[17:31:04] <Jartza> and never ever before that ;)
[17:33:12] <malinus> Jartza, why not just always use opamp to make sure that the the wave isn't too small?
[17:33:43] <Jartza> why not, yes
[17:36:19] <malinus> Jartza, :D
[17:39:09] <Jartza> as soon as I understand a bit more of these beasts :)
[17:44:35] <Lambda_Aurigae> I have a bunch of 50MHz capable opamps here somewhere...they are probably 12 years old, in a couple of tubes...like 50 or so of them.
[17:46:40] <RikusW> ic number ?
[17:46:49] <Lambda_Aurigae> will have to find them.
[17:46:55] <Lambda_Aurigae> maybe tomorrow night I will go dig them out.
[17:47:00] <Lambda_Aurigae> they are in the basement somewhere.
[17:58:25] <Jartza> well, the signal with opamp doesn't quite look like what I'd like it to :)
[17:58:42] <Lambda_Aurigae> there's a little black magic to do to make it squarish.
[18:04:41] <ColdKeyboard> I'm trying to make reactive LED table just like in the tutorial I found. However, when I connect everything like in this schematic ( http://cdn.instructables.com/FEJ/GOBW/G9HKEIRC/FEJGOBWG9HKEIRC.LARGE.jpg ) my LED doesn't blink or anything... Does anyone have other solution or idea how to fix this one?
[18:14:58] <Lambda_Aurigae> ColdKeyboard, all depends on what's wrong. Assuming you have the software loaded on the chip?
[18:17:14] <malinus> Jartza, oh you want to square it?
[18:21:07] <ColdKeyboard> Lambda_Aurigae: I don't have the slightest ideas what's wrong. Now I'm trying to make it work with just IR diode, IR phototransistor and OpAmp.
[18:21:46] <ColdKeyboard> IR is pulsing at 40KHz so I don't get false positive from ambient light. But OpAmp isn't cooperating with me at the moment :)
[18:22:12] <ColdKeyboard> I need to make high pass filter with single supply and possibly amplify the signal 10-100 times... :)
[18:23:21] <Jartza> malinus: sure, would work better
[18:23:25] <Jartza> :)
[18:38:14] <Jartza> I've gotten quite close, but it's not "perfect" yet :(
[18:38:43] <malinus> Jartza, how are you making it square?
[18:39:41] <Jartza> playing with opamp
[18:39:59] <Jartza> don't have schematics now, I've been just playing around with audio signal and scope and opamp :)
[18:46:07] <Jartza> getting pretty close I guess
[18:47:12] <Jartza> https://www.dropbox.com/s/jeds14b6qonx7q5/IMG_20140618_022741.jpg
[18:47:38] <Jartza> that's now measured from attiny's pin
[18:49:53] <malinus> Jartza, crazy idea - try using a comperator maybe?
[18:51:26] <malinus> *a
[18:52:37] <Jartza> well, as I told, I'm really new with electronics :)
[18:52:45] <Tom_itx> what are you trying to do?
[18:52:46] <Jartza> this is mostly trial-and-error as I have no clue what I'm doing :)
[18:52:50] <Tom_itx> clean the wave up?
[18:53:03] <Jartza> Tom_itx: getting a headphone-signal and trying to amplify it and make it square-wave
[18:53:14] <Jartza> for easier pulse detection
[18:53:20] <Jartza> or edge-detection, more accurately
[18:53:22] <Tom_itx> feed that signal thru a schmidt trigger
[18:53:44] * malinus googles schmidt trigger
[18:54:10] <malinus> oh it's what I've said ;P
[18:54:12] <malinus> kinda
[18:54:24] <Tom_itx> http://en.wikipedia.org/wiki/Schmitt_trigger
[18:54:38] <Tom_itx> it would have to be logic level switching though
[18:54:40] <Tom_itx> probably
[18:56:18] <Jartza> Tom_itx: well yeah... I'm trying to get grasp of this all :)
[18:56:55] <Tom_itx> the comparator might do just as well
[18:56:56] <Jartza> I just started with electronics, trying to get hold on of all the crazy stuff at the same time :)
[18:57:02] <Tom_itx> np
[18:57:29] <Jartza> I already understood the previous schematics I showed
[18:57:35] <Tom_itx> with the onboard comparator you can set the trigger thresshold
[18:57:37] <Jartza> but that's not so good for this
[18:57:40] <Tom_itx> somewhat...
[18:57:45] <Jartza> I can't use that.
[18:57:46] <Tom_itx> i didn't look
[18:58:00] <Tom_itx> just jumped in the middle of the discussion
[18:58:07] <Jartza> basically I need to use digital pin :)
[18:58:43] <Jartza> Tom_itx: https://www.dropbox.com/s/pec8ahbtr1bflvr/skema.png
[18:58:46] <Tom_itx> either one would clean the signal up
[18:59:06] <Jartza> currently I'm using that and detecting only rising edges
[18:59:13] <Jartza> but I'd like to detect both rising and falling edges
[18:59:22] <Jartza> (or zero crossings, in audio)
[18:59:58] <Jartza> the current opamp-thingie works quite closely to what I want, it has some noise but it's actually ok as it's a digital pin
[19:00:15] <Jartza> or not "okay", but it doesn't seem to bother as it's quite far away from trigger level
[19:01:20] <Tom_itx> https://www.google.com/search?q=zero+crossing+audio+detector&client=firefox-a&hs=15j&rls=org.mozilla:en-US:official&channel=sb&tbm=isch&imgil=wsJ1mYBe-QLPBM%253A%253Bhttps%253A%252F%252Fencrypted-tbn1.gstatic.com%252Fimages%253Fq%253Dtbn%253AANd9GcRJ325G4dzcPU2qkj-y48s2QQgRpA_gQMVm7RNCL90XcvN8p2d3%253B216%253B178%253B8Rp-1sm-3_aYhM%253Bhttp%25253A%25252F%25252Fwww.interfacebus.com%25252Fzero-crossing-detector-lm741-opamp-circuit.html&source=iu&usg=__nj
[19:01:25] <Tom_itx> take your pick
[19:03:32] <Tom_itx> http://www.next.gr/other-circuits/switch-circuits/schmitt-trigger-zero-crossing-detector-l12983.html
[19:04:27] <Jartza> yeah
[19:04:29] <Jartza> something like that
[19:05:00] <Tom_itx> you need a dual rail supply
[19:05:07] <Tom_itx> +- v
[19:05:15] <Tom_itx> for the op amp
[19:05:21] <Jartza> hmm
[19:05:57] <Tom_itx> otherwise how are you gonna detect the negative side of the crossing?
[19:07:12] <Jartza> that's why I'm biasing the audio signal to around half of the vcc
[19:07:39] <Tom_itx> that'll make it more sensitive i think
[19:07:54] <Jartza> and I would also like to have the square wave biased around half of the vcc, so basically I'm crossing the "trigger point" of pin change interrupt
[19:08:22] <Tom_itx> use INT0 instead of pin change and you can do rising and falling
[19:08:31] <Jartza> I am
[19:08:42] <Jartza> but pin change interrupt detects both changes too
[19:08:48] <Jartza> rising and falling
[19:08:49] <Tom_itx> by default pin change does both no matter what
[19:08:53] <Tom_itx> yes
[19:08:56] <Jartza> yep
[19:55:08] <Jartza> oh well
[19:55:34] <Jartza> https://www.dropbox.com/s/eo4788j4m9ultuq/Screenshot%202014-06-18%2003.37.19.png
[19:55:52] <Jartza> I tried that...
[19:56:12] <Jartza> although replaced lm393 with lm358
[19:56:20] <Jartza> as it's the only opamp I have
[19:56:35] <Jartza> seems to work quite nicely so far
[20:06:45] <Jartza> wanna see video? :)
[20:09:31] <Jartza> poor quality, camera doesn't quite follow
[20:09:32] <Jartza> https://www.dropbox.com/s/1aa0muqa7of353n/VID_20140618_033524.mp4
[20:14:16] <Lambda_Aurigae> Jartza, a lot of ringing on that thing...but running it on a breadboard like that, I'm surprised it's that clean.
[20:16:18] <Jartza> I was a bit surprised too
[20:16:31] <Jartza> and runs 16kbps without errors
[20:16:34] <Jartza> even without error correction
[20:16:50] <Jartza> and also it's spread accross multiple breadboards with long wires hanging on air
[20:17:53] <Jartza> but the mean voltage is now about where I want it to be
[20:17:58] <Jartza> and the edges are sharp
[20:18:33] <Jartza> (and I don't have any idea how to suppress the ringing :))
[20:19:42] <Jartza> I'll try soldering that to "solderable breadboard" next
[20:20:56] <Jartza> the camera didn't quite catch the scrolling text :)
[20:23:26] <Lambda_Aurigae> bedtime here.
[20:25:47] <Jartza> same story, it's already 4am
[20:25:52] <Jartza> so nighties
[23:06:34] <oakwhiz> I'm trying to get the LUFA GenericHID class driver to work
[23:07:02] <oakwhiz> I used wireshark to monitor my USB port, and I can see an HID report when the device is first plugged in
[23:07:17] <oakwhiz> but no more HID reports are generated after that
[23:08:10] <oakwhiz> does the PC need to ask the device to generate reports, or can the device somehow initiate a report on its own?