#avr | Logs for 2016-06-06

Back
[10:17:18] <bss36504> Anybody here tinkered with the FTDI FT81x chips?
[10:31:30] <superware> I'm trying to use an ENC28J60 module with "tuxgraphics" library, simply send_udp_prepare(buf, 0xffff, {10,0,0,255}, 0xffff, {0xff,0xff,0xff,0xff,0xff,0xff}); buf[UDP_DATA_P+0] = '!'; send_udp_transmit(buf, 1); but I can't see any broadcast packet from 10.0.0.255 (using Wireshark)
[10:31:51] <superware> any ideas?
[10:32:48] <LeoNerd> Are you sure that's the syntax to call it
[10:32:56] <LeoNerd> Those untyped {}s look suspiscious
[10:33:37] <bss36504> I think C99 supports implicit array declarations, but still, thats a little hinky
[10:33:50] <LeoNerd> They need typing information though surely?
[10:34:08] <LeoNerd> send_udp_prepare(buf, 0xffff, (uint8_t[]){10,0,0,255}, ... I could imagine working
[10:34:08] <bss36504> I think so, yes
[10:34:37] <superware> it's actually static const uint8_t broadcastmac[6] = {0xff,0xff,0xff,0xff,0xff,0xff};
[10:34:39] <superware> a sec...
[10:34:44] <bss36504> I dont use that feature because it doesnt work in most toolchains, so I dont know off the top of my head.
[10:34:51] <LeoNerd> gcc's fine with it
[10:34:54] <LeoNerd> Iuse it all the time. in C code
[10:34:57] <LeoNerd> C++ doesn't like it
[10:35:03] <LeoNerd> But that's OK; I'm almost never in C++ land
[10:35:42] <bss36504> C++ is great though! /s
[10:35:45] <superware> please see http://pastebin.com/ww3jsQV5
[10:36:10] <LeoNerd> C++ is passable if I have to use Arduino because I CBA to write USB-CDC code on a 32U4
[10:37:26] <bss36504> I don't actually hate C++. It has all kinds of features you never knew you needed. I much prefer java though for PC side applications. And arduino hardly counts as C++ most of the time.
[10:41:11] <superware> LeoNerd: can you please see the code at pastebin?
[10:41:37] <LeoNerd> Ugh, I'd prefer any paste site *other* than pastebin, but just this once I'll take a look
[10:41:57] <superware> really? why?
[10:42:10] <LeoNerd> Because it's terrible
[10:42:25] <LeoNerd> Anyway, I think your question requires some knowledge of the hardware you're using, whichI know nothing about
[10:42:28] <LeoNerd> so I'm not sure how much more help I can be
[10:44:05] <superware> in principal, do you know if it's enough to send a broadcast UDP packet which? is this the "right" way?
[10:44:28] <superware> enough to be seen by a PC connected to the same ethernet switch
[10:45:02] <LeoNerd> It'd need to be in a broadcast ethernet frame
[10:45:20] <LeoNerd> Offhand I forget if the christmastree address gives you that
[10:48:29] <superware> anyone with tuxgraphics ethernet experience?
[10:50:06] <aandrew> LeoNerd: congrats on the tindie stuff
[10:50:28] <LeoNerd> Mm?
[10:59:20] <aandrew> LeoNerd: you had your current probe featured and commented that it was a very popular prodcut
[10:59:23] <aandrew> product
[10:59:45] <LeoNerd> ..ooh
[10:59:46] <LeoNerd> Featured?
[10:59:58] <aandrew> well tindie spits out twitter messages once in a while
[11:00:00] <aandrew> you were one of them
[11:00:12] <LeoNerd> Oh. heh.. yes that was just a "back in stock" message
[11:05:41] <Jartza> what's your product?
[11:05:58] <LeoNerd> https://www.tindie.com/products/leonerd/oscilloscope-current-probe-adapter/ this?
[11:06:06] <LeoNerd> I have quite a few but that's the best-selling one
[11:06:16] <LeoNerd> Just shipped my 10th this morning. Double digits now :)
[11:07:24] <LeoNerd> Hrm.. I should get more v0.5 photos.. a few old ones still
[11:07:46] <bss36504> Why are LCDs so expensive? I can buy a 20" 1080p PC monitor for like $100, but a 3.5" 240x320 is $20
[11:07:51] <bss36504> $30**
[11:08:13] <LeoNerd> volume?
[11:09:01] <bss36504> I guess, but I would think 3.5" and other small monitors would be pretty popular anyway in HMI applications.
[11:10:23] <bss36504> Actually though, you can get 7" displays for around $85, which while still more expensive than a PC monitor, they are more reasonably priced for the screen real estate. Probably more demand for 7" size in cheapo tablets and such.
[11:33:52] <carabia> Overall production volume, and the volume in which you buy them.
[11:34:08] <carabia> You can buy 320x240s way cheaper than $30, if you buy in volume.
[11:36:46] <carabia> and digikey/mouser/farnell aren't really the cheapest places to source things... :)
[11:43:40] <bss36504> Well, of course things are cheaper in bulk, but I'm strictly comparing "one of this thing" to "one of that similar thing". I was getting my prices from New Haven Display
[11:43:55] <LeoNerd> Production volumes, also
[11:44:07] <carabia> Yeah, I kinda covered that already.
[11:44:15] <LeoNerd> A factory that sells a million of a thing a month is going to be able to make it cheaper, even if you only buy one of it
[11:44:45] <carabia> Digikey sells newhaven if memory serves, ... also that they weren't really the cheapest options around. At least from digikey.
[11:46:24] <bss36504> Well, I'm not building more than maybe two units with this display, so I cant take advantage of bulk pricing. Basically I was just whining about how expensive LCDs are haha
[11:46:45] <LeoNerd> Those SSD1306 units seem to be rediculously cheap
[11:46:56] <LeoNerd> 128x64 OLED.. or is it x96? I forget
[11:47:14] <carabia> 320x240?
[11:47:21] <bss36504> no 128x64
[11:47:22] <carabia> was it that you were after?
[11:47:26] <carabia> Oh, alright
[11:47:37] <bss36504> Wait, yes I want 320x240
[11:47:46] <bss36504> the SSD1306 is 128x64 though
[11:48:25] <bss36504> I'm actually more concerned with physical size as opposed to pixel count. Something in the 3-3.5" size usually has 320x240
[11:49:07] <carabia> Why wouldn't you go for an OLED though? OLEDs are way cheaper
[11:50:18] <carabia> Well I guess it kinda depends on the aspect ratio you want also, not sure what kind of aspect ratios OLEDs provide
[11:50:42] <bss36504> Mostly because I couldnt find a bare OLED with just a flex cable; all seem to be mounted on a PCB, and also I havent really encountered any at the 3-3.5"/320x240 scale
[11:50:48] <bss36504> maybe I'm wrong though
[11:51:48] <bss36504> If we look at new haven again, they do have a 2.7" 128x64, but that's monochrome
[11:52:18] <carabia> so, 3-3.5" color?
[11:52:24] <bss36504> yes
[11:52:57] <bss36504> Integrated driver is fine, but I'd like to test drive the FT81x chips, on my board, so just a bare LCD is preferable.
[11:53:01] <carabia> with an aspect ratio close to... what's that. 1.3:1 heh?
[11:53:23] <bss36504> I guess so, somewhre around that
[11:53:43] <bss36504> Square would be acceptable too, i suppose, provided it had enough pixels and physical size
[11:56:48] <carabia> With a demand for a few units, you're gonna have to bite the bullet...
[11:57:28] <bss36504> Yeah, I know :) It's ok, I'll probably just pick one up from mouser/digikey in the size/resolution I want and just suck it up on the cost.
[11:57:44] <carabia> Especially when it has to be color, so yeah. You could try to look around for like those small digital photo-frames, they're dirt cheap.
[11:57:50] <carabia> To pull one off them.
[11:58:17] <bss36504> Oh that's a good thought...I am already dismantling a perfectly good toaster oven, why not destroy a picture frame too haha
[11:58:37] <carabia> They might come in sizes small enough, and chances are they're half the price you'd pay for those off a component sourcer :)
[12:00:46] <bss36504> Interesting. Did a quick check on amazon, the large ones, like 7" can be had for around $30-$40 wheras the small 3.5" ones are still $25-$30. So I guess its the same problem of the price non-linearly scaling with physical size, however if I ever need a 7" screen, this is the way to go.
[12:01:46] <carabia> Can't win :(
[12:01:53] <bss36504> http://www.amazon.com/GiiNii-GN-311-3-5-Inch-Digital-Picture/dp/B001JJD2PG/ref=sr_1_3?s=photo&ie=UTF8&qid=1465230753&sr=1-3&refinements=p_n_feature_six_browse-bin%3A6133613011
[12:02:08] <carabia> Oh.
[12:02:09] <bss36504> That one is $13! sounds like a good deal for what I need
[12:03:26] <carabia> Will the shipping costs be reasonable though?
[12:03:53] <bss36504> Prime shipping baby! I'll have it on wednesday
[12:04:01] <carabia> Haha.
[12:04:19] <bss36504> I bought the last one, sorry guys
[15:37:49] <superware> I have an ENC28J60 Ethernet module (http://www.shopclues.com/enc28j60-lan-ethernet-network-board-module.html) connected with GND and VCC only to a breadboard which is powered by a USBASP 2.0 jumpered to 3.3V, connected to a laptop USB port. When the ethernet module isn't connected, measuring VCC-GND gives 3.3V, but when I connect it the voltage drop to ~2.7V. I've also measured the current draw of the module and it's 95mA. any ideas?
[15:39:30] <superware> The USBASP uses an AMS1117-3.3 regulator, which can deliver 1A...
[15:51:16] <Mr_Sheesh> Is that reg heatsinked or non? Maybe it's overheating but IDK yet
[15:51:52] <Mr_Sheesh> Also we don't know what the rest of the usbasp is drawing off that 3,3V reg?
[16:00:33] <LeoNerd> I wouldn't trust a 1117 to deliver an entire 1A
[16:00:48] <superware> almost nothing, I guess. when I pull the ethernet module the voltage is exactly 3.3V.
[16:01:27] <superware> I measured 95mA draw by the ethernet module, why should it drop to 2.7?
[16:04:00] <Mr_Sheesh> If the rest of the USBASP draws 910mA then it'd be a little overdone with the ethernet module in there too? Or if it's not heatsinked and is partly shutting down due to oberheat?
[16:07:55] <bss36504> Well you've got (I assume) 10 perfectly good thermometers at the end of your arms :)
[16:11:34] <Mr_Sheesh> Or a FLIR unit? :P
[16:12:21] <Mr_Sheesh> You haven't lived till you've burned a Semiconductor manufacturer's logo into at least ONE of your fingers, in reverse is quite acceptable ofc as that's the usual way :)
[16:12:37] <bss36504> Mild discomfort hasnt ever been quite worth $300+
[16:13:29] <bss36504> I remember a lab in school where this kid managed to burn our instructor with a resistor that was on the verge of bursting into flames. Something like a 10 where a 1K should have been
[16:14:46] <Mr_Sheesh> Oops
[16:15:23] <bss36504> Yeah, he was...displeased haha
[16:15:55] <Mr_Sheesh> We had kids set up a resistor to slowly smoulder, and leave that power supply on once the room's emergency shutdown was turned off. You come in and flip it on "Hmm, someone turned that off. Odd", and pretty soon you start smelling smoke from an unhappy resistor...
[16:16:34] <bss36504> Why stop with resistors? Caps are so much more fun!
[16:24:16] <learath> supercaps.
[16:24:22] <learath> if caps are good, supercaps are better right?
[16:37:29] <LeoNerd> I'd like to open some technical discussions with someone competent at Atmel. Does anyone have a better plan of approach than trying to hunt random email addresses on their website?
[16:44:43] <aandrew> LeoNerd: contact an FAE at arrow
[16:46:24] <LeoNerd> "arrow"?
[16:51:24] <Lambda_Aurigae> superware, how much current is the USBASP able to draw from the USB port?
[16:52:20] <Lambda_Aurigae> superware, just because the regulator can handle 1A doesn't mean you get that from the USB port. You get 100mA default from the port and have to request more in code.
[16:52:20] <superware> I couldn't find the laptop USB specs, but I guess it's 500mA minimum...
[16:52:34] <Lambda_Aurigae> 500mA max unless it is a special charging port.
[16:53:19] <Lambda_Aurigae> minimum is 100mA by default....anything over that must be requested by the usb device normally....that is unless it is a specialized charging port which can then provide 1A or 2A by default.
[16:53:32] <superware> well, someone at #electronics suggested a 10-100uF near the Ethernet module, so I've added a 22uF and walla the voltage is about 3.1V
[16:54:10] <Lambda_Aurigae> then you are drawing more current than the USB port can provide...drawing it in short pulses..
[16:54:24] <superware> I think you are right, but now "everything" works... receiving a UDP broadcast packet :)
[16:55:45] <Lambda_Aurigae> you could try powering it from a phone charger without the cap and see what happens too.
[16:56:33] <superware> sure, problem is I don't have any 3.3V source here :|
[16:56:34] <Lambda_Aurigae> or, get the source for your usbasp and add in a request for more power to the usb startup.
[16:56:49] <superware> sure, right away :)
[16:56:49] <Lambda_Aurigae> no...power the USBASP from the usb phone charger.
[16:56:55] <superware> oh
[16:57:06] <superware> good idea, a sec
[16:57:07] <Lambda_Aurigae> instead of plugging it into a pc, plug it into a phone charger.
[16:57:31] <superware> I have a big battery with USB out..
[16:59:33] <superware> same 3.1V, I guess the issue is with the 3.3V regulator on the usbasp
[16:59:50] <superware> and not with the USB 5V
[17:03:37] <superware> btw, this ENC28J60 Ethernet Controller is very nice...
[17:29:56] <superware> btw, this ENC28J60 Ethernet Controller is very nice...
[17:30:02] <superware> thanks people, bye
[23:58:02] <_ami_> Those PIR sensor based lights keep checking for body heat all the time?
[23:58:57] <_ami_> i was thinking of power sleep on for the time when the lights are on. could save some battery?
[23:59:41] <Casper> they are basically a 1 pixel thermal camera