#avr | Logs for 2012-05-10

Back
[00:37:27] <CapnKernel> I just shipped a board from Shenzhen to Australia by DHL. Was there in one day: DHL, srsly impressive: http://www.dhl.com/content/g0/en/express/tracking.shtml?brand=DHL&AWB=8639520901
[00:40:01] <Casper> what I want to see is if fedex will deliver my stuff in time
[00:40:18] <Casper> they claim ground shipping, before 5pm
[00:40:24] <Casper> that mean like 18 hours to ship
[00:40:25] <CapnKernel> Fingers crossed
[00:40:38] <Casper> something that google map say take 1 day 9 hours to do
[02:55:32] <cyanid3> i have a question. im too zoned out to think correctly right now
[02:55:46] <CapnKernel> ?
[02:55:55] <cyanid3> with the 16/20 mhz atmegas, can i turn on/off a transistor 150000 times a second?
[02:56:05] <cyanid3> or do i need something with more megahertz?
[02:56:06] <cyanid3> lol
[02:56:23] <CapnKernel> Depends on how much calculation needs to go into the on/off decision
[02:56:34] <CapnKernel> For example, if you want to do PWM, you can do that in hardware
[02:56:39] <CapnKernel> No CPU needed.
[02:56:48] <CapnKernel> And you can do it at several megahertz
[02:56:49] <cyanid3> so with pwm it should be fine?
[02:57:06] <CapnKernel> If you use the on-chip hardware support, yes.
[02:57:21] <CapnKernel> You should also be able to do it in software too, if you're not going to be computing anything else
[02:57:58] <cyanid3> ok
[02:58:14] <CapnKernel> Many MCUs (I'm looking at you PIC and 8051, etc) take several clock ticks to execute an instruction. AVR is RISC - the majority of instructions execute in one cycle.
[02:58:34] <CapnKernel> You can more or less assume 1-1
[02:59:12] <CapnKernel> So that's about 40 cycles per toggle
[03:05:05] <cyanid3> im sorry i was on the phone. i will read what you typed
[03:05:29] <cyanid3> so i read that as meaning that these should be more than enough, yes?
[03:06:01] <cyanid3> i need to design a flowbench for injectors. everything off-the-shelf is insanely expensive for the amount of time/research that has gone into making them
[03:06:25] <cyanid3> im not going to pay 1000 usd for a microcontroller which turns on/off a set of injectors 2500 times a second
[03:06:43] <scuzzy> just buy a nice fast arm then or something
[03:07:02] <Casper> sound like a job for a 555
[03:07:26] <scuzzy> or, even better, an FPGA
[03:07:35] <cyanid3> im too tired these days to have time to read a bunch of stuff
[03:07:43] <cyanid3> i might even program it in arduino
[03:07:44] <cyanid3> LOL
[03:07:48] <scuzzy> so you don't wanna spend the money
[03:07:52] <scuzzy> but you're too lazy to make your own
[03:07:53] <scuzzy> ....
[03:07:57] <scuzzy> sound about right?
[03:08:01] <cyanid3> im not too lazy my friend
[03:08:07] <cyanid3> i spend about 14 hours a day working on engines
[03:08:14] <cyanid3> i think im entitled to a bit of rest
[03:08:28] <scuzzy> rest is for the weak!
[03:08:42] <cyanid3> ok
[03:08:44] <Casper> . . . how can this package be here in less than 13 hours when it's still in memphis, tn?
[03:09:21] <cyanid3> im developing electronics in my spare time to make my job easier. and so that i have to rely on less people who usually mess up any job given to them
[03:09:41] <Casper> WTH
[03:09:59] <Casper> based on fedex....
[03:10:11] <cyanid3> i will ask someone to flowtest 8 injectors to within .1 cc/min. they will return injectors with completely different spray patterns because they cant be arsed to do a simple ultrasonic clean job on them
[03:10:19] <scuzzy> cyanid3: are you making an ECU type thing?
[03:10:29] <Casper> the package was picked up in GRAND FORKS, ND
[03:10:36] <Casper> now it's in MEMPHIS, TN
[03:10:37] <cyanid3> haha, im not THAT good
[03:10:44] <Casper> and it should be in canada today o.O
[03:11:27] <scuzzy> cyanid3: I saw an interesting thing for an ECU the other day
[03:11:30] <cyanid3> i develop auxillary stuff. like a board to show engine revs as LEDs, like on f1 cars. or a traction control system which takes inputs from about 8 sensors, monitors wheel slip and instructs the ecu to cut ignition
[03:11:36] <cyanid3> giving me traction through corners
[03:11:45] <scuzzy> they had a rough calculation on how much energy was in the flywheel
[03:11:49] <scuzzy> and when it was enough
[03:11:54] <scuzzy> it would miss injection cycles
[03:12:00] <scuzzy> to save on fuel when it was idling
[03:12:07] <scuzzy> quite clever
[03:12:08] <cyanid3> ah, smart
[03:12:11] <scuzzy> sounded a bit odd
[03:12:14] <scuzzy> but it seemed to work
[03:12:22] <cyanid3> honda's tech is cool too
[03:12:31] <cyanid3> at low revs, it turns off 3 out of 6 cylinders
[03:12:36] <cyanid3> in their v6 engines
[03:13:01] <Casper> oh yeah they can do that because the higher the power usage on the cylinder, the more efficient is the power stroke
[03:13:01] <cyanid3> when the cylinders are turned off, those cylinders have 0 compression
[03:13:03] <scuzzy> I've seen that tactic on boat engines before
[03:13:05] <cyanid3> to cut pumping losses
[03:13:21] <cyanid3> the valves stay open for very long and injection is turned off
[03:13:40] <scuzzy> cyanid3: how do they vary the valve timing on a per cylinder basis?
[03:13:43] <scuzzy> 2 cams?
[03:13:51] <scuzzy> for each set of three?
[03:14:32] <cyanid3> i dont know, honestly. ive not seen their v6 engines. but it is most probably something to do with the cam timing
[03:14:46] <scuzzy> I've seen solenoidal valves
[03:14:50] <cyanid3> they cannot turn off one bank of cylinders, the harmonics would not be good for the engine. it is alternated
[03:15:24] <cyanid3> i might sound like a nutswinger but honda's OE technology is very very advanced sometimes
[03:15:42] <scuzzy> petrol engines are all bad really
[03:15:43] <scuzzy> too complex
[03:15:50] <scuzzy> too inefficient
[03:15:53] <scuzzy> too many moving parts
[03:16:09] <cyanid3> perhaps
[03:16:13] <scuzzy> electric engines are the way forward
[03:16:20] <cyanid3> the tech that goes into some of the stock honda engines is more than some of the big name manufacturers who charge a bomb for their parts
[03:16:48] <scuzzy> maintenance is virtually 0
[03:17:10] <scuzzy> efficiency is somewhere in the high 90's
[03:17:10] <cyanid3> for example, they made an engine that ran on natural gas. the finish on the piston skirts is something that i havent seen on any aftermarket manufacturer
[03:17:25] <cyanid3> people dabble with coatings, honda dabbles with surface finish lol.
[03:17:51] <cyanid3> fwiw, id like to try an electric engine in a performance application
[03:17:57] <cyanid3> high-performance*
[03:18:23] <scuzzy> put a motor on each wheel
[03:18:30] <Casper> the problem isn't high performance
[03:18:31] <scuzzy> and then you don't need any drive train, no gear box
[03:18:32] <scuzzy> no diff
[03:18:33] <Casper> but mileage
[03:18:37] <scuzzy> indeed
[03:18:42] <cyanid3> how do you synchronize the power?
[03:18:45] <scuzzy> energy density on batteries is all bad
[03:19:00] <Casper> electric car can beat any gas powered car...
[03:19:01] <scuzzy> cyanid3: RPM's and things are easy to tell on electric motors
[03:19:10] <Casper> ... but it will do the half a mile and can't come back
[03:19:10] <scuzzy> Casper: agreed
[03:19:16] <scuzzy> lol
[03:19:32] <scuzzy> however, even tho the energy density of batteries is all bad
[03:19:43] <scuzzy> you're using the power probably 3 times more efficiently
[03:19:45] <cyanid3> anyways, time for more work.
[03:19:47] <cyanid3> later!
[03:19:51] <Casper> see ya
[03:19:53] <Casper> nite all
[03:20:05] <scuzzy> so you can effectively triple the energy density in comparing the batteries with petrol
[03:20:15] <scuzzy> night
[03:20:41] <jacekowski> scuzzy: when motors are linked mechanicaly RPMs will be the same
[03:21:03] <scuzzy> jacekowski: why would you want them linked mechanically?
[03:21:35] <scuzzy> if you can controll the RPM digitally, then there is no issue
[03:21:39] <scuzzy> I don't think
[03:21:49] <jacekowski> they are
[03:21:52] <jacekowski> either by the road
[03:21:55] <jacekowski> or some other kind of linkage
[03:21:59] <scuzzy> I guess
[03:22:08] <scuzzy> my point is, you don't want the motors fighting each other
[03:22:12] <scuzzy> if you're going around a corner
[03:22:19] <jacekowski> you need a diff
[03:22:22] <scuzzy> because then the RPM is different for each wheel
[03:22:36] <scuzzy> technically, you could make it an electronic diff
[03:22:40] <scuzzy> I'm pretty sure
[03:22:44] <jacekowski> what you need is to controll the torque
[03:22:46] <jacekowski> not RPMs
[03:22:50] <jacekowski> RPMs are useless
[03:22:53] <scuzzy> jacekowski: exactly
[03:22:58] <Casper> you control the power
[03:23:00] <Casper> not the rpm
[03:23:10] <scuzzy> yeah, which almost equates to an electronic diff
[03:23:22] <Casper> and do some rpm limiting for if a wheel slip
[03:23:34] <scuzzy> yeah
[03:23:38] <scuzzy> but it doesn't' matter
[03:23:39] <Casper> so you don'T do a burn at 100kmh
[03:23:43] <scuzzy> lol
[03:25:00] <jacekowski> Casper: i do
[03:28:45] <Casper> nite
[03:46:25] <skorket> Does anyone have experience with grbl?
[05:10:14] <Tom_itx> scuzzy, have you looked at the efi332 project?
[05:10:40] <Tom_itx> http://www.diy-efi.org/efi332/faq.htm
[05:20:25] <scuzzy> Tom_itx: sweet
[05:26:33] <CapnKernel> skorket: I have played with grbl a little
[05:26:38] <CapnKernel> It's used at our hackerspace
[05:26:45] <CapnKernel> It's a very cool idea
[07:06:14] <OndraSter> how does Ondra play? He grabs small piezzo speaker, wave generator
[07:06:18] <OndraSter> and plays with AM/FM modulations lol
[07:07:38] <OndraSter> AMBULANCE! :D
[07:08:48] <CapnKernel> Oh no, you didn't overmodulate did you?
[07:09:55] <OndraSter> I didn't do what?
[08:24:12] <WormFood> the difference between 2 resistors labeled 1501 and 1502 is their tolerance, right? The first one is 15 ohms at 1%, and the 2nd is 15 ohms at 2%...is that right?
[08:26:44] <CapnKernel> What does the ohmmeter say?
[08:27:10] <WormFood> didn't try yet. I don't want to take this apart again.
[08:27:18] <WormFood> but I'll need to, to verify some traces.
[08:28:13] <Tom_itx> http://www.diyaudioandvideo.com/Electronics/Color/
[08:28:52] <WormFood> it isn't color coded, technically...since it is a SMT resistor....I used a different color calculator, and it said that last band is tolerance.
[08:29:12] <Tom_itx> that lists other ranges as well
[08:30:02] <CapnKernel> I think it's an extra band of precision. See this: http://en.wikipedia.org/wiki/Resistor_color_code#Printed_numbers
[08:30:23] <CapnKernel> A similar method is used to code precision surface mount resistors by using a 4-digit code which has 3 significant figures and a power of ten multiplier.
[08:30:45] <WormFood> yeah, I was expecting that last one to be a multiplier
[08:30:57] <WormFood> or, divider (multiply by a fraction)
[08:31:36] <CapnKernel> So, not tolerance.
[08:31:52] <WormFood> not sure. The ohm meter will tell all ;)
[08:32:06] <CapnKernel> Bet you a bottle of Qingdao
[08:32:17] <WormFood> I think it is not the tolerance
[08:32:22] <WormFood> which is what I first thought.
[08:34:24] <WormFood> on that wikipedia page, they have a 0 ohm "resistor"....can that technically be called a resistor? Wouldn't that simply be a connection? A jumper?
[08:34:43] <Tom_itx> they call them resistors
[08:34:53] <Tom_itx> i've got a bunch of 0 ohm r's
[08:34:53] <WormFood> because of the package?
[08:35:10] <Tom_itx> they look like any other smt r
[08:35:15] <WormFood> I just don't think of it as a resistor....although, technically everything has a resistance.
[08:35:30] <WormFood> if you want to call that a resistor, shouldn't you also call a wire a resistor too? ;)
[08:35:46] <Tom_itx> it wasn't mfg'd as such
[08:36:34] <CapnKernel> I think I saw a discussion of whether or not 0R was really a resistor in an XKCD, titled "how not to get laid"
[08:39:07] <WormFood> url?
[08:39:45] <WormFood> I gotta give a message to my girlfriend...be right back....or was that a massage...I forget now
[08:40:38] <CapnKernel> About 0R resistors? Oy!
[09:03:27] <Kevin`> I want some 0r resistors, i'd make a magnet with them
[09:03:42] <Kevin`> all the 0r resistors i've seen have been faulty though and have >0
[09:03:44] <Kevin`> :(
[09:40:54] <WormFood> what is the tolerance on a zero ohm resistor? at 10% tolerance, it can range from 0 ohms, to 0 ohms. hell, even at 100% tolerance, it should still be exactly 0 ohms.
[09:41:55] <mrfrenzy_> haha
[09:54:35] <OndraSter> WormFood, that's why they are 0R +something :)
[10:04:03] <Kevin`> it's fine if it's negative for my use
[10:04:11] <Kevin`> :D
[10:21:07] <rzc> hi Guys
[10:25:20] <rzc> Does someone know some webserver to atmega328p and arduino ethernet shield(w5100)?
[10:25:58] <z1ph> webserver _for_ avr you mean?
[10:28:20] <rzc> So.. I am trying to say, some webserver written in C (avr-libc)..
[10:29:05] <rzc> z1ph, I found an example in the Arduino's IDE...But is different...
[10:34:21] <z1ph> what's wrong with it?
[10:36:18] <rzc> zlph, I found it...\o/.. let me to show you
[10:37:09] <rzc> zlph, www.seanet.com/~karllunt/w5100_library.html
[10:37:49] <rzc> zlph, thanks for your time
[12:06:56] <skorket> CapnKernel, still around?
[12:07:44] <CapnKernel> yes
[12:07:47] <CapnKernel> only just
[12:08:31] <CapnKernel> were we talking grbl?
[12:08:36] <skorket> yeah, me too, I'm about to go into work.
[12:08:37] <skorket> yep
[12:08:59] <CapnKernel> There's not much I can say about it, I don't have a lot of experience with it.
[12:09:07] <skorket> ah...
[12:09:15] <CapnKernel> But it sure beats dedicating a PC to driving a CNC mill
[12:09:15] <skorket> I have it 'almost' working
[12:09:23] <CapnKernel> What kind of problem are you having?
[12:09:48] <skorket> grbl is running on an arduino, I think I have the step and direction lines correctly set up
[12:10:20] <skorket> I hear it whirring when I give a command ('G00 X1.0' for example) but it doesn't turn the way it's supposed to
[12:10:28] <CapnKernel> Do you have a CRO you can put on the pins?
[12:10:36] <skorket> I'm pretty sure I have the wiring on the stepper right
[12:10:38] <skorket> CR0?
[12:10:48] <CapnKernel> Oscilloscope
[12:11:08] <skorket> On the control lines or on the stepper lines?
[12:11:15] <CapnKernel> A multimeter or even a LED+resistor in a pinch
[12:11:27] <skorket> I have an oscope, but it's slow and weak
[12:11:31] <CapnKernel> The lines between the arduino and your stepper controller
[12:11:46] <skorket> Yes
[12:11:54] <skorket> what should I be looking for?
[12:12:10] <CapnKernel> Apart from the direction being wrong, is motion otherwise smooth?
[12:12:57] <skorket> From what I can tell, not at all
[12:13:08] <skorket> it 'jumps' then 'whirs' in place
[12:13:17] <CapnKernel> Could be a stepping problem
[12:14:17] <CapnKernel> My suggestion: Since you have an Arduino, see if you can find some alternative code which drives the stepper.
[12:14:32] <CapnKernel> set dir pin, step, delay, step, delay, step, delay, etc.
[12:14:41] <CapnKernel> Keep reducing the delay
[12:14:49] <CapnKernel> See if you can get smooth movement.
[12:15:03] <CapnKernel> There are some #defines in grbl which determine how fast it tries to drive the step lines
[12:15:23] <CapnKernel> And usually there are controller chip settings to play with, such as micro-stepping
[12:15:27] <skorket> I tried upping the 'microseconds/pulse' to 200 (from 50) with the same effect
[12:15:38] <CapnKernel> Try 2000
[12:15:42] <CapnKernel> And 20000
[12:15:43] <skorket> but yes, those are good ideas, I'll try those if I don't come up with anything better
[12:15:49] <skorket> I think it has a maximum
[12:16:02] <CapnKernel> I'd really be trying to eliminate complexity until you have hello world
[12:16:20] <skorket> yep
[12:16:22] <CapnKernel> Otherwise it's a problem of too many variables
[12:16:45] <CapnKernel> I think you have enough ideas to try now. All the best!
[12:16:49] <CapnKernel> (bed time for me)
[12:16:59] <skorket> yep yep. So maybe just programming something like an attiny or even an atmega to pulse at a slow rate to see if I can get smooth movement
[12:17:08] <CapnKernel> YES
[12:17:09] <skorket> that will tell me if the controller board is at least functioning properly
[12:17:19] <skorket> ok, thanks
[12:17:24] <CapnKernel> You're welcome
[13:25:14] <chupas> its fine to connect the thermal pad on an AVR to gnd right?
[17:14:08] <Sgt_Lemming> http://imgur.com/a/smmxx
[17:14:37] <OndraSter> hey I remember that
[17:15:14] <OndraSter> does it work on the first time? :)
[17:16:14] <Sgt_Lemming> yes
[17:16:25] <OndraSter> congrats :)
[17:19:23] <z1ph> what rfid reader are you connecting to it?
[17:19:36] <z1ph> do I read right that you connect an external rfid reader with ttl output?
[17:19:41] <Sgt_Lemming> whatever you want to z1ph, that's part of the idea
[17:19:45] * Sgt_Lemming nods
[17:26:32] <z1ph> Sgt_Lemming: is it common for rfid modules to just serial dump 10bytes raw tagid?
[17:27:04] <Sgt_Lemming> depends on the module, the card being read and all sorts of things z1ph
[17:28:13] <z1ph> got any docs on that? or is your code just, "works with the modules we have" ?
[17:36:00] <Sgt_Lemming> the code we have is designed to work with basic 125KHz cards
[17:36:17] <Sgt_Lemming> it shouldn't be all that hard to modify it to work with other cards though
[17:36:40] <Sgt_Lemming> and the board is 99% arduino compatible, so chances are someone else has already written said code
[21:04:37] <WormFood> if I set my USB flash disk to ECC 0, I get about 123 meg of space out of it, but if I set ECC 12 I get about 805 meg of space. Does that mean that ECC 0 is almost 8 times more reliable than ECC 12?
[21:11:18] <Casper> good question
[21:29:57] <WormFood> now I'm wondering what this "low scan" option is. When I set Low Scan: 1, ECC: 1 I get 244 meg of space, but Low Scan 2: ECC: 1 gives me 123 meg....now I'm testing at Low Scan: 6.....any of you guys understand what this "Low Scan" option is?
[21:41:53] <WormFood> and a Low Scan: 6, and ECC: 1 gives me 245 meg of space...odd...not what I expected.
[23:08:34] <ThersiT> I think I did a bad thing, I set lfuse to 0xE3, setting CKSEL 0:3 to 0011, which enables the internal 128 kHz oscillator. Now I can't program my chip (mega644p).
[23:10:15] <ThersiT> There dosen't seem to be alot of info about the 128 kHz oscillator on the web or in the data sheet. Anyone know how to use it?
[23:16:17] <ThersiT> ha! nevermind, my old dasa programmer talked to it just fine.
[23:17:35] <ThersiT> I still don't know what was going on tho, If anyone has any bookmarked pages about that thing I'd love to see them.
[23:32:17] <CapnKernel> ThersiT: You can try driving it with an external oscillator
[23:35:22] <Casper> ThersiT: what thing?
[23:35:35] <ThersiT> CapnKernel: I was able to change the lfuse with a dasa programmer luckily. I'm running on the internal RC oscillator now. Still don't know what the internal 128 kHz oscillator is all about tho.
[23:35:36] <Casper> internal 128kHz? same as the internal 1-8MHz, just slower
[23:35:50] <Casper> it's just low power
[23:36:19] <ThersiT> Was my avrisp2 just timing out then?
[23:36:44] <Casper> no
[23:36:53] <Casper> it was just too fast for the chip
[23:36:59] <Casper> it couln't understand your programmer
[23:39:51] <ThersiT> Yea, that make's sense. I'm trying to breadboard a AVR butterfly out of a 644p to follow along with a book I'm reading but serial is'nt acting right.
[23:45:38] <Casper> uart is unreliable on internal RC
[23:51:22] <ThersiT> Oh, I'm looking at the data sheet for the butterfly and there is a 32.768kHz Xtal between TOSC1 and TOSC2. It must have something to do with that.
[23:52:02] <Casper> no
[23:52:10] <Casper> that's for RTC
[23:54:35] <ThersiT> The sample code for UART setup from this book is referencing timer1 and timer2 tho.
[23:58:03] <Casper> it's possible that the code use the 32768 xtal to tune up the internal RC
[23:58:12] <ThersiT> Here's two functions about uart from this book. http://pastebin.com/nADsdnDn
[23:58:20] <Casper> òr you look at a software implementation of the uart, not hardware