Re: Dangerous component/part tester Reply #90 – December 16, 2011, 10:29:56 am Nice work to both of you. I've been digging through this code, I'm trying to diagram the testing process. It's really interesting, I want to understand the guts of it. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #91 – December 16, 2011, 01:11:24 pm hey Mick, good etch :D, what firmware did you use (compiled it yourself or used precompiled firmware)?How precise the internal oscillator in this atmega8 is? What changes are required to actually add external crystal oscillator (for stability) and do you guy's think it is needed? Imo the frequency is relevant for LC only and for those an "close enough" value is enough.And one important question for all AVR users - is there some "visual fuse calculator" or something similar? Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #92 – December 16, 2011, 01:27:50 pm [quote author="arhi"]And one important question for all AVR users - is there some "visual fuse calculator" or something similar?[/quote]There are probably more than you want to see ;)Browser based - http://www.engbedded.com/fusecalc/IDE - WinAVR & avr-eclipse have fuse editors built inGUI - Am sure there are windows apps, I think there is a cross platform java app as well, but can't find the name just now...Edit: This is the java app I was thinking of - http://avr8-burn-o-mat.aaabbb.de/avr8_b ... ui_en.html Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #93 – December 16, 2011, 02:25:20 pm Great thanks. I'm not a huge avr user, 100% of mine projects on avr are "take someone elses project and make it do what I want it to do" .. I find atmel's datasheets very very bad :( (app notes are great but datasheets I really hate) Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #94 – December 16, 2011, 03:05:09 pm What I'd really like is to be able to do it "reverse", for e.g. lfuse:w:0x01:m -U hfuse:w:0xd9:m is 1 for low fuse bit and D9 for high fuse bit .. I know for atmega8 this is 1MHz internal clock, 0ms delay etc etc ... but for some "bigger" ones it's not that simple :DAnyhow back to this project ... I assume atmega8 can go faster? 8MHz or even 16 (haven't looked at the datasheet yet)? with greater stability and accuracy of external oscillator ... I assume that would give it higher precision for LC measurement... Do you guy's think it's better to tweak this design or to make new one from scratch? I personally find the precision of the device "as is" more then enough :) (as I have dmm & lcr to test for real values, I'd use this more to see if a "small gray 2x1mm cube" is resistor, inductor or diode :) ) Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #95 – December 16, 2011, 03:13:44 pm Hey Arhi,Obviously anyone will be bored to see 600 pages datasheet. It's not only you. :PI am taking suggesions from previous posts from community and and making the part PNP/NPN less and totally with direct I/O. Hmm, I had to make the 100Ohm one change to 150Ohm. Everything going ok till now. After some hard test in the resistance part(making it the most accurate for ever), I'll post my update in this thread. And about L, C measurement (and also for frequency measurement, UART etc) a external crystal must be used for good timing. I'm considering the 16Mhz one as AVR gives 16MIPS at 16MHz(both mega8 and mega32). BTW I've heard PICs give (x)MIPS at (4x)Mhz (4 times slow). I'm not familiar to PIC. Is this true? Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #96 – December 16, 2011, 03:28:40 pm with pic you have all instructions take same time - 4 clocks so yes it is /4, with mega you have some instructions taking 1 clock, some 2 and iirc some take up to 5 clocks.. the difference in 2 (avr/pic) is not that much wrt mips in mhz (as most pics go 40MHz or more) the main difference is that avr has a lot of registers (way more then pic) so if you make a good use of them you can make your program way more optimized then what you can make with picEDIT: I might be wrong so don't take any of this as "proven truth", I don't have enough experience with avr to give sensible comments about them :D Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #97 – December 16, 2011, 03:54:19 pm [quote author="arhi"]What I'd really like is to be able to do it "reverse", for e.g. lfuse:w:0x01:m -U hfuse:w:0xd9:m is 1 for low fuse bit and D9 for high fuse bit .. I know for atmega8 this is 1MHz internal clock, 0ms delay etc etc ... but for some "bigger" ones it's not that simple :D[/quote]Hi arhi, that online calculator will do that. It refreshes the page when you change any fields, so you can edit the HEX values directly, and the tickboxes should update to match..Regards,Jon Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #98 – December 16, 2011, 04:32:16 pm Making use of tristate output and directly pullup/down from MCU pins made it worse. 1. The Hi-Z output is around 3mOhm pulldown when I measured it by Wheatstone bridgehttp://http://en.wikipedia.org/wiki/Wheatstone_bridge2. The output 1 is max 40mA but when I connected it to GND with 200Ohm resistor and a mA meter, I found 22.2mA consumption and the output pin was dropping 558mV from VCC. And the drop decreases by increase of pulldown resistance. These caused even worse measurement. Looks like I have to try the MOSFET implementation as suggested by RJSC. Other way is measuring actual achieved pullup voltage through another ADC channel. Tonight's work was total waste. I considered using direct pullups from MCU pins not for cutting down the costs of PNP/NPN, but for better measurement as I thought MCU outputs will be exact as VCC, or VCC<minus>constant. But it's not. Cost doesn't matter much if we are getting maximum accuracy. Will try to use some MOSFETs tomorrow night. If success then good, else many few ADC pins will be used for measuring actual pullup voltage acheived. By the way, what did you guys thought about the inductor headache? High inductance no issue, any idea for low inductance?A piece of information:I have chosen mega32 in place of mega8 because of large program memory and more I/O. That much I/O may not be needed at all, but the large program memory is good thing as I am sure all features will not come in the atmega8's 8K memory. I have chosen PORTD as the pullup/pulldown controller port and at PD0 and PD1 the low valued resistances exist because those two pins are Rx and Tx. Hence we can do UART operations too by the same test probe. UART operations include projecting predefined text (@9600) to the device connected to the probe. This will help us test USB-TTL modules, etc and also includes UART receiving as we'll display incoming text to the LCD(scrolling effect) if testing any circuit's UART output. PORTC is still unused. Will use PC0 and PC1 (SDA and SCL) for connecting to some I2C device. Probably an DAC for using as signal/function generator. Remaining pins of portC will be used for, PC2--> IR(TSOP1738) decoding and showing values of simple RC5/other protocol. And much more. Last Edit: December 16, 2011, 04:33:24 pm by arupbsk
Re: Dangerous component/part tester Reply #99 – December 16, 2011, 04:32:43 pm Oh yes, congrats MickM. You did it. :) Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #100 – December 16, 2011, 04:44:43 pm Hi Arup,Have you considered the mega324 instead of the mega32? At least here in the UK, the pricing for the newer chips is significantly lower..Regards,Jon Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #101 – December 16, 2011, 04:58:33 pm Here in India, mega8,16,32,64,128,328,168,8535,8515 and tiny2313 are only AVRs available in online stores. :sigh Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #102 – December 16, 2011, 05:38:43 pm I just ran the MOSFET test in breadboard and guess what, it turned out to be huge success. I had few BIG n channel MOSFETs in my drawer. STB55NF06 http://www.st.com/internet/com/TECHNICA ... 002311.pdfWith 100 Ohm resistor from drain to GND at 5V VCC showed 1.4mV drop (Vds). Rds was actually calculated as 0.028 Ohms while it is 0.018max as per datasheet. Well, that 1.4mV drop is quite acceptable in terms of accuracy whereas MCU pin was dropping 558mV and NPN was dropping 76mV at same condition.Now I've to search for smaller size MOSFETs with RDS(ON) in miliOhms. That's tough enough and I'm not sure if such device exists or not in small packages. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #103 – December 16, 2011, 05:54:56 pm [quote author="arupbsk"]Here in India, mega8,16,32,64,128,328,168,8535,8515 and tiny2313 are only AVRs available in online stores. :sigh[/quote]That's a shame. Still, should be pretty easy to port between the two, as far as I know it was just a few register locations that changed between the the 32 and 324. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Dangerous component/part tester Reply #104 – December 16, 2011, 06:01:50 pm Yeah. I just looked at the summary of m324 and it looks like m32's ptp replacement with some additional features like two UART, 20Mhz, etc. There should be no problem if the same firmware is burnt. If problems then just recompiling for m324 will be fine as there are nothing that m32 has and m324 doesn't have. Last Edit: January 01, 1970, 01:00:00 am by Guest