W2 and W3 not receiving signal. Any suggestion?

Hello everyone,

I am trying to control three humidifiers using an Arduino Pro Micro. Everything works all fine when conecting just one of them, but when I connect all three at once, only one keeps working. They are connected as follows:


Humidifier schematics

When CB of the Humidifiers (T1, T2 and T3) are connected to GND, they changes their state, turning on and off. Thereby I came up with using MOSFET transistros to connect them to GND when the Pro Micro board emits a HIGH for pin 9. However, it seems only W1 is getting that signal, since it is the only one which changes its state.

I've already checked that all is connected as it is supposed to, and I am running out of ideas. Do anybody have any idea?

Thanks.

[Humidifier used: 12V car humidifier]

MOSFETS are extremely static sensitive check to see if the others are damaged. Check for gate voltage at all the MOSFETs to makes sure they are getting gate voltage on a high and low.

Make sure you didn't swap Drain and Source on the MOSFETS - this matters!

Posting the actual "humidifer" information might be useful. I don't know what a "CB" connection is and what the circuitry looks like on it.

Assuming it is wired as drawn you have several problems. First the gate resistors are way to high, go somewhere near 27 ohms. Look at the gate threshold of the 2N7000, you are not fully enhancing them. Why not drive all the Tns with one avalanche rated logic level MOSFET rated at a few amps and I think things will work OK. If your voltage is below about 3.5V you will also experience the same thing. Take your volt meter and measure the Gate voltage at each device and see if it exceeds the MOSFET threshold voltage, if not you found your problem. Also try one FET at a time and see if they all work.

You have the 12V GND connected to the Arduino GND, don't you?

Check for gate voltage at all the MOSFETs (...)

The voltage thresholds are between 0.8V and 3V according to the datasheet. They are properly connected since the humidifiers work when the MOSFETs' gates are manually connected to a 5V source.

(...)Posting the actual "humidifer" information might be useful. (...)

12 V Humidifier I couldn't find its specs, nor it's datasheet. I was unable to do reverse engineering, all its internals have been polished.

I don't know what a "CB" connection is and what the circuitry looks like on it

It is the connection of a capacitive button. It has a very low voltage and when it is touched, it seems to trigger a pull down signal that changes the state of the humidifier. Thus, CB stands for Capacitive Button.

First the gate resistors are way to high, go somewhere near 27 ohms

The voltage treshold is between 0.8V and 3V, since I am getting 5V from the Arduino Pro Micro is not 27 ohms too low? Not sure if I'm calculating it properly though...

Why not drive all the Tns with one avalanche rated logic level MOSFET rated at a few amps and I think things will work OK. If your voltage is below about 3.5V you will also experience the same thing. Take your volt meter and measure the Gate voltage at each device and see if it exceeds the MOSFET threshold voltage, if not you found your problem

Could you explain it in an easier way? I am affraid I have not fully understood you.

You have the 12V GND connected to the Arduino GND, don't you?

Yes, they hace a common ground.

EDIT: ir --> it

The Pro Micro needs 5V to the Vcc pin if its to work at 5V, else at least 7V to RAW. The 2N7000 needs 5V gate drive.
Nothing wrong with 220 gate resistors, the 2N7000 is a small-signal MOSFET with very little gate capacitance. You don't actually need gate resistors in fact, but the value is hardly crucial.

Can you post a link to the humidifier that works? It looks like the link you posted is going to one of your orders or an "item listing at the time you ordered it" type page - I'd kind of like some 12v DC humidifiers with a low-current control pin like that for myself!

I don't have any further comments beyond what others have said; my instinct is that it's actually just a bad connection.

Jarogue:
The voltage thresholds are between 0.8V and 3V according to the datasheet.

Which is quite irrelevant to using them for switching logic. :roll_eyes:

Jarogue:
They are properly connected since the humidifiers work when the MOSFETs' gates are manually connected to a 5V source.

You should not be using the "RAW" terminal of the Pro Micro to supply 5 V. You are losing much of it before it gets to the microcontroller. :astonished:

Sorry for being late, COVID-19 is being quite obtrusive.

You don’t actually need gate resistors in fact, but the value is hardly crucial.

I thought it was a good habit, in order to protect the board.

Can you post a link to the humidifier that works?

12 V Humidifier

You should not be using the “RAW” terminal of the Pro Micro to supply 5 V. You are losing much of it before it gets to the microcontroller

I am not. I am using an ATX Power Supply to power the entire system, so I think the lack of current is not an issue.

I’ve tought of using the 5V output of the PSU to source the humidifier’s MOSFETs and a second MOSFET to swith the power on and off. That second one would be the only connected to arduino. This has driven me to a question: is it better to connect the drain to the 5 V and the Source to the Gate of the transistors (see scheme)? Or better to do it on the groud side, connecting the Source to the GND and the Drain to the humidifiers’ outputs.

I’ve already tried this configuration (picture attached) using a protoboard. Now two of the humidifiers work, which is a step forward.

Thank you for your responses.

That scheme is bad. Firstly you aren't using that new MOSFET as a switch, but as
an analog follower, so it won't turn the other MOSFETs on properly.

Secondly MOSFET gates take no current, you can drive 100's of them in parallel if you want from
an Arduino pin (it will be very slow due to all the capacitance from the gates being in parallel),
so there's absolutely no need to use an extra MOSFET to drive the gates, the Arduino pin will
have no difficulty driving 3 2N7000 MOSFETs in parallel at all.

