#avr | Logs for 2015-02-05

Back
[02:53:47] <godhatesfacts> Do small speakers have back emf? or microphones even?
[03:16:11] <hackvana> godhatesfacts: I don't think so. back emf is caused by the abrupt interruption of current (ie, disconnection). The magnetic field collapses and generates voltage. If there's no abrupt interruption, there should be no back emf.
[03:25:16] <godhatesfacts> hackvana: that makes me thinking actually..
[03:25:37] <godhatesfacts> if you have a motor, perhaps slowing it down with a capacitor can cancel back emf?
[03:25:48] <godhatesfacts> A battery needs its electrons back (circuit) so that its chemistry can withhold the "potential difference" (in the real world fermi levels). What if you have something to suck out all the available electrons from the - side with some "undercharged" anode? Will it be impossible to short circuit the battery then?
[03:38:43] <jacekowski> hackvana: not abrupt
[03:38:57] <jacekowski> back emf is changed by any kind of change in current causing changes in magnetic field
[03:39:05] <jacekowski> it's change in current over change in time
[03:39:29] <jacekowski> slow changes mean not a lot of back emf
[03:40:23] <godhatesfacts> what do you do about back emf if you have a motor/speaker in your circuit?
[03:40:45] <jacekowski> not a lot
[04:03:47] <twnqx> this corner of dubai feels just like shenzhen
[04:04:00] <twnqx> just with indians/pakistanis instead of chinese, and better english
[04:04:28] <twnqx> mobile phone soukh, tons of small shops, lots of repair stuff, selling all the chinese repair kits and all the spare parts
[04:04:48] <godhatesfacts> https://sketch.io/render/sketch54d33afd94934.png it seems impossible that you can prevent the current caused by the collapse of the magnetic field around the coil .. but is it possible this way?
[04:30:26] <DO9XE> hey there :) does someone know, weather it is posible to put a small delay between the data-setup and the rising/falling of the clock in SPI? Im using LUFAs SPI lib on a mega32u2 :)
[04:31:25] <DO9XE> the chip I am interfacing has a data setup time of 5 ns and a data hold time of 3ns.
[04:48:48] <DO9XE> hm, fixed it :)
[05:59:32] <godhatesfacts> flyback diodes or just a capacitor over the inductor? What's the difference? :p
[06:00:11] <Lambda_Auriga_> one is a diode the other is a capacitor.
[06:00:56] <Lambda_Auriga_> flyback diode is a one way thing...capacitor will work bi-directional...such as, if you have a motor you run both directions rather than just on/off
[06:12:36] <jaggz> I'm going to be working with an atmega32u4 (on a leonardo micro board) in both windows and linux.. I'm inclined to start learning actual AVR coding (instead of my one-project experience of using an arduino uno, and the arduino ide)
[06:13:26] <jaggz> can someone help get me started? This project will entail 3 buttons and trying to get a capacitive slider to work with 1mm of movement one direction, and about 1cm the other direction
[06:18:06] <Lambda_Auriga_> and how do you plan on reading the slider?
[06:18:52] <jaggz> I have been working on learning that... this guy's non-qtouch library instructions seem good
[06:18:54] <jaggz> https://github.com/cnlohr/magfestbadges/tree/master/basictouch
[06:19:05] <jaggz> and his youtube tutorial: https://www.youtube.com/watch?v=BO3umH4Ht8o
[06:20:18] <Lambda_Auriga_> ugh..learning by watching videos...never could understand that...I prefer to read myself.
[06:20:52] <Lambda_Auriga_> not sure what exactly help you need though.
[06:21:08] <jaggz> do I need to do anything with the existing bootloader?
[06:21:19] <jaggz> on the micro
[06:21:20] <LeoNerd> That gihtub repo manages to check in the .o .elf .hex files, etc...
[06:21:28] <Lambda_Auriga_> depends on if you intend to use the bootloader or not...or put your own on there.
[06:21:45] <jaggz> I don't fully understand them.. if they're specific to the arduino implementation and whatnot.
[06:21:58] <jaggz> LeoNerd: heh
[06:21:59] <Lambda_Auriga_> I would guess it is an arduino bootloader, yes.
[06:22:14] <Lambda_Auriga_> but you can use avrdude to upload to arduino bootloaders I believe.
[06:22:14] <jaggz> I wonder why he did that
[06:22:31] <Lambda_Auriga_> I have no clue how off the top of my head as I don't use anything ardweeny myself.
[06:22:52] <jaggz> Lambda_Auriga_: his video also shows the use of the oscilloscope, trigger for the scope, etc. it's useful.
[06:23:59] <jaggz> Lambda_Auriga_: the choice chip for me was the atmega32u4, and I'd have to assemble a board, and solder its tiny connections, hook up a usb connection, etc. for $15 I got two leonardo micro's
[06:24:08] <LeoNerd> avrdude -c arduino ...
[06:24:29] <Lambda_Auriga_> there ya go.
[06:24:36] <jaggz> thanks LeoNerd :)
[06:24:42] <Lambda_Auriga_> so with that you can use the existing bootloader.
[06:26:22] <jaggz> later on I can delve into details and experience with bootloaders themselves
[06:50:17] <jaggz> so, first thing I think I should do is a test program that generates output I can read in the terminal over usb
[06:50:48] <jaggz> then a test with a switch, then begin with a sensor to try to make that work
[06:51:10] <LeoNerd> Touch-swiches are easy enough to do.
[06:51:35] <LeoNerd> I'm not quite sure how you do an effectively-analog slider though
[06:52:42] <jaggz> I'll work on that.. possibly a long-series of triangles which will give higher capacitance towards one end
[06:53:14] <jaggz> I'll have it self-calibrate to stabilize in a position, then test for movement... but that's once I get the basics working
[06:53:31] <jaggz> here they say the arduino ide calls avrdude with: avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -V -Uflash:w:./main.cpp.hex:i
[06:53:51] <jaggz> " first of all, connect to the board using 1200 bauds "to kick the chip into bootloader" :)"
[06:54:52] <jaggz> https://nicholaskell.wordpress.com/tag/leonardo/
[07:42:29] <megal0maniac> Where is RikusW?
[07:42:50] <LeoNerd> He pops in from time to time, hard to guess when
[07:45:09] <Tom_itx> SA
[07:53:48] <megal0maniac> Tom_itx: I know this. So am I
[07:54:33] <megal0maniac> I'll send him a good ol' email
[11:58:12] <LeoNerd> So... a somewhat abstract question here, but here goes: I'm used to developing "things" in, say, Perl; where there's a huuuuuge namespace of "parts" that are already created, so a lot of the time I can just wire together these parts into a working program. A concept I'm sure electronics people will find somewhat famililar :)
[11:58:49] <LeoNerd> But of course there's always those occasions when I can't find a part to do what I want, so I have to make one. In my case here, I'm wanting to make effectively an inverse form of an LED matrix driver, for which I'll likely use an I2C-attached tiny2313.
[12:01:44] <LeoNerd> My question is now: where do I draw the line between "just make something custom" vs. trying to make it sufficiently generic, that it could be reused... at which point, how do people "share" those./. name them.. etc..?
[12:03:46] <LeoNerd> By "inverse", incidnetally, what I mean is a chip to tap the row/column outputs of an existing LED matrix driver built into an appliance, and interpret which LEDs that means are actually lit. It's for monitoring
[13:05:16] <LeoNerd> Anyone played aroudn with nRF24L01 much? I have a basic "make a remote LED blink" setup going on here, between two modules; one of them is the supposedly high-power one with the power amp. onboard. I'm still getting terrible range on it
[13:05:28] <LeoNerd> Some people claim 100m range. I can't go more than about 4m away inside my own house before it fails
[13:06:03] <LeoNerd> What things could I try doing? So far my only thoughts are: pick a radio freq. that doesn't seem to overlap with nearby wifi, and run in a lower on-air bitrate mode
[13:08:12] <woodyj21> LeoNerd: on the RF24L01, are you using an antenna?
[13:08:17] <LeoNerd> Mm.. yah currently I'm using 2400+30 = 2430 MHz, which seems pretty close to 802.11's 2437MHz which a local AP is using. Maybe I should go much higher..
[13:08:31] <LeoNerd> On the PA one, yes. The small onboard ones have tiny onboard wavy-snake antenna
[13:08:59] <LeoNerd> https://twitter.com/cpan_pevans/status/562416772205522946 <== my "handheld" board
[13:09:34] * LeoNerd tries 120 = 2520MHz, 1Mbit/sec
[13:10:21] <woodyj21> nice :)
[13:10:27] <bitd> Trying to get more comfortable with using 32 bit AVR's. Especially looking for example pcb's, anyone got any tips?
[13:13:18] <LeoNerd> Well, boo. That made no difference at all. I wonder about the 250kbit
[13:21:31] <LeoNerd> Meh.. 250kbit also makes little difference
[13:37:40] <LeoNerd> DOH!
[13:38:04] <LeoNerd> The bitrate and TX power are both stored in the same register. I trashed the TX power bits, thus setting it to minimal power
[13:42:05] <woodyj21> LeoNerd: nice catch!
[13:42:15] <LeoNerd> Theeeeere we are.
[13:42:24] <LeoNerd> Funnily enough I get more range at 0dB than -18dB :)
[13:42:35] <woodyj21> I've got some of the 433Mhz RF thingies, but haven't played with them yet
[13:47:11] * LeoNerd returns from a walk in the garden
[14:00:33] <Jartza> I found small boards from my components the other day
[14:00:44] <Jartza> they say mrf24j40ma on them
[14:01:27] <Jartza> 12 of them
[14:02:16] <Jartza> seems to be some kind of zigbee thingie
[14:21:33] <LeoNerd> Weirdly, I'm still not seeing much difference in range between various data rate settings
[18:09:52] <Lambda_Auriga_> LeoNerd, the squiggly antennas tend to be short range...10 meters at best.
[18:10:08] <Lambda_Auriga_> the surface mount 2.4GHz antennas do better but not a lot.
[18:10:13] <Lambda_Auriga_> best range is an external antenna.
[18:11:09] <LeoNerd> Yah.. I'm going for a mix... a base station with the proper antenna, and the little sensor modules/etc... on the tiny board ones
[18:11:14] <LeoNerd> that seems quite sufficient for me
[18:11:58] <Lambda_Auriga_> I get 5 to 10 meters with the surface mount chip antennas on first gen nrf chips.
[18:12:12] <Lambda_Auriga_> I keep to lower data rates though.
[18:12:21] <LeoNerd> I've managed quite a bit more here... I can walk the handheld one up about 4 doors down the road :)
[18:12:31] <Lambda_Auriga_> it's been a while since I played with those modules.
[18:12:40] <LeoNerd> Oddly I don't find changing the data rate makes *any* difference to the useable range
[18:13:08] <Lambda_Auriga_> I remember getting packet loss with high speed.
[18:13:27] <Lambda_Auriga_> aawww...rat shack filed for bankruptcy today.