Go Down

Topic: Arduino Stops working when switching mosfet under load (Read 1 time) previous topic - next topic

AaronSilas

Hey Ive got a strange problem. Ive made a homebrew Motor controller that basically consists of a mosfet that switches a relais these both power the motor. When I turn it on without anything attached to it it works just fine and theres voltage at the output but if i connect a load to the circuit output, the arduino just stops switching. There isnt any voltage on the pin and it doesnt start working again until I reconnect the power supply. Im using an Arduino Nano heres my code. Help is greatly appreciated.

void setup() {
 pinMode(12,OUTPUT);    //individual pins of the 2channel motorcontroller
  pinMode(11,OUTPUT);
   pinMode(8,OUTPUT);
    pinMode(9,OUTPUT);
    digitalWrite(12,HIGH);

}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(12,HIGH);
delay(2000);
digitalWrite(12,LOW);

delay(2000);

}

bigred1212



I think if you supplied at least a rude schematic and some specifications (which MOSFET? resistor values? etc.) you may be less likely to be insulted by a crusty old-timer and more likely to get a useful response.
 

AaronSilas

Ok Im using a IRL234N with a pulldown resistor. The diagramm shows half a channel there is just 2 of those things for each channel and four for the whole controller.

larryd



Add a kickback diode across the relay coil similar to K1 in attached cct. see D5.
See R13 and R12 connections to the transistor's gate.






No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

AaronSilas

Thanks for the help.
Ive soldered a LED between the drain of the mossfet and the 9V side of the spool but ive still got the same issues.

larryd

You need a 'diode' (not a LED) across the inductive load.

A 1N4001 thru 1N4007 will work.

Show us a 'good' image of your wiring.

Posting images:
http://forum.arduino.cc/index.php?topic=519037.0

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

AaronSilas

#6
Dec 11, 2018, 06:46 pm Last Edit: Dec 11, 2018, 06:59 pm by AaronSilas Reason: Didnt upload the picture
Im sorry I meant Diode. Ok but brace yourself it aint pretty. This is just a prototype

larryd

You are correct, not pretty.



Okay, it's up to you to confirm the wiring as the image is unless.


BTW, your drawing shown in my post #3 is not correct.
Compare it to my drawing for K1.




No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

AaronSilas

Yes I know. But its not the overall concept because Ive tried it before and have built a couple of projects with this circuit. I think maybe because of the relais they need a higher voltage to switch than usual.

larryd

You have not given any details on the relay.

Is the 9v sagging?

How is the controller powered?

Are GNDs connected?

Your labeling of the output is confusing.

We need to see a 'good' and exact circuit schematic of your project.



No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

AaronSilas

The power supply is fine its powered by a Lab bench power supply.
The arduino is powered by an L7806 voltage regulator.
Everything has a common ground.
I know the concept works because Ive tried it before. I think just need a way how to decouple the transistor from the Relais in a way where it isnt affected by the induction that occurs when it is under load. Is that even possible?

larryd

"The arduino is powered by an L7806 voltage regulator."
6v is not appropriate for the Arduino.

"I know the concept works because Ive tried it before."
Well, this implies your current circuit is not the same as the circuit you tested.

Others similar circuits work well, yours does not.
Your current circuit must be at fault if your previous circuit worked well.

Make sure your GNDs are in star configuration.

"We need to see a 'good' and exact circuit schematic of your project."





No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

TomGeorge

#12
Dec 12, 2018, 12:03 pm Last Edit: Dec 12, 2018, 12:05 pm by TomGeorge
Hi,
You all should be shot;
Look at the diagram;

How is that circuit supposed to work?
With no load the relay will work.
Add a load and the load current will flow through the contacts AND Q1!!!!!

Suggested edit;


Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

larryd

"You all should be shot;" . . .
"How is that circuit supposed to work?
With no load the relay will work.
Add a load and the load current will flow through the contacts AND Q1!!!!!"



Said the cct. was wrong back in #7.
"BTW, your drawing shown in my post #3 is not correct.
Compare it to my drawing for K1."



No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

TomGeorge

Hi,
The Op is taking notice  but not seeing the cause if his/her problem as we keep pointing out.
So hopefully editing the diagram he/she seems to understand, may be "clearer".

A nice picture of a hand drawn, complete diagram would be the best solution.
The diagram being drawn by reverse engineering what to OP has constructed, please.

Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up