I am building a controller for a transmission and to control it I need to PWM the solenoid to control the pressure but with what I have it just turns it on or off. If the duty cycle is 0 its off and if I move it to 1-100% the solenoid is on. I am trying to use the YYNMOS-4 board found on amazon. I could not get that to work so I also tried the IRF520 MOSFET Driver Module and all I could get it to do was be on all the time the little LED lights on both boards work like they are supposed brighten when I increase the duty cycle but the 12v output does not PWM.
The code is a little long but what matters to the problem is lines 70-
I have also tried drone bot workshops example code he uses for the IRF520 board and same thing.
Your frizzy picture is about useless, try posting a schematic as how you have wired it including power and ground. You show a pot but no power. A Uno but no power. A motor not connected. A lightning bolt??? and no technical links to the hardware devices. I assume this is for a vehicle of some type, you also should study a bit about automotive electrical requirements etc.
Come on - at the top of the post it tells us "It’s been a while since we’ve seen darmfield12 — their last post was 11 months ago.".
So you know the deal here, the new forum allows large code to be posted, Fritzing is only useful when you do it properly and most importantly, we need the Web reference for your IRF520 module as the IRF520 is not a logic-level FET and may or may not be suitable for use depending on what circuitry is on the board.
The (governor pressure) solenoid valve regulates line pressure to produce governor pressure. The average current supplied to the solenoid valve controls governor pressure. One amp current
produces zero psi governor pressure. Zero amps sets the maximum governor
pressure. Current is regulated by modulation of the pulse width of a 512 hz driver
frequency (512 cycles per second). I Have tried just an 12v LED bulb instead of the solenoid to see if that worked and it acts just like the solenoid.
Hi,
What solenoid and pressure valve are you using.
For PWM to work on a valve, the valve has to be designed to work on PWM and within a specific frequency range.
Can you please post links to your hardware and a picture of your project please?
The information from the service Manual of what the transmission came in from factory.
The Transmission is a 47RE and it's the Governor solenoid.
The solenoid valve regulates line pressure to produce governor pressure. The average current supplied to the solenoid valve controls governor pressure. One amp current produces zero psi governor pressure. Zero amps sets the maximum governor pressure. Current is regulated by modulation of the pulse width of a 512 hz driver frequency (512 cycles per second) .
The [transmission control relay] supplies electrical power to the solenoid valve. Operating voltage is 12 volts (DC) and is provided through the relays fused B+ contact.
The solenoid is polarity sensitive. The PCM energizes the solenoid by grounding it through the power ground terminal on the powertrain control module.
I have no but I have ran that sketch with an 12v LED and it does the same thing as the solenoid and then I have ran many PWM examples from youtube videos online and all the LED does is stay on with the IRF540 board or with the YYNMOS-4 it turns on when the Potiemeter comes off 0 and goes off when it goes back to 0 does not vary the brightness at all.
/*
MOSFET RGB LED Strip Demonstration
mosfet-rgb-led-demo.ino
Demonstrates use of MOSFETs to drive RGB LED Strip
Uses three potentiometers for input
DroneBot Workshop 2019
https://dronebotworkshop.com
*/
// Output pins to MOSFETs
int redPin = 3;
int greenPin = 5;
int bluePin = 6;
// Define Potentiometer Inputs
int redControl = A0;
int greenControl = A1;
int blueControl = A2;
// Variables for Values
int redVal;
int greenVal;
int blueVal;
void setup()
{
// Setup MOSFET pins as outputs
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
// Setup Serial Monitor
Serial.begin(9600);
}
void loop() {
// Read values from potentiometers
redVal = analogRead(redControl);
greenVal = analogRead(greenControl);
blueVal = analogRead(blueControl);
// Map values to range of 0-255
redVal = map(redVal, 0, 1023, 0, 255);
greenVal = map(greenVal, 0, 1023, 0, 255);
blueVal = map(blueVal, 0, 1023, 0, 255);
// Write PWM to pins
analogWrite(redPin, redVal);
analogWrite(greenPin, greenVal);
analogWrite(bluePin, blueVal);
// Write Color values to Serial Monitor
Serial.print("Red: ");
Serial.print(redVal);
Serial.print(" - Green: ");
Serial.print(greenVal);
Serial.print(" - Blue: ");
Serial.println(blueVal);
// Add a slight delay
delay(20);
}
Well kinda I changed to pin 3 after what you have in your sketch and it looked somewhat like a graph so I tried this is what I came up with The first picture is after the mosfet board and the second is before like out of the arduino. Is there a way to clean that up or is that just a cheap mosfet board?
"Kind of like a graph"?
Your mobile can do videos?
The trigger on your "scope" should be Rising (lo-to-hi transition) - as shown, it's Falling.
With regard to this FET board (which is probably overkill) - with everything disconnected, I would like to know what the resistance from Gate to GND is.
Hi,
Can you please post a image(s) of you project, so we can see your component layout?
Can you also remove this link, that PCB is optocoupled, you do not need it, also it will possibly contribute to noise when connected to a noisy engine environment.
99k -- that's why it's staying on longer than the PWM duty cycle. The gate is staying charged. You see it trailing off there, "bleeding off".
Can you solder in a resistor between those two points (4.7 kohms)?