WiFi doesn't work with 5V on VIN

Hey all,

So I have a WiFi project that was working just fine, and now it's not connecting to my Router at all.

So I rebuilt the project on a bread board. It runs perfectly when powered by USB, whether the USB cable carries data lines or just provides power.

The unit does NOT work when powered by 'exact 5V' on VIN. In fact it does absolutely nothing except light up the power led. But the unit does work fine again at VIN = 6V.

I know there is a reference in the documentation to the VIN pin range being 5V-6V, but I can tell you it doesn't work at 5V! Not even 5.5V.

So the weird thing is that I had this project deployed and the WiFi worked just fine with 5V to VIN.

The only thing I can think of that is different is that I upgraded the firmware to 3.0.1. And now it doesn't work.

The other '6V power to VIN' topic ended ambiguously, with only a comment that operating the 1010 with 6V on VIN didn't damage it. No mention whether the original problem was solved or not. So I rolled the dice... and it worked.

Is there a way to roll the firmware back to a previous version where the device did work with 5V exact VIN? (I don't actually know what firmware vesion was installed when it was working fine :frowning: ...)

Or is it safe now to use a higher VIN, say 9V? I got plenty of 9V wall adapters, but no 6V ones.

Or can anyone shed any light on what is going on with the Nina firmware?

Thanks

It is recommended to apply 7V - 12V at the VIN-pin of UNO R3 and UNO Q. Which Arduino are you using?

I'm using an MKR WiFi 1010.

Sorry I didn't mention that, I presumed that to be understood by the placement of this topic in Official Hardware/MKR Family/ MKR WIFI 1010 location.

I seen a topic on reddit where someone describes the same problem
wifi_fails_to_start_if_powered_with_5v_via_vin

From the Arduino MKR 1010 product page:

So a maximum of 6V input on this pin.

Thanks EmilyJane,

That is exactly the reference I mentioned. I see the other one in the Related topics list below.

Notwithstanding this product spec, the wifi still only works at 6V , not at 5V... but it used to. Dunno what changed other than the firmware.

That depends on the current draw

Thanks jim-p, that was the first post I found on Google.... it doesn't shed any light on why the WiFi used to work with 5V on VIN but now doesn't.

I strongly suspect it's a firmware issue. I am going to try rolling it back to some previous versions and see if works again.

I suppose it's possible if the NINA is now using more current with the updated firmware.

Regarding the Reddit link, below is a capture of the 1010's schematic:

Note that the +5V label seen coming off the drain of Q2A is not the same as the +5V you see on pin 14 of the board. There is a fuse in between, which I presume is unidirectional.

Still doesn't show why the WiFi used to work at 5V at VIN and now doesn't... only at 6V

Also noticed the USB supply

power from the USB goes directly to the +5V net$.

So both the USB power and the VIN power arrive at V_BUS with a small voltage drop across either the Schcottky diode or the mosFET tansistor... so why does USB work and VIN doesn't? ?

Vin goes through a diode, so here will be a voltage drop that will depend on the current. Try the simple blink sketch without Wifi and see if it works with 5V on Vin.

Good idea.

Blink sketch works with USB power but does not work with 5V VIN. It does work with 6V VIN...

I'm stumped!

So I discovered a lead...

So the only other difference between the old project that did work and the new one that doesn't is that I added pins 11 and 12 as LED driving outputs. pins 11 & 12 happen to also be SDA and SCL, both hard wired with 4k7 pull up resistors.

So running the Blink sketch at exactly 5V at VIN didn't work and the LEDs on pins 11 and 12 were lit. I pulled off the LEDs and then the Blink sketch worked with 5V at VIN.

So I immediately reloaded my WiFi sketch to see if that made a difference there.

No.

Still doesn't work at +5V,

Then back to Blink sketch with the pin 11 & 12 LEDs in place. Blink still did not work with 5V VIN from bench power supply, but did work with power from a USB port.

That power measured as 5.5V.

Then back to WiFi sketch with pin 11& 12 LEDs installed, running on USB power plug into USB plug. All good.

Switched power VIN to using different cable, from same PC USB port... WiFi failed to connect.

Pulled out the pin 11 & 12 LEDs... WiFi still failed to connect.

looks like current is somehow involved, but pulling the additional LEDs didn't make a difference.

Darn!

Looks like I'm back to suspecting the firmware.

Thanks for helping!

When you removed the LEDs it worked with blink, I think that proves it is indeed related to current.

I hope you had current limiting resistors on the LEDs.

Yes I did.

I even tried just pulling out all the LED, so no LED current draw at all... Didn't change anything.

I uploaded this code to the 1010 board. I ran it with only th board; absolutely nothing else attached to it. Just the board...

/*
 This example connects to an unencrypted WiFi network.
 Then it prints the MAC address of the WiFi module,
 the IP address obtained, and other network details.

 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 31 May 2012
 by Tom Igoe
 */
#include <SPI.h>
#include <WiFiNINA.h>

#include "arduino_secrets.h" 
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
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 WiFi radio's status

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(57600);
  // give a bit of time to get going
  delay(1500);

  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);
  
  // check for the WiFi module:
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    // don't continue
    while (true);
  }

  String fv = WiFi.firmwareVersion();
  if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
    Serial.println("Please upgrade the firmware");
  }

  // attempt to connect to WiFi network:
  while (status != WL_CONNECTED) 
  {
    Serial.print("Attempting to connect to WPA SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network:
    status = WiFi.begin(ssid, pass);

    // give an indication that program is trying to connect
    digitalWrite(LED_BUILTIN, HIGH);
    delay(250);
    digitalWrite(LED_BUILTIN, LOW);
    delay(750);

    // wait 10 seconds for connection:
    delay(10000);
  }

  // 
  Serial.print("You're connected to the network");

}

void loop() 
{

  
  digitalWrite(LED_BUILTIN, HIGH);
  delay(250);
  digitalWrite(LED_BUILTIN, LOW);
  delay(750);
  // check the network connection once every 10 seconds:
//  delay(10000);
//  printCurrentNet();
}
 

On USB power it functioned as expected. There was a single brief LED_BUILTIN flash indicating it was trying to connect, followed by a steady blink indicating it was in the loop() function.

On VIN it only flashed the single time, but every 10 seconds indicating it was stuck in the while() loop of attempting to connect to network.

Again further proof that it is a current related problem.
The more current you draw through the diode, the higher the voltage drop.