You say you've checked the connections, but did you check the voltages at the CB pin of each humidifier
when they are switched? If some of the MOSFETs are damaged they might not be responding.

MOSFETs are highly static-sensitive, you always need to observe anti-static precautions handling
MOSFETs, CMOS chips, and many other electronic devices.

You say you've checked the connections, but did you check the voltages at the CB pin of each humidifier when they are switched?

Yes, I did. They have a very low voltage:

  • VCB (Humidifier OFF) = 24 mV
  • VCB (Humidifier Full Power On) = 280 mV
  • VCB (Humidifier Mid Power On) = 240 mV

If some of the MOSFETs are damaged they might not be responding

They work when I connect them manually to a 5V power supply, so they don't seem damaged.

Is pin 9 set as OUTPUT in setup() ?

void setup()
{
  pinMode(9,OUTPUT);



}

Post complete code.

Paul__B:
You should not be using the "RAW" terminal of the Pro Micro to supply 5 V. You are losing much of it before it gets to the microcontroller. :astonished:

Jarogue:
I am not. I am using an ATX Power Supply to power the entire system, so I think the lack of current is not an issue.

Why then does your diagram show that serious mistake?

Expand.

Hi,
In this circuit, did you actually measure the voltage at the GATE of each MOSFET when they were supposed to be ON?
You say you had 5V at the output of the ProMicro.
Did you swap the MOSFETs over to see if the fault moved with the MOSFET?

Can you post a picture of your project so we can see your component layout?
You have been advised why 5V does not provide stable controller operation when it is connected to Vraw.
Vraw has to be 7V or higher, it has NOTHING to do with current directly.
PLEASE if you have not already, connect 5V to Vcc/5V pin instead of Vraw.

Thanks.. Tom.. :slight_smile:

Is pin 9 set as OUTPUT in setup() ?

Yes, it is. The code:

#define transducers 9                    // Humidifiers are attached to digital pin 9
bool humidifier;
unsigned long time_off;                 // Stores last time the humidifier turned on
float duration = 30000;                 // Stores the duration of the irrigation process
int interval = 30000;                   // Stores the duration the transducers is off

void setup() {
  pinMode(transducers, OUTPUT);
}

void loop() {
  current_time = millis();
  // In these if statements digitalWrite() and delay() functions are used to emulate the press of the capacitive button in the humidifier
  if (current_time - time_off >= interval) {
    if (humidifier == LOW) {                      // The humidifier is off and it's time to turn it on
      humidifier = HIGH;
      digitalWrite(transducers, HIGH);
      delay(200);
      digitalWrite(transducers, LOW);
      delay(20);
    }
    else if (current_time - time_off >= duration + interval) {
      humidifier = LOW;                           // The humidifier is on and it's time to turn it off
      digitalWrite(transducers, HIGH);
      delay(200);
      digitalWrite(transducers, LOW);
      delay(100);
      digitalWrite(transducers, HIGH);
      delay(200);
      digitalWrite(transducers, LOW);
      delay(20);
      time_off = current_time;
    }
  }
}

Why then does your diagram show that serious mistake?

I designed the scheme before I knew that. Initially I understood it was allright to power the Pro Micro with a 5V source through the RAW pin. I shared the scheme with some mates and they commented me that I should be using the Vcc. Now it’s connected that way and it was my mistake to post the old scheme. Here is the actual one.

I have modified it. As MarkT said, I am using an analog follower (I must confess I don’t know what it is) and now two of the humidifiers work properly. The third doesn’t.

Did you swap the MOSFETs over to see if the fault moved with the MOSFET?

What do you mean by “sswap the MOSFETs over”? Do you mean to use a different transistor?

Thank you all for your responses.

Humidifiers V2.png
OK, let's work with that now. :sunglasses:

Still only two of the humidifiers work. The one that doesn't work doesn't seem to be damaged though, because when I give it a 5V signal manually it changes its state. I think I am going to leave it as it is, that humidifier is driving me crazy.

Thank you all for your help.

Hi,
If you turn on all three humidifiers in your code.

  • Measure the GATE to gnd voltage on EACH of the MOSFETs.
  • Measure the DRAIN to gnd voltage on EACH of the MOSFETS.
  • Measure the SOURCE to gnd voltage on EACH of the MOSFETs.

Measure between THE MOSFET PINS and power supply gnd.

Thanks.. Tom.. :slight_smile:

OK, so I only posted the new schematic for convenience.

On inspection, it now contains a spurious fourth FET in "source follower" configuration which will thoroughly foul up the operation of the circuit.

Get rid of it in the diagram, and from your actual circuit if you have actually put it in there, before you even dare to pursue the matter here. :astonished:

Sorry, the intermediate illustration with the counter-productive addition of the FET which MarkT called out, was not illustrated in the thread itself so apparently no-one else noticed the foul-up and the confusion persisted. Here it is:
Germen-Project.png
Expand.


Finally, I am wondering whether we are correctly understanding the OP's problem in a persistently obscure reference to the signal on the "CB" button "changing state". Is the problem that the errant humidifiers are not turning on, or that they will not turn off which I suspect is more likely?

If the latter is the case, we next need to know the voltage measured on the "CB" pin with a digital multimeter and whether connecting the multimeter itself on the 20 V range turns the humidifier on?