Dangerous component/part tester

Hardware incubation. See also our in development projects wiki.

Re: Dangerous component/part tester

Postby RJSC » Wed Dec 14, 2011 5:42 pm

arupbsk wrote:I saw some unexpected operations such as UART operations. I am unsure why the author is using UART. Also the project was done through AVRstudio.


Don't worry about it! It outputs the same information of the LCD at 2400 bps 8N1.

I found it on a post on a German forum from the author: http://www.mikrocontroller.net/topic/131804#1658285
I have a new version:
Now, all languages should work (before, all lamguages except German
didn't work properly).
And I added a software UART that sends all the test results. It sends
almost the same data as shown on the LCD, except the characters which
are not implemented in the standard ASCII character set (for example the
"Omega" sign).
The UART output is PC3 (Pin 26 of the ATMega8).
The properties of the UART:
2400 baud
8 data bits
1 stop bit
no parity, no handshake

The internal timing error of the UART is almost zero.
So, the RC oscillator of the ATMega8 may have up to +/-3% tolerance to
get a stable connection. And according to the datasheet, the oscillator
has a 3% tolerance at 5V , 25°C and 1.0MHz.
So, it should work in most cases.

And there are two hex files:
In one("TransistorTestNew_UART_not_inverted.hex), the UART sends in
"normal" mode, to connect it to a TTL level RS232 receiver or to a level
shifter like MAX232.
In the other file ("TransistorTestNew.hex"), the UART sends in inverted
mode, for direcly connecting it to the RxD pin of a PC's RS232 port or a
USB=>serial converter with a "normal" PC-level input/output.
This makes the level shifter obsolete.
This solution is a bit "dirty" because a logical one is just 0V, and
according the RS232 standard it should be between -3V and -15V.
But in most cases, it works without problems.


Latest precompiled firmware version at: http://frickelpower.bplaced.net/ctest/
RJSC
Newbie
Newbie
 
Posts: 19
Joined: Sun Jul 04, 2010 9:11 am

Re: Dangerous component/part tester

Postby ian » Thu Dec 15, 2011 1:58 am

When I printed out the schematic, I had to scale it to 0.85.
When I made the PCB I forgot to change it back to 1.0


Argh!
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Dangerous component/part tester

Postby ian » Thu Dec 15, 2011 3:06 am

So far Arup has done R and C testing. Does that leave L and transistor detection/hfe measurement as the two remaining features?

I have not looked at code for this yet, but maybe it will be next-weeks series of videos. I'd like to breadboard a design myself before committing to a PCB. I have a protostack AVR dev board so I could follow along with you Arup. Could you please share a code snippet or general theory behind the features you implemented so far?
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Dangerous component/part tester

Postby arupbsk » Thu Dec 15, 2011 4:53 am

Hi Ian, glad to see you interested in prototyping my design. :)
I haven't drawn schematics in eagle and also the software is not well organized. But still you can get it to work.
Below is my paperworks and an zip attachment contains current code.

SCAN000.jpg
SCAN000 001.jpg
SCAN000 002.jpg
SCAN000 003.jpg
SCAN000 004.jpg
SCAN000 005.jpg
Still learning
-Arup
User avatar
arupbsk
Sr. Member
Sr. Member
 
Posts: 385
Joined: Fri Aug 12, 2011 6:12 am
Location: Gopalganj, India

Re: Dangerous component/part tester

Postby arupbsk » Thu Dec 15, 2011 4:54 am

Cannot add another attachment, 6 is the maximum.

So here's the zip file.
MyLCD.zip
(58.02 KiB) Downloaded 515 times
Still learning
-Arup
User avatar
arupbsk
Sr. Member
Sr. Member
 
Posts: 385
Joined: Fri Aug 12, 2011 6:12 am
Location: Gopalganj, India

Re: Dangerous component/part tester

Postby arupbsk » Thu Dec 15, 2011 6:35 am

The planning for measuring inductance is failed. RL circuit's can't be used as for low valued inductors the current hardware will be unable to detect any inductance. For inductor, a inductance to frequency converter should be used.
++ Good accuracy
-- Extra hardware

I've seen that the resistor measurements are having some 2% errors. The reason is revealed also. The transistors drop few milivolts, and the voltage drop depends on the DUT resistor's value. I get absolute error-free reading if I short the selected range's transistor, or calculate resistance with the actual pullup VCC that is in the R1-R2 network.

Solution: Use of the free ADC pins. In the selected range, the actual pullup voltage will be read by another ADC and then resistance will be calculated 100% error free.
Still learning
-Arup
User avatar
arupbsk
Sr. Member
Sr. Member
 
Posts: 385
Joined: Fri Aug 12, 2011 6:12 am
Location: Gopalganj, India

Re: Dangerous component/part tester

Postby arhi » Thu Dec 15, 2011 7:01 am

You can check out how superprobe measures inductance
User avatar
arhi
Hero Member
Hero Member
 
Posts: 2160
Joined: Thu Jun 24, 2010 11:41 am
Location: Belgrade, Serbia

Re: Dangerous component/part tester

Postby ian » Thu Dec 15, 2011 7:06 am

Thanks Arup, this is great! I'm going to play along at home :)

I'm curious - why did you use PNP and NPNs instead of sourcing/sinking straight from the uC pins?

I'm also going to review the superprobe schematic to see how many R sources they used.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Dangerous component/part tester

Postby ian » Thu Dec 15, 2011 7:08 am

Here is the superprobe front-end

Various testing modes use the resistors in different ways. Unused resistors for any particular mode are removed from the circuit by having their pic pins floated. R5, for instance, is used for the logic pulser function. R4 is used to charge a capacitor to measure its value.
Attachments
sp.png
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Dangerous component/part tester

Postby ian » Thu Dec 15, 2011 7:12 am

When an inductor is connected from the tip to the ground lead, and button #1 is pushed, its value is displayed. Values from 0.1 to 999.9 millihenries are displayed. Note: this function assumes that the DC resistance is not more than a few ohms. Also, if the unit gets 'stuck' in this mode, jumper the tip to ground to free it.


Now to the ASM :)
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Dangerous component/part tester

