GPIO Low Not the Same as Ground?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO Low Not the Same as Ground?

887 Views
burgeh
Contributor IV

Greetings,

I am using the MK22FN256LVH12 micro on a custom pcb board. With KDS v3.2 and Processor Expert.

I am trying to use two GPIO pins to control a 12V relay through controlling a BJT. One of my GPIO is the logic to turn the gate on and off and the other GPIO acts as the ground for this circuit. A general circuit diagram is shown below. However my circuit will not work if I use the GPIO as the ground. It does work when I tie it to another ground via on the board. I am not quite sure why using my GPIO as the ground is not working could someone provide some insight on this? I measured the voltage between the GPIO I set low and the ground on my board and there is no difference. I have set the ground GPIO to pulldown and having it set to 0. The difference between the two is 3.3V (which is what I expect), and when it is connected to the BJT the difference is about .5V which is enough to allow the current to flow and the relay switch to throw. The current is very low however, only 30mA which is probably why it is not throwing the switch, but why is this?

pastedImage_1.png4

Thanks!

0 Kudos
1 Reply

789 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Christopher Burg,

    From your application, actually, just one IO is enough to control the relay, why you use two to control it?

   I think you also can try to add an external pull up in the Vin, the IO pin which used to control the relay, then control it again.

   Your problem should caused by the driver ability.


Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos