detecting 12V on a 18M2+ digital input

Jack Hale

New Member
I need to detect a 12V pulse on a 18M2.
I used a voltage divider 10k/4k7 to ground to bring the pulse down below the 5V supply voltage, but connecting to the input (B.2 declared as input) drags the centre down to ground.
Can anybody tell me the problem, or suggest a better way?
 

Technoman

Senior Member
You should normally get around 3.8V. If B.2 is effectively an input, I would suggest to check your wiring.
 

Buzby

Senior Member
First, check wiring,.
Second, check coding.

I've used the 10K/4K7 divider many times, with never any issue.
 

Ed Straker

Active member
Yes, check your color bands. 4k7 should be Yellow-Violet-red. Make sure you not using a 47k (yellow-violet-orange}
Color printing these days are not very accurate especially on the blue colored resistors. When ever I'm in doubt I always double check it with a multimeter.
 

Technoman

Senior Member
An 47K resistor would probably have lead to blown the input (>5V). An another hypothesis : a 4R7 resistor, the third band being gold and the forth red (2%) which would be consistent with a near zero volt value.
 
Last edited:

Jack Hale

New Member
Thanks for all your replies.
The resistors are definitely right. I get 3.8V when I disconnect from the PICaxe pin.
Could I have overloaded the input and damaged it? I expected the 10k resistor to limit the current effectively and the 4k7 to form an effective pull-down. Does that sound right?
 

Technoman

Senior Member
An input has an over 500K impedance, so much higher than the divider.
To protect the input you can add 2 diodes (and eventually and RC filter) :
25682

I see two options :
- your code is involved ; post it to receive some help
- B.2 is damaged, try an other input
 

hippy

Technical Support
Staff member
The resistors are definitely right. I get 3.8V when I disconnect from the PICaxe pin.
Could I have overloaded the input and damaged it? I expected the 10k resistor to limit the current effectively and the 4k7 to form an effective pull-down.
It seems the divider is right and10K should limit 12V to about 1.2mA which I would not have expected to damage the PICAXE pin even though it is over voltage.

That it's pulling the centre of the divider down to 0V is what seems odd to me. That suggests a hard short to 0V within the chip which seems an unlikely failure mode to me if it has blown itself up. If you can download into the PICAXE I would presume it hadn't.

That leaves it being an output low as a possibility.

Perhaps a coding error or your hardware maybe doesn't connect what you believe is the B.2 connection directly to the PICAXE but to a Darlington transistor or something ?
 
Top