Nano 33 IoT not running anything with 12V through vin

Hello, I am not sure what I did wrong :slight_smile:
I made a small PCB to have a nano 33 IoT with a temp sensor (dht22) to start fan when its getting too hot. Now It seems to all work good when connected with USB but my main issue is when I connect my 12V power (to the vin). It doesnt seem to run anything. It lights up but doesnt do anything. (Only 12V, not both)

When connected to the network, I make the builtin led flash. When connected to the 12V, it turns on, maybe flash once or twice and then stays off.. again nothing happens. My dashboard doesnt update. (works fine through USB)

This is my PCB board


-DC barrel connector + goes to vin. The Vin will also power the fans
-My DHT22 is connected to 3v3 and data pin goes to D2
-I have a logic level shifter that will turn on the fan. the pin is connected to D3 and will send the GRD to the fans
-GRD from barrel connector is connected to the board GRD, Sensor GRD and also provides the GRD for fans throught the level shifter.

This is the code I have:

// WiFiNINA - Version: Latest 
#include <WiFiNINA.h>
#include "thingProperties.h"
#include "DHT.h"
#define DHTTYPE DHT22   // DHT 22  (AM2302)

#define dataPin 2 // Defines pin number to which the sensor is connected
#define relayPin 3
DHT dht(dataPin, DHTTYPE); 

char ssid[] = SECRET_SSID;                // your network SSID (name)
char pass[] = SECRET_PASS;                // your network password (use for WPA, or use as key for WEP)

int status = WL_IDLE_STATUS;             // the Wi-Fi radio's status
int ledState = LOW;                       //ledState used to set the LED
unsigned long previousMillisInfo = 0;     //will store last time Wi-Fi information was updated
unsigned long previousMillisLED = 0;      // will store the last time LED was updated
const int intervalInfo = 5000;            // interval at which to update the board information


void setup() {
  Serial.begin(9600);
  initProperties();
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
  dht.begin(); 
  pinMode(relayPin, OUTPUT);
  digitalWrite(relayPin, LOW);
  pinMode(LED_BUILTIN, OUTPUT);
  
  // attempt to connect to Wi-Fi network:
  while (status != WL_CONNECTED) {
    status = WiFi.begin(ssid, pass);
    delay(10000);
  }
}

void loop() {
    ArduinoCloud.update();
    curhum = dht.readHumidity();
    curtemp= dht.readTemperature();
    if (isnan(curtemp)) {
      delay(1000);
      return;
    }
    
    unsigned long currentMillisLED = millis();
    // measure the signal strength and convert it into a time interval
    int intervalLED = WiFi.RSSI() * -10;
    // check if the time after the last blink is bigger the interval
    if (currentMillisLED - previousMillisLED >= intervalLED) {
      previousMillisLED = currentMillisLED;
      // if the LED is off turn it on and vice-versa
      if (ledState == LOW) {
          ledState = HIGH;
      } else {
          ledState = LOW;
      }
      // set the LED with the ledState of the variable
      digitalWrite(LED_BUILTIN, ledState);
    }
    IPAddress ip = WiFi.localIP();
    varIP = String(ip[0]) + String(".") + String(ip[1]) + String(".") + String(ip[2]) + String(".") + String(ip[3])  ; 
    long rssi = WiFi.RSSI();
      
    if (curtemp > 40){
      digitalWrite(relayPin, HIGH);
      fanRelay = true;
      delay(2000); //Delay 2 sec.
    }
    else{
      digitalWrite(relayPin, LOW);
      fanRelay = false;
      delay(2000); //Delay 2 sec.
    }
}

void onFanRelayChange() {
    //do something
}

I Hope someone could help me out as I am running out of ideas :frowning:

Could you show a schematic ? I'm curious about that logic level shifter.

This is the datasheet of the mosfet

For the schematic... well I dont have one but data pin goesto d3, gate goes to the fans and the source is the 12V GRD. The problem is not the fan not starting but nothing happening at all. I have a dashboard on IOT Cloud and doesnt get any data when connected through vin for some reason. board powers on but nothing else work.

Maybe i could try with a buck converter and connect 5v to usb and separate the 12v and keep it only for the fans?

Nano 33 IoT VIN pin is rated up to 21V.

I'm sorry, but I don't see it. Hopefully someone else has a good idea. Do you have a multimeter to check all the voltages ?

ok weird. I just did another quick test... I have unplugged the fans and seems to work.
Now I am thinking maybe I have a short with the fans? Fans shouldnt be getting any power at this time cause of temp threshold.

oups spoke too soon... it stop working... and now it works with fans in
seems very unstable... works.. not work. I unplug sometimes it work, sometimes it doesnt.

So powering on from a buck converter with 5v on usb and separate the fans to the 12v seems to work.

I still don't understand why it would act out when the 12v going through vin

Without a complete schematic, no one can know.

But guesses would include a bad connection, or the on board voltage regulator is overheating and shutting down.

1 Like

If you give an Arduino too many amps it acts up. What are you powering it with?

You cannot give an Arduino too many amps. It will take just as much current as it needs and no more

Do you perhaps mean too many volts ?

1 Like

where its located, i am using PoE injector to power other 12v things and was just splitting the power to connect the board.

this is the poe injector im using...
ANVISION 2-Pack Active 48V to 12V PoE Splitter Adapter, IEEE 802.3af Compliant 10/100Mbps, for IP Camera Wirelss AP Voip Phone and More https://www.amazon.ca/dp/B07C14X327/ref=cm_sw_r_apan_glt_i_TY7CRTY2XVSK6HJTMXYV?_encoding=UTF8&psc=1

Its possible you are right that it was getting too much from it since with a buck converter to usb and 12v to fan seems to work out. The board was getting 12v when i checked with multimeter.

my inital tests were done with a 12v 1.2ah battery... even using a breadboard wasnt working with poe.

Seems fine. The Amazon listing says it outputs 1.5A.

A review of the adapter mentions a warning that the voltage output is not grounded and collapses if you ground it. This could be a problem (and a cause of your problem) if you connect ground on your circuit board to something that sees the true ground, like for instance the USB connector, oscilloscope or other equipment that is grounded.