#avr | Logs for 2015-01-09

Back
[04:46:26] <edmont> hi
[04:50:51] <edmont> i want to use the External RF-Front End Control in Atmega128RFA1, which uses DIG3 and DIG4 as RX/TX indicators
[04:51:14] <edmont> but i'm already using DIG4 as ADC input
[04:53:30] <edmont> i think it can be done with a two channel multiplexer or something like that using DIG3 only
[04:53:47] <edmont> but do you know any other option that involves no external components?
[08:23:17] <LeoNerd> While it's quiet, I'm going to think out loud a moment and see if anyone thinks I'm crazy (well, probably they do, but moreso than usual?)
[08:23:53] <LeoNerd> I'm wanting to attach some sort of "announce to the internet" monitor on my dishwasher's status LEDs, so I know when it's done. I've had a good look over the LEDs on the board, and come to the following conclusions
[08:24:35] <LeoNerd> The LEDs are sat in a row-and-column matrix driver off some microcontroller I don't really recognise; anode columns are PNP'ed off (5V?) supply, cathode rows are NPN'ed to ground. So far so good.
[08:25:01] <LeoNerd> Problem is I don't know for sure that "board ground" is really ground, so I definitely want to optoisolate the result before it hits my actual computer. I have two possible designs here.
[08:25:46] <LeoNerd> 1: tap the cross point on the LED matrix with a second LED-based optoisolator, with enough of a resistor not to drain too much current and hence brightness off the original on the board. I can then read these out with a microcontroller "outside"
[08:26:31] <LeoNerd> 2: tap the matrix driver rows and columns more directly, on a microcontroller I run at board voltages.. probably use an ATtiny2313 for this as it has lots of IO pins and a UART, and optoisolate the final UART on the way out
[08:27:20] <LeoNerd> The first one seems simpler to get running initially, but has an annoyance of needing lots of isolators, one per LED I want to monitor... there's like... 20 on there.
[08:28:07] <LeoNerd> Additionally, whichever way I look at it, there's the problem that the LED matrix is scanned, not running 100% of the time, so I'll have to put some more fancy code into working which LEDs are actually on
[08:34:44] <LeoNerd> Mmm... stunned silence? :)
[08:36:45] <tpw_rules> what if you just put a high K resistor on the led to sense if it's getting voltage. smooth it out in software
[08:36:50] <tpw_rules> tehn get an isolated rs232 converter
[08:37:40] <tpw_rules> or just make it wireless
[08:39:55] <LeoNerd> Oooh.. wireless is an option.. I could just put the nRF directly inside
[08:40:02] <LeoNerd> But a tiny2313 isn't powerful enough to drive that
[08:45:00] <LeoNerd> tpw_rules: The LEDs are in a matrix... it's not sufficient to detect just one side -or- the other.. if I hit the "row" side I'll just get a squarewave... if I hit the "column" side I won't know if that's the right LED
[08:45:22] <LeoNerd> I have to either sense each LED individually (1), or tap rows and columns and implement coïncidence logic myself (2)
[08:46:44] <tpw_rules> how many LEDs does it have?
[08:47:00] <tpw_rules> could you get really tiny hall effect sensors to sense current through an x-y pair?
[08:47:16] <LeoNerd> Hah.... no, that won't be doable.. LEDs are tiiiiinycurrent
[08:47:57] <LeoNerd> It has 4 anode rows and about 12 cathode columns, but 7 of those cathodes drive digits of a 7-segment display I don't care about, so only really 5 cathodes.
[08:48:07] <tpw_rules> oh
[08:48:24] <tpw_rules> maybe it would be easiest to just use photocells :P
[08:48:31] <LeoNerd> I tried that.. that's horrible
[08:48:36] <tpw_rules> :
[08:48:37] <tpw_rules> D
[08:48:40] <tpw_rules> :D*
[08:48:48] <LeoNerd> That was my first attempt, before I even opened the control box up
[08:49:36] <LeoNerd> The LED is visible to humans, but because it's spot-wavelength it doesn't tigger a photodiode very much. Plus the LED is far away from the output window, with a light pipe. Also I suspect given the 4-anode driver matrix here, its duty cycle will be <= 25%, so that doesn't help detecting it either
[09:02:35] <LeoNerd> Ohyes, the other plus point of plan (1) is that I can put a lowpass cap on the output of the isolators, to smooth out the matrix scan and make it easier to read
[10:46:43] <Aer93> hi. I'm trying to read values from the IMU of a MPU6000... The thing is that they have a lot of noise, I do not know if that much noise is normal
[10:46:53] <Aer93> I mean, for examen, when holding still
[10:47:14] <Aer93> I get 8000, 8300, 100, 30, 8000
[10:47:17] <Aer93> the right value is 8000
[10:47:32] <Aer93> but 100? thats quite a big jump!
[10:47:39] <Aer93> is that normal in this kind of sensors?
[10:49:40] <LeoNerd> Are you sure you trust your reading code?
[10:49:51] <LeoNerd> Apply some sort of logic probe to watch the bus?
[10:51:35] <Aer93> mmm
[10:51:59] <Aer93> the reading is quite simple, I do not see where could it be wrong
[10:52:16] <Aer93> and why would sometimes be right?
[10:52:30] <Aer93> its quite strange that 4 out of 6 values are correct
[10:54:48] <LeoNerd> Trace the bus; maybe a bit goes wrong somewhere and the values are shifted somehow?
[10:54:51] <LeoNerd> Whoknows.. could be anything
[10:54:58] <LeoNerd> More questions need answers. find answers to them
[10:55:25] <Aer93> ok
[10:56:17] <Aer93> but really strange things happens... I'm trying to read the gravity accel
[10:56:43] <Aer93> the thing is that in a certain position it does better than in the same opposite
[10:56:56] <Aer93> accel x reads good 8000, but not -8000
[10:57:03] <Aer93> :S
[10:57:29] <Aer93> I would think sensors are broken but I've tryingd the ardupilot code from the mission planer and the values obtained are perfect
[10:57:37] <Aer93> so it has to be my code...
[15:07:45] <ColdKeyboard> Anyone had an issue with BusPirate that when you read I2C or send/read data instead of displaying it as 0xD1 or 0xD0 you get some weird symbols...? I'm using putty and my screen looks something like this -> http://i.imgur.com/fi6qnEA.jpg
[15:22:41] <ColdKeyboard> Found it, my bad :)
[15:36:24] <mulvane> Question... I have an atmega328 with the fuses currently set for an external 16MHz crystal..... How do I reset them to use the internal 8MHz oscillator? I have an avr mkii isp and an arduino uno smd board to work with.
[15:53:29] <yonax> hi, I'm trying to pwm a cpu fan and read the tach signal with an AVR. Obviously pwm'ing screw up the tach signal. Is pulse stretching what I should be looking into?
[16:06:01] <vsync> Okay, here's something.
[16:07:17] <vsync> Having to write to non-volatile memory some data (~100 bytes), frequency ranging anywhere from 10 to 100 times a day.
[16:09:06] <vsync> the nv memory size could be something around 32k
[16:09:12] <vsync> or even 64k
[16:11:39] <vsync> avr's internal memories are out of the question i guess. eeprom doesn't do well with that amount of writes i guess. Been looking into FRAM. Y/N?
[16:12:45] <vsync> i need to minimize power consumption aswell, i read someone bitching about fram's idle current being higher than eeprom's
[16:16:03] <TechChristoph_> anyone experience with syncmos chip ?
[16:16:18] <TechChristoph_> i want to read it with avrdude or some
[16:17:08] <vsync> although, the fram does not have to be on all the time, so i could possibly either use a small fet or actually source current straight off the av
[16:17:11] <vsync> avr
[16:32:26] <Jartza> hmm
[16:32:40] <Jartza> why on earth attiny88 has efuse set by default as "0x06"
[16:32:48] <Jartza> and I can't change it to 0xFE
[16:32:59] <Jartza> I can change it to 0x07 or 0x06 though
[16:33:20] <LeoNerd> Do all of the bits physically exist?
[16:33:24] <LeoNerd> efuse probably doesn't
[16:33:57] <LeoNerd> E.g. I know that only one bit of the 'tiny84 efuse exists
[16:34:59] <Jartza> same for t88
[16:35:16] <Jartza> only SELFPRGEN
[16:35:33] <LeoNerd> Yah
[16:36:34] <Jartza> https://www.dropbox.com/s/oezzo8ze2zdriuy/Screenshot%202015-01-10%2000.16.07.png?dl=0
[16:36:43] <Jartza> the other fuses are "all right"
[16:36:46] <LeoNerd> Ugh.. How does anyone find /anything/ on the Farnell website if it doesn't have an -exact- single match by text search?
[16:36:49] <LeoNerd> This is terrible
[16:36:52] <Jartza> avrdude: safemode: Fuses OK (E:07, H:DF, L:EE)
[16:37:40] <Jartza> also the signature is ok
[16:37:41] <Jartza> avrdude: Device signature = 0x1e9311
[16:37:47] <Jartza> flashing works, etc.
[16:39:37] <Jartza> avrdude: verifying ...
[16:39:38] <Jartza> avrdude: verification error, first mismatch at byte 0x0000 0x06 != 0xfe
[16:39:38] <Jartza> avrdude: verification error; content mismatch
[16:41:17] <Jartza> I even tried with lower speeds
[16:41:23] <Jartza> I can only set it to 0x06 or 0x07
[16:43:12] <Lambda-Aurigae> vsync, nvsram.
[16:43:56] <Lambda-Aurigae> http://www.microchip.com/wwwproducts/Devices.aspx?product=23LCV1024
[16:45:58] <Lambda-Aurigae> 3 to 10 mA operating current. 4 to 10 uA standby current.
[16:46:44] <vsync> Hmm. Nice
[16:46:51] <Lambda-Aurigae> I love them.
[16:46:54] <Lambda-Aurigae> you power through vcc
[16:47:03] <Lambda-Aurigae> and have a small battery or huge cap on vbat
[16:47:11] <Lambda-Aurigae> usually small battery.
[16:47:27] <Lambda-Aurigae> 1.4 to 3.6V..I have some small lithiums I use for them.
[16:47:30] <vsync> i am also trying to minimize component count
[16:47:34] <Lambda-Aurigae> 3.0V lithium.
[16:47:36] <vsync> i didn't mention that, i'm sorry
[16:47:47] <Lambda-Aurigae> well, if you maintain power then you don't need the battery.
[16:47:56] <vsync> so
[16:47:57] <Lambda-Aurigae> it is an i2c interfaced sram chip
[16:47:59] <vsync> it is volatile?
[16:48:03] <Lambda-Aurigae> yes.
[16:48:07] <Lambda-Aurigae> unless you add the battery.
[16:48:10] <vsync> then it's out of the question i'm afraid
[16:48:11] <vsync> surely
[16:48:12] <Lambda-Aurigae> it's sram.
[16:48:28] <Lambda-Aurigae> that's why the little bitty battery connected to it.
[16:48:34] <vsync> yeah, figures.
[16:49:03] <Lambda-Aurigae> maxim/dallas has some with built in battery.
[16:49:06] <Lambda-Aurigae> but they are huge.
[16:49:11] <Lambda-Aurigae> and usually parallel.
[16:49:41] <vsync> i have a very limited space, trying to fit this into ~ 35x35x5
[16:49:50] <vsync> max 40x50
[16:49:54] <vsync> 40x40
[16:50:26] <vsync> there are other components included aswell, but they are figured out
[16:50:46] <Lambda-Aurigae> all of the maxim ones are parallel interface.
[16:50:53] <Lambda-Aurigae> so won't work well for your project.
[16:51:19] <vsync> i have plenty of unused io, that's not an issue
[16:51:27] <vsync> but i'd rather use non-volatile altogether
[16:51:49] <Lambda-Aurigae> these are the ones used on older motherboards(and some newer ones)
[16:52:11] <Lambda-Aurigae> http://www.maximintegrated.com/en/products/digital/memory-products/DS1230AB.html
[16:52:16] <mulvane> Question... I have an atmega328 with the fuses currently set for an external 16MHz crystal..... How do I reset them to use the internal 8MHz oscillator? I have an avr mkii isp and an arduino uno smd board to work with.
[16:52:24] <Lambda-Aurigae> works like a 32k*8bit sram.
[16:52:46] <Lambda-Aurigae> mulvane, you figure out what the fuses are supposed to be and program them to the chip.
[16:53:13] <mulvane> But how? I can't program it..avrdude keeps saying its out of sync when I try via isp?
[16:53:19] <Jartza> well this is strange
[16:53:25] <Lambda-Aurigae> being an ardweeny crap board, no clue.
[16:53:42] <mulvane> It's a 328 on a breadboard.
[16:53:49] <mulvane> But its fused for 16MHz crystal
[16:53:58] <Lambda-Aurigae> you said it was an arduino uno smd board.
[16:54:08] <mulvane> I have one I can use to program..
[16:54:10] <Lambda-Aurigae> oh.
[16:54:13] <mulvane> I also have an mkii
[16:54:14] <vsync> Lambda-Aurigae: that's also 5 V, working on 3v3
[16:54:22] <Lambda-Aurigae> vsync, well pooh!
[16:54:25] <vsync> hahah
[16:54:32] <Lambda-Aurigae> mulvane, do you have a crystal attached to it?
[16:54:48] <mulvane> To the arduino or mega368?
[16:54:55] <Lambda-Aurigae> http://para.maximintegrated.com/search.mvp?fam=memory&489=NV%20SRAM&tree=memory
[16:55:07] <Lambda-Aurigae> the chip you are trying to program that is set to use external crystal.
[16:55:18] <mulvane> No. I don't have any on hand.
[16:55:28] <mulvane> I have the caps I would need.
[16:55:34] <Lambda-Aurigae> then you can't program it...unless you have an external clock source.
[16:55:52] <Lambda-Aurigae> and, I gotta run,,but will be back to cause trouble later.
[16:55:59] <mulvane> Could I piggy back the clock on the arduino?
[16:56:52] <vsync> thanks. Heh
[16:59:15] <Jartza> strangeness #2 with attiny88. it seems the chip is running @128kHz
[16:59:37] <Jartza> because the delays are about correct when I set the F_CPU to 128000
[16:59:46] <Jartza> even though the fuses should be for 8MHz
[17:08:08] <LeoNerd> So... What's a generic cheap bog-standard optoisolator?
[17:08:28] <LeoNerd> The first-hit version of what you'd call 1N4001 or BC549
[17:11:16] <Jartza> well now this is strange
[17:11:25] <Jartza> the other attiny88 has exactly the same issue
[17:11:27] <Jartza> wtf
[17:11:46] <Jartza> now I need to check the datasheet, maybe the fuse calculator is incorrect
[17:12:58] <malinus> LeoNerd: 1) taydaelectronics.com 2) take the cheapest one :D
[17:13:06] <Jartza> nope. should be L:0xEE, H:0xDF and E:0xFE
[18:42:03] <RossMcK_> morning all
[19:07:40] <LeoNerd> Gah.. how annoying. The ADC on a tiny841 allows the combination of measuring the internal 1.1V source using VCC as a reference - in effect, usefully allowing you to measure VCC directly. The tiny84 doesn't allow that combination.
[19:07:58] <LeoNerd> So if I base a board on a tiny84 instead of the fancier more expensive 841, I'll have to dedicate an entire extra ADC input just for that
[19:11:04] <LeoNerd> Oooohwait, yes it does. I misread the datasheet
[19:12:17] <hackvana> Yay.
[19:17:43] <Jartza> oh yes, also attiny85 allows that
[19:17:54] <Jartza> nice way to measure vcc without "using a pin"
[19:17:56] <LeoNerd> 85 doesn't have enough pins though.. am working to a 14pin thing
[19:18:20] <LeoNerd> Talking to an nRF24L01, so that needs 4 SPI, another 2 dedicated control.. still doesn't leave me -all- that many left ;)
[19:18:35] <Jartza> yeah
[19:18:49] <Jartza> I'm playing with attiny88 because it's cheaper than both 85 and 84
[19:18:54] <Jartza> but has 32 pis
[19:18:56] <Jartza> pins
[19:19:15] <Jartza> just strange problems with fuses
[19:19:17] <LeoNerd> Heh.. but does it have the ADC / USI of those..?
[19:19:28] <Jartza> yes
[19:19:49] <LeoNerd> Oh, curious
[19:20:15] <Jartza> 8- and 16-bit timers, 6/8 channel adc (10bit), master/slave spi, i2c....
[19:20:22] <Jartza> I have no clue why it's called tiny
[19:20:48] <LeoNerd> "tiny" core doesn't have a separate bootloader, or MUL/IMUL instructions
[19:21:00] <Jartza> yes
[19:21:11] <Jartza> but other than that, it's much better than many of the mega-chips :)
[19:21:41] <Jartza> pcint on basically all input pins, in 4 pcint groups (meaning 4 separate pcints for groups of 8 pins)
[19:22:06] <LeoNerd> Ooh, real SPI and I2C rather than the cutprice USI
[19:22:55] <Jartza> yes
[19:23:06] <LeoNerd> Hrm.. all it needs is a UART now
[19:25:02] <LeoNerd> Anyhow, I should head to bed. Night all
[19:26:03] <RossMcK_> LeoNerd: are you aware of http://nerdralph.blogspot.ca/2014/01/nrf24l01-control-with-3-attiny85-pins.html
[19:26:46] <Jartza> LeoNerd: yes, uart is missing
[19:26:53] <Jartza> although I find I need uart rarely
[19:27:54] <LeoNerd> RossMcK_: Yeah... crazy ;)
[19:28:18] <RossMcK_> LeoNerd: might save you a pin or 8 :-)
[19:29:28] <LeoNerd> Mmmm...
[19:31:41] <LeoNerd> RossMcK_: Ohyeah I remember now... holding CE high eats the battery. Fine for USB-powered things
[19:33:50] <Lambda-Aurigae> so, what's the advantage of the attiny88 over the atmega88?
[19:48:00] <Lambda-Aurigae> heck, atmega88 even has qtouch.
[20:22:18] <Casper> qtouch is really badly documented
[20:23:25] <Casper> a black box, with a black software, user unfriendly and all
[23:13:46] <Tom_itx> saleae is raising prices... if you want an analizer at the regular price ending Jan 23 enter this code: SE294F9K
[23:21:14] <mulvane> Tom Random question... I bought a programmer off you about 2 years ago...Is there a bug in win 8.1 with them you are aware of? I haven't been able to succesfully burn a program to a chip with since I started trying to use it again this week.
[23:21:45] <hackvana> Price rise on Saleae's Cypress reference board: http://myfreescalewebpage.free.fr/toolbox/logic/logic.htm
[23:22:09] <Casper> mulvane: the bug is 8.1! :D
[23:22:33] <hackvana> Not sure that's the answer he's looking for :-)
[23:22:39] <mulvane> Casper I actually like 8.1 with classic shell and a few other things. Overall, its smoother than 7.
[23:23:35] <Casper> I fix computers....
[23:23:40] <Casper> ... win8.1 is hell
[23:23:59] <Casper> have you seen the flashing desktop problem?
[23:24:12] <mulvane> I fix computers also..I'm also a VMWare engineer and MS support engineer...
[23:24:56] <Casper> poor you...
[23:25:03] <mulvane> My job kinda forces windows use on me...At home, I'm mostly freebsd for all my servers.
[23:26:05] <Casper> the fun things is when I need to use linux to actually fix windows :D
[23:26:18] <Casper> happened a few times
[23:26:54] <mulvane> Not ever tried to use a WinPE disk loaded with actual windows utilities?
[23:28:12] <mulvane> I hate linux... Use it when I have to for specific things..But overall, I use openbsd, freebsd, OS/2 Warp, and Windows 8.1 and 2K12 now.
[23:28:17] <Casper> sure, but for those issues, that I forgot what it was, there was zero windows utility to fix it
[23:28:30] <Casper> no winME? :D
[23:28:39] <mulvane> Ugh.....
[23:29:19] <Casper> I still need to figure out how to make a proper winpe with a real explorer...
[23:29:41] <Casper> hiren's is ok... but... the tools start to be quite outdatted
[23:29:48] <Casper> and not too easy to hack up
[23:29:55] <Casper> or even add drivers
[23:30:14] <mulvane> Yeah..Anyway...Time to go polish pinewood derby axles... All 16 of them... Ugh..
[23:30:19] <mulvane> The things I do for my kids.
[23:30:46] <Casper> atleast I found out how to add drivers in winpe3 and the image of windows
[23:30:58] <Casper> quite nice to install windows and get network right away