Author Topic: circuit won't stay off  (Read 2379 times)

0 Members and 1 Guest are viewing this topic.

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17819
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
circuit won't stay off
« on: April 13, 2015, 09:16:47 pm »
I have made the attached circuit, it is to drive a motor using a button you press the button on the motor goes one way it will hit a stop and the current increase. The microcontroller will detect the current consumption and assume the end of travel is reached and stop the motor. When the button is pressed again it will drive the motor the other way and so forth. Now this is where it gets confusing. This is for a vehicle and the idea is that when the ignition is switched off the circuit will make sure the motor is at the correct end and then shut itself down or as I put it circuit commits suicide. I put it this way because if you look at Q1 and Q2 you will see that they are in series with the ground of the entire circuit. R 12 should have gone to the Chasse ground that was my mistake and I have done that in the circuit. So when ignition voltage arrives Q2 turns on and therefore powers the microcontroller, a line in the program will turn on pin 3 so that it enables Q1. In this way Q2 is switched off by loss of power the circuit will continue to work so that the motor can be run to the correct end and then the enabler outputs on the microcontroller or turn off and thus kill power to the circuit. Pin to also monitors the gate of Q2 to check for a presence of ignition. Now the problem I am having is that without the ignition powered the circuit still works. But I do have one and a half volts drop across the MOSFETs that switch the microcontroller on so I am rather baffled. The gates of Q2 is at about 1 V and the gate of Q1 is at about 1.4 volts yet there is not supposed to be any power.

The only thing I can think of is that there is leakage through the microcontroller which is coming out of the pins and partially turning on the gates of the MOSFETs. I think the solution may be to use a P channel MOSFET to switch the voltage regulator so that there is no leakage.

Any other suggestions?
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2086
Re: circuit won't stay off
« Reply #1 on: April 13, 2015, 09:27:13 pm »
Because when you go for the turn-off, the net labelled as Gnd will rise in voltage relative to chassis  - since this is the reference for gate signal, the fet is being turned on. Where do you expect the current for the uC to go? It's got to be returned via Gnd, and it's probably more then just "leakage".
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17819
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: circuit won't stay off
« Reply #2 on: April 13, 2015, 09:32:49 pm »
well it also wont stay off from the start with no ignition supply
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2086
Re: circuit won't stay off
« Reply #3 on: April 13, 2015, 09:38:43 pm »
What voltage do you think then Gnd net should assume when then unit is in its off-state?
 

Offline Pillager

  • Supporter
  • ****
  • Posts: 65
  • Country: at
Re: circuit won't stay off
« Reply #4 on: April 13, 2015, 11:09:06 pm »
If I'm reading the schematic correctly, you are using Q1 and Q2 to connect your GND to the Chassis-GND.

Is that your only connection between the two? Because if R12 is connected to the chassis, and the ENABLE-Pin is LOW (i.e. GND), then the 1.4V is the difference between GND and Chassis-GND.

Meaning, all your LOW-Signals are 1.4V, relative to the chassis.

Does that make any kind of sense? I sure hope so, I'm a bit tired, sorry :-)
Greets

Tom
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: circuit won't stay off
« Reply #5 on: April 13, 2015, 11:46:38 pm »
Your "ignition" signal is a problem.

When it's high relative to chassis ground, Q1 is on and the system is powered.  When it's low relative to chassis ground, Q1 tries to turn off, this raises Gnd relative to chassis, and your MCU will "switch" it's ground reference from Gnd to ignition on PB0, since ignition is below Gnd.  This will raise ignition if the impedance is high and turn on Q1, or it will simply power up the MCU if the impedance is low.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf