Author Topic: Simple ATTiny-based Continuity Tester / Multimeter  (Read 6085 times)

0 Members and 1 Guest are viewing this topic.

Offline kwxTopic starter

  • Newbie
  • Posts: 4
Simple ATTiny-based Continuity Tester / Multimeter
« on: October 04, 2014, 03:03:01 am »
Hi all.
I work in pyrotechnics, and often times we need to check the continuity of the lines we hookup, and also the detonators to make sure they're working OK. Likewise, if a line is over ~20Ohm (multiple detonators on one line..) - it won't fire.

I'm wanting to make a pocket sized tester (actually, as small as possible) - that tests not only continuity, but also provides simple resistance feedback via an RGB led (IE, green = OK, yellow = high, red = too much). I'd love to avoid having an external on/off switch - just have the circuit work when there is continuity over the terminals.

I'd thought (perhaps stupidly) that using a microcontroller (such as the ATTiny) w/ its PWM and ADC would take care of driving the LED, and also measuring the resistance of the hooked up line.

Obviously, there are many OpAmp based approaches to this problem, as well, but I was curious as to what would be the most simplistic and minimalistic approach to this problem?

Not looking for anyone to solve my problems for me, as I am inexperienced, I'd love to hear thoughts about best practices, so I can not only head off in the right direction, but also learn along the way!

Thanks kindly.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #1 on: October 04, 2014, 05:34:22 am »
Interesting little problem. Here's an idea that I had, but it's got a bad flaw that makes it unworkable. Might be some inspiration for you, though.

When there's a line connected, it pulls the gate of the FET high, and connects the ground of the ATTiny. Then the ATTiny can wake up, measure the voltage at the divider created by the line under test and the 1k resistor, and infer the resistance of the line accordingly. It can then choose which LED to light up accordingly.

When there's no line (or a very high resistance line) connected, the gate of the FET is pulled down by the 1k resistor, the FET switches off, ATTiny is switched off, and zero current flows. Except, now the ADC pin is connected to ground, whereas the ATTiny's ground is at VCC. This is not allowed in the attiny datasheet, and in fact the current will leak out of the ADC pin, keeping the FET on and preventing the device from turning off. EDIT: I just realised that connecting the ADC input with a PFET that disconnects when the device is switch off will probably prevent this.



 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #2 on: October 04, 2014, 06:19:48 am »
Another thought -- it may well be possible to configure the ATTiny to consume so little power that it can sit in standby and still have a battery life that is dominated by the self-discharge of the battery. In that case, a solution consisting of just an attiny, 3 LEDs, and 3 resistors for those LEDs would work and is as minimal as possible.

I made my last message more confusing than necessary by placing the FET so that it broke ground instead of VCC. Sorry about that. Here's the same circuit, but flipped upside down so that it's VCC that's switched, and I've included the other FET that protects the ADC input. This circuit works, I believe.

The line under test and R2 form a voltage divider, the voltage at the central node there is determined by the resistance of the line.
M3 is a P-channel FET, which turns the rest of the circuit on when a line is connected.
M2 is an N-channel FET that connects the ADC to the voltage divider when M3 is on. Without it, current would always be flowing through R2, D1, and R1, and the device would never turn off.
C1 is the capacitor that should generally be on an ADC input.

Ignore R4, I was just using it to measure current. D1, D2 and R1 are just parts I used to simulate an attiny and LEDs, they're not part of the design. (As a side-effect of the way that ICs are manufactured, there are often parasitic diodes running from every pin to VCC, and from ground to every pin. If the voltage on any pin exits the range from VCC to ground, these diodes start conducting, which is bad news.) The values of C1 and R2 are only approximate and you should design them properly. Also ignore the part numbers there for M2 and M3, those parts are probably reasonable choices, but almost any low-gate-threshold voltage FETs will do.

I know you were only asking for hints, but it was an interesting problem, so I got a bit carried away -- thanks  :)! My solution is just one possible approach, there might be a more elegant way of doing it. Using a dual opamp (e.g. AZV832) instead of an attiny would remove the need to program the device, and make the process of calibrating the cutoffs for the different colours a matter of turning trimpots instead of reprogramming. Pros and cons there.


« Last Edit: October 04, 2014, 07:47:52 am by rs20 »
 

Offline kwxTopic starter

  • Newbie
  • Posts: 4
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #3 on: October 04, 2014, 07:55:31 am »
Hey  -
Thanks kindly for taking the time to make a well considered and detailed reply - I really appreciate it.
As a complete newbie (I come from a programming background, electronics still seem to be in the 'black magic' realm..)

I'll throw the circuit into Proteus and see how it goes at emulating the system.
The OpAmp / Pot approach would be interesting too, but I'm hoping to make the unit as compact as possible. I'd planned to make the LED blink when going over X Ohms, which is why I'd thought a microcontroller would keep things simple in this regard..

