Hi all, I was hoping to get some advice on how to switch on a pump using a teensy 4.1 + MOSFET FQP30N06L + MOSFET Driver NCP81074. I'm not sure where I am going wrong?
When I power the 12V line with a 5V source the gate turns on and the motor runs, but when I swap the voltage source to a 7.4V or 12V battery the gate doesn't switch on? My schematic and code are below:
Any advice on my error or where to research to fix my issue would be awesome!
Thanks in advance for any help!
Cheers,
Mick
When I power the 12V line with a 5V source the gate turns on and the motor runs, but when I swap the voltage source to a 7.4V or 12V battery the gate doesn't switch on? My schematic and code are below:
Any advice on my error or where to research to fix my issue would be awesome!
Thanks in advance for any help!
Cheers,
Mick
Turn on gate - Teensy 4.1:
#include <Bounce2.h>
// Teensy 4.1
#define PUMP_POWER_PIN 23
#define PUMP_ON_BUTTON 30
#define LED_TEST 2
// Variables
int buttonDebounce = 5;
// Button class
Bounce pumpSwitch = Bounce();
// Pin Setup
void setup() {
pinMode(LED_TEST, OUTPUT);
pinMode(PUMP_ON_BUTTON, INPUT);
pumpSwitch.attach(PUMP_ON_BUTTON);
pumpSwitch.interval(buttonDebounce);
pinMode(PUMP_POWER_PIN, OUTPUT);
digitalWriteFast(PUMP_POWER_PIN, LOW);
}
// Program
void loop() {
// Check if button pressed
pumpSwitch.update();
if (pumpSwitch.read()) {
// Turn on pump and LED if pressed
digitalWriteFast(LED_TEST, HIGH);
digitalWriteFast(PUMP_POWER_PIN, HIGH);
delay(100);
// Turn off pump and LED
digitalWriteFast(LED_TEST, LOW);
digitalWriteFast(PUMP_POWER_PIN, LOW);
}
}