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 ...)
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?
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.
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.
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.
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.