In regards to the power, I've seen systems where ATTinys can be used to emulate RFID cards, powered just by the induced voltage from the coil .. and I guess if their power saving features are leveraged, it could make a device that could last a long time on button cells..

Thanks again, I appreciate the input, and likewise would be keen to see any other ideas :)
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #4 on: October 04, 2014, 08:34:50 am »
A dual opamp and an attiny (suitable for this task) are both 8-pin components, so they're the same size. If you want things compact, you could do away with the pots and just use accurate resistors from the start. Even with pots, the whole thing could be around 3 square cm, similar to a CR2032. But yes, if you want blinking, the attiny is definitely the way to go :-). Incidentally, pots and the attiny aren't mutually exclusive; the attiny has an analog comparator which you can use instead of the opamps. So many options :-)
 

Offline kwxTopic starter

  • Newbie
  • Posts: 4
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #5 on: October 04, 2014, 08:50:06 am »
Thanks again. As you say, many options, many rabbit holes to explore!
Size is a concern here; I'd like something as small as possible so it can become a simple thing to keep in the pocket.
Curiously enough, I couldn't find the AO6407/8s in Proteus :(

BTW, if this is something you'd be interested in designing completely (bit of tracing, bit of AVR coding) - let me know, if we can find a price point that works mutually, great..

If not, it'll stay in the 'project' status, and I'll have fun chipping away at different design options to see which comes out on top :)
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #6 on: October 04, 2014, 09:23:32 am »
Curiously enough, I couldn't find the AO6407/8s in Proteus :(

Those were literally the first item in the list in LTSpice -- my point is, they're not at all special :-)  Almost any FET will do, as long as it's the right polarity (N vs P) and has quite a low gate threshold voltage of at most 1.5V or so. NTZD3155C is a chip that has both an N and a P FET that'd be suitable. Failing that, pick a random FET with a smallish VDS, check the datasheet, and see if the gate threshold is less than 1.5V.

BTW, if this is something you'd be interested in designing completely (bit of tracing, bit of AVR coding) - let me know, if we can find a price point that works mutually, great..

If not, it'll stay in the 'project' status, and I'll have fun chipping away at different design options to see which comes out on top :)

Thanks for the offer, but I have enough personal projects already :-)  This might all seem like black magic, but if you do a little bit of googling on MOSFETs, you'll pretty soon know what a gate threshold voltage is and be able to figure out how the circuit works!
 

Offline kwxTopic starter

  • Newbie
  • Posts: 4
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #7 on: October 05, 2014, 01:30:09 pm »
Hi again - I appreciate you taking the time to explain, thank you kindly.
Time to get researching - thanks for the leads, schematic and assistance !
 

Offline Joule Thief

  • Regular Contributor
  • *
  • Posts: 249
  • Country: us
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #8 on: October 05, 2014, 01:49:38 pm »
will this device be measuring continuity on a "live" round?

how much voltage / current does it take to launch one of the rounds?
Perturb and observe.
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2587
  • Country: fr
    • kripton2035 schematics repository
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #9 on: October 05, 2014, 01:55:26 pm »
may be an already made continuity tester with an attiny that is open source, you can quickly modify it to suit your needs?

http://kripton2035.free.fr/Continuity%20Meters/continuity-elm-c.html
 

Offline timofonic

  • Frequent Contributor
  • **
  • Posts: 904
  • Country: es
  • Eternal Wannabe Geek
Re: Simple ATTiny-based Continuity Tester / Multimeter
« Reply #10 on: January 10, 2016, 05:29:06 pm »
Necroposting, blablabla...

Actually, I was in a hurry for a DMM. The continuity testing is a SHIT, at least it's laggy as hell...

I found this other circuit...

http://hackaday.com/2014/12/29/trinket-edc-contest-entry-shorty/

I did read some of those devices might act in lachted way in order to be more sensitive to intermitent conditions, by using an astable oscillator.

(Yes, I did read WikiPedia)

http://www.sentex.ca/~mec1995/circ/latching.html
http://www.talkingelectronics.com/projects/ContinuityTester/ContinuityTester.html
http://www.talkingelectronics.com/projects/50%20-%20555%20Circuits/50%20-%20555%20Circuits.html#25
http://www.eeweb.com/blog/circuit_projects/continuity-tester-with-latching-feature
http://www.electroschematics.com/9232/continuity-tester-differentiates-resistance/
http://www.nutsvolts.com/magazine/article/using-the-555-timer-ic-in-special-or-unusual-circuits


And here's a continuity tester tester, to test if they are good and such...
http://www.sentex.ca/~mec1995/circ/latching.html
« Last Edit: January 10, 2016, 09:21:17 pm by timofonic »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf