so i got my new super sweet shield and it is working good but gets very hot, very quick. i am just switching some solenoids at ~1.8-2.0amp
board says 20 amp per channel so i am not sure what i am doing wrong
i run the ground from each solenoid to there own channel and power all of the solenoids together off a single fuse.
i do not have any 12V wire into the shield.
Do you have back-emf diodes across the solenoids?
Leo..
first one no, lol
second one, yes
now i get some crazy noise signal activating random circuits when not holding an input pin low
so each solenoid ground has a 1n4001 with the band on 12V side
i soldered all the band ends together leading to the 12V solenoid power supply
What are the input pins connected to? Do you have pullup resistors on the input pins? Post your code.
i have 6 micro switchs that connect to chassis ground. the other end is the input pins
in between gears is a no switch or no LOW input land. this is where the problem lies when the solenoids receive 12V
when no 12V to the solenoids it works perfect
int gearin1 = A0; // SHIFT INPUTS LOW/ACTIVCE
int gearin2 = A1;
int gearin3 = A2;
int gearin4 = A3;
int gearin5 = A4;
int gearin6 = A5;
int EDS1 = 3; // solenoid outputS
int EDS2 = 5;
int EDS3 = 6;
int EDS4 = 9;
int EDS5 = 10;
int MV1 = 2;
void setup()
{
pinMode(gearin1, INPUT_PULLUP); // shift switch inputs
pinMode(gearin2, INPUT_PULLUP);
pinMode(gearin3, INPUT_PULLUP);
pinMode(gearin4, INPUT_PULLUP);
pinMode(gearin5, INPUT_PULLUP);
pinMode(gearin6, INPUT_PULLUP);
pinMode(EDS1, OUTPUT); // solenoid outputs
pinMode(EDS2, OUTPUT);
pinMode(EDS3, OUTPUT);
pinMode(EDS4, OUTPUT);
pinMode(EDS5, OUTPUT);
pinMode(MV1, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
if (digitalRead(gearin1) == LOW && // FIRST GEAR
digitalRead(gearin2) == HIGH &&
digitalRead(gearin3) == HIGH &&
digitalRead(gearin4) == HIGH &&
digitalRead(gearin5) == HIGH &&
digitalRead(gearin6) == HIGH )
{
analogWrite(EDS1, 240);
analogWrite(EDS2, 240);
analogWrite(EDS3, 0);
analogWrite(EDS4, 240);
analogWrite(EDS5, 0);
digitalWrite(MV1, LOW);
digitalWrite(LED_BUILTIN, HIGH);
delay (200);
digitalWrite(LED_BUILTIN, LOW);
analogWrite(EDS4, LOW);
delay (1000);
while (digitalRead(gearin1) == LOW);
}
if (digitalRead(gearin1) == HIGH && // SECOND GEAR
digitalRead(gearin2) == LOW &&
digitalRead(gearin3) == HIGH &&
digitalRead(gearin4) == HIGH &&
digitalRead(gearin5) == HIGH &&
digitalRead(gearin6) == HIGH )
{
analogWrite(EDS1, 240);
analogWrite(EDS2, 240);
analogWrite(EDS3, 240);
analogWrite(EDS4, 240);
analogWrite(EDS5, 0);
digitalWrite( MV1, HIGH);
}
if (digitalRead(gearin1) == HIGH && // THIRD GEAR
digitalRead(gearin2) == HIGH &&
digitalRead(gearin3) == LOW &&
digitalRead(gearin4) == HIGH &&
digitalRead(gearin5) == HIGH &&
digitalRead(gearin6) == HIGH )
{
analogWrite(EDS1, 0);
analogWrite(EDS2, 0);
analogWrite(EDS3, 0);
analogWrite(EDS4, 240);
analogWrite(EDS5, 0);
digitalWrite( MV1, LOW);
}
if (digitalRead(gearin1) == HIGH && // FOURTH GEAR
digitalRead(gearin2) == HIGH &&
digitalRead(gearin3) == HIGH &&
digitalRead(gearin4) == LOW &&
digitalRead(gearin5) == HIGH &&
digitalRead(gearin6) == HIGH )
{
analogWrite(EDS1, 240);
analogWrite(EDS2, 240);
analogWrite(EDS3, 0);
analogWrite(EDS4, 0);
analogWrite(EDS5, 0);
digitalWrite( MV1, HIGH);
}
if (digitalRead(gearin1) == HIGH && // FIFTH GEAR
digitalRead(gearin2) == HIGH &&
digitalRead(gearin3) == HIGH &&
digitalRead(gearin4) == HIGH &&
digitalRead(gearin5) == LOW &&
digitalRead(gearin6) == HIGH )
{
analogWrite(EDS1, 0);
analogWrite(EDS2, 0);
analogWrite(EDS3, 0);
analogWrite(EDS4, 0);
analogWrite(EDS5, 0);
digitalWrite( MV1, HIGH);
}
if (digitalRead(gearin1) == HIGH && // SIXTH GEAR
digitalRead(gearin2) == HIGH &&
digitalRead(gearin3) == HIGH &&
digitalRead(gearin4) == HIGH &&
digitalRead(gearin5) == HIGH &&
digitalRead(gearin6) == LOW )
{
analogWrite(EDS1, 0);
analogWrite(EDS2, 240);
analogWrite(EDS3, 240);
analogWrite(EDS4, 0);
analogWrite(EDS5, 0);
digitalWrite( MV1, HIGH);
}
}
Can you check what the markings are on the MOSFETs? I looked at the Freetronics site and it seems they are using a non logic-level MOSFET, the NTD5862N, which is as useful as a chocolate-teapot.
Sorry, I think that shield may be completely unsuitable for 5V use...
The original .pdf shows NTD5867NL fets ('L' for logic level).
Leo..
i have it working great now with a latching program.
the second one is not getting hot at all
Wawa:
The original .pdf shows NTD5867NL fets ('L' for logic level).
Leo..
Ah, yes, I think I've managed to convince myself from the photos in the OP that its the right sort of MOSFET...
Still, its clearly marked in some of their online stuff, so they must have been selling duff boards at some point.