#avr | Logs for 2014-03-30

Back
[00:00:09] <Casper> different brand shouln't matter normally
[00:00:14] <Casper> but sometime it does
[00:01:11] <Casper> basically, a 2n3904 from any manufacturer should have simmilar specs (and technically you can use any brand, but sometime some parameters are better/worse, so double check) and the pinout is the same
[00:01:35] <anton02> how do you tell which it is to begin with?
[00:02:11] <anton02> the head of the transistor is a semi-circle. with the flat edge facing me, which is the collector?
[00:02:53] <xorm> check the datasheet
[00:03:09] <anton02> ok
[00:03:33] <xorm> i've gotten burned by assuming things, even seemingly innocuous things
[00:03:46] <xorm> like assuming that the marking on an SMD LED is always a cathode mark
[00:03:54] <xorm> hint: sometimes it's an anode mark
[00:04:12] <xorm> depends on manufacturer, and at times it seems, color of the LED
[00:08:15] <anton02> this is it, but it doesnt have a T0 92 like this http://3.bp.blogspot.com/-QLtI86MyfeY/TngJtBgMZnI/AAAAAAAAAUM/fWzUIGYNoGk/s320/20100807060727783.gif
[00:10:22] <anton02> mine instead has a 026 after 2n3904
[00:11:44] <Casper> the last line is usually a production code
[00:11:48] <Casper> ignore it
[00:12:17] <Casper> as long as it's written 2n3904...
[00:12:40] <anton02> i got these transistors to power some DC motors so i woulnt draw too much current from the microchip
[00:13:04] <Casper> they ain't powerfull
[00:13:05] <Casper> beware
[00:13:15] <Casper> and put an anti-parallel diode across the motor
[00:14:00] <anton02> my motors draw 2A max despite only being 3v
[00:14:16] <anton02> 2A is the stall current
[00:14:29] <Casper> 2a is too much for the tiny 3904
[00:14:59] <anton02> maybe i could use a resistor
[00:15:05] <Casper> no
[00:15:05] <anton02> between motor and transistor
[00:15:08] <Casper> better transistor
[00:15:20] <Casper> 3904 is rated 100mA
[00:16:11] <anton02> but if you put a resistor between the transistor and motor that will reduce the current draw, right?
[00:16:40] <Casper> and motor proper function
[00:23:17] <anton02> i wonder if dick smith electronics sells transistors
[00:24:49] <anton02> this is my partially made USART program http://codepad.org/9CNK4k0i
[00:31:52] <Casper> normally you have a #define F_CPU
[00:32:14] <Casper> and double check, I am unsure that you can put tab before the #define
[00:32:28] <Casper> iirc the compiler will complain and ignore them
[00:32:58] <Casper> and later on, consider interrupts
[00:35:02] <ferdna> found it.. if anyone needs it... here it is...
[00:35:12] <ferdna> plot.ly
[01:28:33] <anton02> would BD649 transistors be okay?
[01:35:54] <anton02> why does this transitor have 2 transistors joined together in its equivalent circuit? http://www.fairchildsemi.com/ds/BD/BDX53C.pdf
[01:38:06] <anton02> is a transistors current rating its max current throughput? is it okay to use this to switch two 2 amp DC motors? http://www.fairchildsemi.com/ds/BD/BDX53C.pdf
[01:49:03] <anton02> im pretty sure I recall from one of my electronics courses there's a non-recoverable voltage loss. Does anyone know what the loss is of these? http://www.fairchildsemi.com/ds/BD/BDX53C.pdf
[01:51:48] <anton02> Casper: you know how I was asking you about the smaller transistor earlier to power 2A stall current motors? I wonder if that transistor would even be saturated during most of its use. If not, im going to suffer from weird voltage amplification effects wont i?
[01:53:08] <Casper> why not a mosfet?
[01:53:30] <Casper> one compatible with 3.3V signaling...
[01:53:50] <anton02> not really experienced with using the different semi-conductors so am not really aware of their practical application
[01:55:25] <anton02> Casper: i just bought 3 of these transistors. theyre probably of no use to me now ive thought about this issue of saturation. http://www.fairchildsemi.com/ds/BD/BDX53C.pdf
[01:58:32] <Casper> darlington
[01:58:50] <Casper> they drop 1.4V or so
[01:59:04] <Casper> which mean they can get hot
[01:59:13] <Casper> so probably need an heatsink
[02:00:28] <anton02> Casper: also, the collector-emitter voltage is 60 volts
[02:01:51] <anton02> Casper: is that a problem?
[02:03:32] <Thrashbarg> why would it be a problem?
[02:03:37] <Casper> that is the max it handle before it "explode"
[02:03:57] <anton02> oh
[02:08:23] <Casper> but maybe someone can suggest you a 3.3V compatible mosfet...
[02:08:33] <Casper> would be way better
[02:09:21] <rue_bed> 'logic level' is like 6V
[02:09:39] <rue_bed> unless you use a mosfet driver, there isn't much lower than that
[02:10:01] <rue_bed> or unless you use a severly overrated fet
[02:10:35] <Casper> there is some 3.3V ones
[02:11:07] <Casper> heck, even 1.7V ones
[02:11:23] <rue_bed> show me datasheets :)
[02:13:31] <anton02> what happens if your device wants to pull more current than a transistor is rated at
[02:13:50] <Casper> boom
[02:17:17] <Casper> nite (man 3am...)
[02:17:32] <anton02> gnight thanks
[02:42:52] <naquad> is there some example project demonstrating all kinds of PWM?
[02:44:27] <anton02> the diode rating you use to prevent emf back current wouldnt need to equal the DC motor's stall current would it?
[02:44:46] <anton02> eg 2A stall current with 1A diode
[02:44:56] <anton02> is okay right??
[04:56:29] <naquad> https://gist.github.com/9870248 - i expect this to run phase correct PWM with TOP = 0x3FF, toggling PB1 on compare match, with prescaler = 256. oscilloscope doesn't show anything. what am i doing wrong?
[04:56:50] <naquad> m168p btw
[09:30:18] * sabotender eyes Casper
[09:30:39] <sabotender> 'What happens if your device wants to pull more current than a transistor is rated at'
[09:30:43] <sabotender> 'boom'
[09:32:44] <specing> likely nothing as the ratings are below the actual limits
[09:33:45] <specing> and even if it does, it is more likely to melt than to actually explode
[09:44:40] <antto> icecream is rated at -18°C, starts to melt above 0°C .. but how much does it take for it to explode ;P~
[09:50:12] <specing> It takes one sabotender to explode, two to explode _properly_ and three to cause the another big bang
[09:52:07] <antto> hm..
[09:52:42] <antto> so the ultimate question is: how much does it take for a sabotender to explode O_o
[10:05:49] <Lambda_Aurigae> 1GHz athlon processors will explode in about 3 seconds without heatsink.
[10:07:09] <Tom_itx> not quite
[10:07:23] <Lambda_Aurigae> it did when I last tried.
[10:07:26] <Lambda_Aurigae> not on purpose..
[10:07:26] <Tom_itx> i had one the factory left the sticker on the heatsink and it ran for years that way
[10:07:30] <Lambda_Aurigae> someone else had taken the heatsink off.
[10:07:36] <Tom_itx> the barcode sticker was brown though
[10:07:53] <Lambda_Aurigae> you still had some kind of heatsink on it.
[10:08:06] <Lambda_Aurigae> even if the heat conduction wasn't the best...or maybe it was.
[10:08:06] <Tom_itx> yeah but not very effective
[10:08:09] <specing> lol barcode sticker
[10:08:58] <Lambda_Aurigae> so, if you heatsink your little 1/4 watt resistors they should handle more, yes?
[11:38:32] * Casper burps in sabotender's face
[13:04:19] <makersauce> http://pastebin.com/T59WV33a
[13:04:22] <makersauce> am I going insane?
[13:07:20] <specing> by pasting to pastebin.com? definetely.
[13:08:15] <mdszy> sprunge.us master race
[13:09:10] <makersauce> specing: ha, fair enough
[13:10:22] <specing> I prefer a https:// pastebin, such as https://paste.debian.net
[13:15:15] <Lambda_Aurigae> I just spin up a web server on my computer here and post to that.
[19:28:00] <hotch> Hi everyone, I’m working on a mobile project where I’d like to start programming over serial (with a bootloader, correct?). I’ve done some searching, but maybe I’m looking for the wrong thing. For example: how can I get avrdude to send my .hex over serial etc? Any pointers or tutorial links etc would be really helpful, thanks!
[19:29:07] <antto> the chip must have a bootloader to begin with
[19:29:35] <antto> then, using avrdude, you could flash firmware via that bootloader
[19:30:02] <antto> ;P~
[19:30:12] <antto> toomuchinformation
[19:31:23] <rue_more> who here has done charlieplexing?
[19:32:08] <antto> waat
[19:38:28] <hotch> antto: Sorry, closed laptop. I get that, I’ve been flashing it with avrdude/isp up until now but it would be nice to do things over serial then over the air. As far as a bootloader, any recommendations?
[19:39:07] <hotch> Also, having had used a serial terminal many times for sending/receiving data, how would I flash over serial? I just haven’t seen any tutorials/info pieces on that aspect.
[19:39:57] <Lambda_Aurigae> http://www.atmel.com/Images/Atmel-8390-WIRELESS-AVR2054-Serial-Bootloader-User-Guide_Application-Note.pdf
[19:40:32] <Lambda_Aurigae> http://jtxp.org/tech/tinysafeboot_en.htm
[19:40:35] <rue_more> void ledon(unsigned char led) {
[19:40:35] <rue_more> switch(led) {
[19:40:35] <rue_more> case 0: PORTB = 2; DDRB = 3; break;
[19:40:35] <rue_more> case 1: PORTB = 1; DDRB = 3; break;
[19:40:35] <rue_more> case 2: PORTB = 1; DDRB = 5; break;
[19:40:36] <rue_more> case 3: PORTB = 4; DDRB = 5; break;
[19:40:37] <Lambda_Aurigae> how many do you want?
[19:40:38] <rue_more> case 4: PORTB = 2; DDRB = 6; break;
[19:40:40] <rue_more> case 5: PORTB = 4; DDRB = 6; break;
[19:40:42] <rue_more>
[19:40:44] <rue_more> }
[19:40:46] <Lambda_Aurigae> google search for avr serial bootloader
[19:40:48] <rue_more> }
[19:40:50] <rue_more> I wonder if that will work
[19:41:30] <rue_more> no!
[19:41:32] <rue_more> :)
[19:41:33] <hotch> ahh got it, thanks guys! that’s what I needed to search for, I was considering that as linked but totally separate entities
[19:41:35] <Lambda_Aurigae> rue_bed, depends on how your charlieplex is setup.
[19:42:14] <rue_more> bits 0, 1, and 2 of port B
[19:42:16] <Lambda_Aurigae> there are dozens of them.
[19:43:09] <rue_more> oo that works nice
[19:43:17] <rue_more> now, which the hell led is which!?
[19:55:27] <rue_more> cooool
[19:55:31] <rue_more> it works
[19:56:23] <Tom_itx> prove it
[19:57:06] <rue_more> hmm I'v have to make a video
[19:57:20] <rue_more> and I'v have to write special code just for the video
[19:58:03] <rue_more> I'm gonna go take photos of next years past
[20:27:23] <Casper> I wonder if the protocol is different than spi... since it's just spi but with 12V reset instead of grounding it
[20:27:55] <rue_more> ok tom, I made your demo and recorded it
[20:28:42] <rue_more> now I think I'll go to sleep
[20:32:33] <rue_more> wow, my t13 projects are growing
[20:32:48] <rue_more> and here I never thought I'v come up with a use for them
[20:33:28] <Casper> next summer I may have a nice little project
[20:34:06] <Casper> thinking to install some garden lights, possibly RGB, which I'll dim based on the sunlight available
[20:34:51] <Casper> so I'll install "way too much" light in them, so it get well visible when there is some sunlight still, but dim at night so it is not blinding
[20:35:24] <Tom_itx> 'mood' lighting
[20:36:23] <Casper> yeah
[20:36:50] <Casper> but I wonder if I can find some underground cables on the cheap...
[20:37:04] <Casper> like 4x #14
[20:38:23] <hotch> So if I’m reading everything correctly, once I flash any of the various serial bootloaders … I need a special binary for uploading the hex’s from now on over UART, (no avr dude anymore?) Is anyone doing this on OS X?
[20:47:38] <rue_more> I started writing a bootloader
[20:47:44] <rue_more> oldschool
[20:49:48] <Casper> hotch: depending on the bootloader, some is supported by avrdude
[20:50:33] <hotch> Casper: do you have experience with one of those, or a recommendation? Definitely looking for one without a third party app needed for flashing, would love to use avrdude!
[20:50:43] <Casper> nope
[20:50:47] <Casper> I use spi
[20:52:25] <hotch> Got it, thx Casper
[20:52:39] <Tom_itx> Casper, sprinkler system wire
[20:53:12] <Casper> Tom_itx: those are 4 wires?
[20:54:44] <Casper> 18/5 is what I found, but it look promising
[20:56:48] <Casper> Tom_itx: but yeah, it look promising
[20:57:09] <Casper> bbl
[20:59:08] <hotch> rue_more: over serial or?
[21:12:18] <rue_more> https://www.youtube.com/watch?v=uPml5xC_I00
[21:12:23] <rue_more> serial yes
[22:55:51] <rue_more> hmm what fun thing can I do with a t13 next
[22:57:27] <Casper> I wonder...
[22:57:47] <Casper> how much lumen does RGB led stripes gives...
[22:57:54] <Casper> and current per color
[22:59:22] <rue_more> depends how long the strip is
[22:59:42] <rue_more> I think each segment of a strip is usually 20 - 300mA
[22:59:48] <rue_more> depending on the nature of the strip
[23:02:16] <Casper> I found out that 4W incadescent bulb for nightlights appear to be 10-16lm
[23:02:28] <Casper> if I want to double that with led, it shouln't be too hard