Reduce number of batteries from a school practical circuit

MisterBill2

Joined Jan 23, 2018
28,552
I TOTALLY understood that this was strictly a battery powered tester! What I had not gotten was the idea of not adding any more parts, such as push buttons.
 

Thread Starter

GaryClifford

Joined Sep 19, 2024
13
I TOTALLY understood that this was strictly a battery powered tester! What I had not gotten was the idea of not adding any more parts, such as push buttons.
Hello Mister Bill2,
I like your idea of adding a three-position switch. Our students seem to be able to break sturdy items of equipment with ease so I'm hoping I can find a solution to reduce the number of sizes of batteries with internal circuit changes before considering adding the switch.
 

Alec_t

Joined Sep 17, 2013
15,166
How about this ? :-
1777413045586.png
If all plug wires are correct, both LEDs light. If any wires are swapped, both LEDs are off.
The circuit can be powered by 2 AA cells and will work down to about 2.8V.
With the resistor values shown the current per LED is about 2.4mA.
If plug and socket are disconnected, current draw is zero.
 
Last edited:

Thread Starter

GaryClifford

Joined Sep 19, 2024
13
How about this ? :-
View attachment 366457
If all plug wires are correct, both LEDs light. If any wires are swapped, both LEDs are off.
The circuit can be powered by 2 AA cells and will work down to about 2.8V.
With the resistor values shown the current per LED is about 2.4mA.
If plug and socket are disconnected, current draw is zero.
Hello AlexT
Thank you for the circuit. I would like to have an individual LED for each of the three cables. I think your circuit only has the two LEDs so would not meet my need.
 

panic mode

Joined Oct 10, 2011
5,450
don't paint yourself into a corner. use MCU to test every possible outcome and display result in plan text.
do not just check for continuity where expected, check for it where it is not expected too (gross wires or shorts).
logic is super simple, use 6 GPIOs. make them all but one inputs. toggle output and verify that only corresponding input pin sees it. then repeat with next state (make another single GPIO an output, toggle it and confirm that only the corresponding input is seeing it). repeat untill each of 6 GPIO was an output... display result. done.

1777482745076.png
 
Last edited:

ci139

Joined Jul 11, 2016
2,037
i dont get the setup/idea behind this ::

  • IF the student wires up anything - then what you test by inserting the plug into a test socket
  • IF you have an interface electrical screw terminal panel . . . say with labels L1 N1 PE/GND - but you mess up the wiring at test circuit not the wires going to that terminal panel . . .

. . . so what do we actually have to verify here ?
 

JohnSan

Joined Sep 15, 2018
141
An alternative idea.....
With this 'simple' circuit. (One PP3 battery).


If the plug is wired correctly, all three leds light.

If wires are crossed, at least one led will not light.

If any one connection is not made at all, no led will light.

if a short circuit is present, a different combination of leds, or possibly none at all will light, depending on the short.

If there is a crossed connection and you inadvertantly manage to connect the cable to the terminals with the same crossed connection, all the leds will light. But that issue was always there, anyways.

You may have to experiment with resistor values, if different coloured led's are used.


Circuit 1.JPG
 
Last edited:

Irving

Joined Jan 30, 2016
5,195
@panic mode 'borrowed' my idea for a MCU based solution.. here's what I drew yesterday but didn't get a chance to post.

1777494709179.png
I've gone for an ATtiny84 because they are cheap and easy to program and the RP4020 is overkill - that's like using a Ferrari to mow the lawn. The idea is the MCU powers up and builds the truth table of plug to socket connections. if nothing found it goes into sleep mode until one of the inputs changes state or every, say, 5 seconds. If a Plug to Socket connection is found and the truth table is correct (1 of 81? possible matrices) the 3 LEDs light up green. If incorrect the LEDs are lit green or red as appropriate. There is scope for some fun 'light shows' with the LEDs before settling on the final result. Once the Plug is removed the MCU goes into sleep mode consuming 0.1ua typically. Normal run current is around 80uA using the slowest internal clock plus the LED currents (limited to 5mA approx per LED).
 

Thread Starter

GaryClifford

Joined Sep 19, 2024
13
@panic mode 'borrowed' my idea for a MCU based solution.. here's what I drew yesterday but didn't get a chance to post.

View attachment 366500
I've gone for an ATtiny84 because they are cheap and easy to program and the RP4020 is overkill - that's like using a Ferrari to mow the lawn. The idea is the MCU powers up and builds the truth table of plug to socket connections. if nothing found it goes into sleep mode until one of the inputs changes state or every, say, 5 seconds. If a Plug to Socket connection is found and the truth table is correct (1 of 81? possible matrices) the 3 LEDs light up green. If incorrect the LEDs are lit green or red as appropriate. There is scope for some fun 'light shows' with the LEDs before settling on the final result. Once the Plug is removed the MCU goes into sleep mode consuming 0.1ua typically. Normal run current is around 80uA using the slowest internal clock plus the LED currents (limited to 5mA approx per LED).
Hello Irving,
Many thanks for the circuit. I have not done any MCU programming before but think it is about time I tried it so I will go with your design. I would be very grateful if you could give me a list of what I need to be able to program the ATtiny85. I can see other opportunities to use an MCU for other projects so should be able to justify the cost as an investment.
 

Irving

Joined Jan 30, 2016
5,195
Hello Irving,
Many thanks for the circuit. I have not done any MCU programming before but think it is about time I tried it so I will go with your design. I would be very grateful if you could give me a list of what I need to be able to program the ATtiny85. I can see other opportunities to use an MCU for other projects so should be able to justify the cost as an investment.
No problem. Will PM you a shopping list based on my setup (and the one my 12y old granddaughter uses!).
 

Alec_t

Joined Sep 17, 2013
15,166
I would like to have an individual LED for each of the three cables.
Here you go then, although I realise you have chosen the digital route :-
1777808410962.png
This should work on 3 AA (or 3 AAA) cells down to about 4V with the resistor values shown. It detects missing connections, crossed wires, and shorts between wires.
D1 and D2 help to reduce brightness of LEDs which are nominally 'off' if the plug is mis-wired. A momentary push-switch prevents battery drain if the plug is left connected to the socket at the end of class!
 
Last edited:
Thread starter Similar threads Forum Replies Date
sirch2 General Electronics Chat 16
Top