Postby RJSC » Thu Dec 15, 2011 7:22 am

arupbsk wrote:I've seen that the resistor measurements are having some 2% errors. The reason is revealed also. The transistors drop few milivolts, and the voltage drop depends on the DUT resistor's value. I get absolute error-free reading if I short the selected range's transistor, or calculate resistance with the actual pullup VCC that is in the R1-R2 network.


Use mosfets instead of bipolar transistors. Once switched on they behave like a resistor with a few milli ohms (the RDSon parameter from the datasheet).
RJSC
Newbie
Newbie
 
Posts: 19
Joined: Sun Jul 04, 2010 9:11 am

Re: Dangerous component/part tester

Postby arupbsk » Thu Dec 15, 2011 7:25 am

Yeah Arhi, but same problem in superprobe too. Superprobe can measure minimum 100uH and that's with resolution of 100uH.
Yes Ian, I've used PNP/NPN for pullup/pulldown for the following reason,
To achieve tri state (the Hi-Z we need) output, the only way in AVR is to make the pin as input and then I can make it Hi-Z by disabling pullup resistor(the internal one). So tri-state is not an issue which I thought earlier. But the problem will come in measurement of low resistances.
Example the 100Ohm pullup case(for low resistances). If the DUT is 1Ohm, then V=5,R=101 making I~=50mA. The microcontroller can give maximum 40mA. Page 287 http://www.atmel.com/dyn/resources/prod ... oc2503.pdf
For maximum 40mA operation the R must not be less than 125Ohms. Also the total AVR can get max 200mA from power supply, and each port can give maximum xx(i dont remember) mA.
I'm not in mood of frying a chip by much current. I fried one in the past. :P
Hence, to actually lower down the current consumption of the I/O pins, I've selected PNP/NPN.
Still learning
-Arup
User avatar
arupbsk
Sr. Member
Sr. Member
 
Posts: 385
Joined: Fri Aug 12, 2011 6:12 am
Location: Gopalganj, India

Re: Dangerous component/part tester

Postby ian » Thu Dec 15, 2011 7:31 am

I'm no the best in ASM. Here's my 2 minute take, it will probably be embarrassing.

Code: Select all
; measure inductor from tip to gound lead

induct   bsf   RP0
   bcf   R100      ;enable 470 ohm resistor
   bcf   RP0
   bcf   R100      ;pull up resitor
   bsf   HOLD      ;default hold condition


it says 470, bus uses the R100 macro which is 100ohms. Pin set to output and ground

Code: Select all
:c2   call   segoff
   movlw   80
   call   delay
   clrf   acc      ;clear accum
   clrf   acc+1
   clrf   acc+2
   clrf   acc+3
   bsf   R100      ;start voltage

32bit counter cleared and 100ohm pin set to output/high
Code: Select all
:c7   nop
   btfss   R20      ;check direct (a/d) input
   goto   :hit
   incf   acc
   incfsz   acc
   goto   :c7
   incfsz   acc+1
   goto   :c7
   incfsz   acc+2
   goto   :c7
   incfsz   acc+3
   goto   :c7

Tests pin with 20ohm R. If it is high increment the counter. If it is low (bit test flag set skip?) the goto hit

Code: Select all
:hit   bcf   R100
   call   b2bcd
   movlw   3
   call   xform      
   bsf   digits+2,7


Turn off 100R pin.

b2bcd is:
; Convert 32-bit binary number at <acc> into a bcd number
; at <bcd>. Uses Mike Keitz's procedure for handling bcd
; adjust; Modified Microchip AN526 for 32-bits.

xform is just another display thing

I'm obviously missing something key - that seems to just count till the pin goes low?
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Dangerous component/part tester

Postby arupbsk » Thu Dec 15, 2011 7:32 am

@RJSC,
MOSFETs are great. But think of the price. At singles BC548/BC558 are priced at 1Re each (~2 US cents). There are some N channel SOT 23-5 MOSFETs in around the price (within 5cents) and P channels (~15 cents).
If we look at through hole MOSFET, market is worse.
Otherwise MOSFET is a great replacement to the BJT useed there.
Still learning
-Arup
User avatar
arupbsk
Sr. Member
Sr. Member
 
Posts: 385
Joined: Fri Aug 12, 2011 6:12 am
Location: Gopalganj, India

Re: Dangerous component/part tester

Postby RJSC » Thu Dec 15, 2011 7:39 am

arupbsk wrote:@RJSC,
MOSFETs are great. But think of the price. At singles BC548/BC558 are priced at 1Re each (~2 US cents). There are some N channel SOT 23-5 MOSFETs in around the price (within 5cents) and P channels (~15 cents).
If we look at through hole MOSFET, market is worse.
Otherwise MOSFET is a great replacement to the BJT useed there.


If it works, 1USD extra in parts is not bad, if we're not trying to make big profits, it just adds 1 USD to the final price.
RJSC
Newbie
Newbie
 
Posts: 19
Joined: Sun Jul 04, 2010 9:11 am

PreviousNext

Return to Project development, ideas, and suggestions