Is it OK

TEZARM

Senior Member
Hope this is not to stupid a question but...
Is it ok to have a Input Pin triggered negatively or positively, obviously having the pull up and pull down resitors on the input aswell. I am guessing the answer is yes as you can change it in the software. But I want to send A Positive 12v Trigger to the Input of 18A
without using a transistor to switch it and just double checking to make sure there will not be any problems before I stuff up pcb design. Please don't say, that is a stupid question. Anyway if that is ok then I have a question but I will make it a seperate post as this will be to long and boring to read.
 

BeanieBots

Moderator
No problem as long you invert the logic in your code as well. Just make shure that you a potential divider and don't let the PICAXE get the full 12v.
 

TEZARM

Senior Member
Thanks BeanieBots. So because it's 12v then just chuck a 10k resistor in series with (+) and Picaxe and The code will need to be e.g. If Pin1=0 then Off
If Pin1=1 then On

Correct.
Actually would you be putting a diode in that Input wire aswell?
 

ylp88

Senior Member
You will need 2 resistors for the potential divider - a single resistor will not suffice as this will will allow the full 12V to be applied to the input pin (acting much alike the 4.7k pullup resistor used for the reset pin!).

Normally low:<code><pre><font size=2>
12VTRIG --- SW --- 10k ---+--- 5.6k --- GND
|
PICAXE Input </font></pre></code>
Normally high:<code><pre><font size=2>
12VTRIG --- 10k ---+--- 5.6k --- SW --- GND
|
PICAXE Input </font></pre></code>
The values here should give a 4.3V input to the pins with a 12V trigger (if my calculations are correct...)

ylp88

Edited by - ylp88 on 10/19/2005 1:21:17 PM
 

ylp88

Senior Member
One diode is insufficient - they drop around 0.6V each, clearly too high for PICAXE input. A series resistor acts as a current limiting device and does not attenuate the trigger pulses.

If you want to use diodes, you need LOTS in series! Possible but probably not ideal...

ylp88
 

Michael 2727

Senior Member
You may like to include a a zener diode
between input and Gnd just incase, try 4.7V.
It will clamp any higher voltages from getting into the PICAXE input.
 

BeanieBots

Moderator
You could do it with a diode and a resistor but the diode should be between input and Vcc to clamp the &quot;excess&quot; to the power rail. Some inputs already have a clamp diode fitted but it is not good practice to rely on them. (I think it is input 3 on the 08 that does NOT have one.)
 
Top