Two PICAXE Outputs to one Input?

Adamey

Senior Member
I have two PICAXE chips in a project. I have a logic level (5V) MOSFET controlling a small load, and want to be able to turn this MOSFET on with an output from either of my PICAXE chips.

Can I connect both PICAXE outputs together to the MOSFET input? Will this cause any problems if one output is high but the other is low? Or could I do this if I put a resistor in series from each PICAXE output to the MOSFET?

I was originally going to use an OR gate, but I don't want to add another chip to my project just for a single OR gate. I know two diodes can make an OR gate, but not sure if the .5V drop would affect my MOSFET turn on.
 

graynomad

Senior Member
Can I connect both PICAXE outputs together to the MOSFET input? Will this cause any problems if one output is high but the other is low? Or could I do this if I put a resistor in series from each PICAXE output to the MOSFET?
In theory you could connect the two but you would have to sync the OPs such that they were never both OPs as the same time. Possible but not all that practical. If you use resistors you'll just have a voltage divider, it's effectively a DAC, both high=5v, one high one low= 2v5, both low=0v.

but I don't want to add another chip to my project just for a single OR gate
You can get 1-gate logic so you only have to add a single SOT23 package.

I know two diodes can make an OR gate, but not sure if the .5V drop would affect my MOSFET turn on.
Your gate will still get 4v5 or thereabouts, I would think that's enough although FETs aren't my strong point. Certainly it is for a transistor.
 

Dippy

Moderator
Can you post the proposed circuit, as I can't see what is wrong with using diodes, so I'm afeared that I have missed something....:confused:

I assume the MOSFET "input" is the MOSFET gate?

The perfromance may vary with type os MOSFET and diode of course.

Or, depending on your PICAXE choice, you may be able to configure the individual PICAXE output pin as an input when not in use.
Thus you can tristate the PICAXE pin to high impedance, thus no components required though I would use resistors as a safety thing.
 
Last edited:

BeanieBots

Moderator
I have two PICAXE chips in a project. I have a logic level (5V) MOSFET controlling a small load, and want to be able to turn this MOSFET on with an output from either of my PICAXE chips.

Can I connect both PICAXE outputs together to the MOSFET input? Will this cause any problems if one output is high but the other is low? Or could I do this if I put a resistor in series from each PICAXE output to the MOSFET?
No, you cannot connect them together. It will destroy the PICAXE.
You cannot use two resistors either, it will halve the voltage (when one is high and the other is low) which will not drive the FET properly.

I was originally going to use an OR gate, but I don't want to add another chip to my project just for a single OR gate. I know two diodes can make an OR gate, but not sure if the .5V drop would affect my MOSFET turn on.
The OR gate would be the "best" method.
You could use a DIODE OR gate but as you are aware, there will be small voltage drop. It is unlikely to be as large as 0.5v because the pull-down resistor does not need to be very low and hence the diode current current will also be low. You could resort to using schottky diodes and have less then 0.1v volt-drop.

Will the volt-drop effect the switching of your FET?
Dunno, you will need to refer to the FET datasheet and specifics of your application to answer that.
 

Adamey

Senior Member
Thanks, I used the MOSFET OR example above. I had a spare MOSFET left in my circuit anyway, so it worked out great.
 

Dippy

Moderator
Excellent news.
I reckon the 2 diode to one gate would have worked too. And I know the tristating approach can work as I've used it myself.

I do hope you've understood the principles as we'll be asking you to solve our circuit design problems soon...;)

Obviously, for future designs, you'll know why this method wouldn't be very good for fast PWMing...
 
Top