This is puzzling me: if I power my Arduino IoT 33 Board from USB, everything runs smoothly. Now, if I power it with 5 V on Vin, the board resets as soon as I call WiFiNINA's WiFi.begin(ssid, pass).
Of course, power is my first suspect as I'd imagine that wifi connections draw lots of current. But what's intriguing is that the main power source is a 5V (10A) DC source that is powered by a 24V (20A) AC/DC converter. The Arduino connects to 3 I2C components (a 128x128 monochrome OLED, an INA219, and an Adafruit PWM multiplexer). There are 2 servos connected to the multiplexer. Here's the wiring diagram:
With this setup, INA219 reads 4.8 V and about 100 mA when both servos are moving (85 mA in rest).
An important remark: the PCA9685 multiplexer has a separate V+ just to drive the servos. I was assuming that my power source is enough to drive all of this, so I didn't bother supplying a separate power source for it (btw, there's an additional 680 uF capacitor soldered on the board). Just for debugging purposes I did try a separate power source for it, but the problem persists.
Here are some data sheets: 24 V power source, DC-DC Converter (D24-S5), OLED, PWM Multiplexer, INA219.
Finally, here's the setup code:
void setup() {
delay(250);
Wire.begin();
// Check for the screen module
if (!display.begin(SCREEN_ADDRESS, true)) {
// don't continue
while (true)
;
}
// Check for the PWM module
pwm.begin();
pwm.setOscillatorFrequency(27000000);
pwm.setPWMFreq(50);
// Setting servos to midpoint
pwm.setPWM(0, 0, SERVO_START);
pwm.setPWM(1, 0, SERVO_START);
display_line_2 = (String) "PWM... Ok";
printDisplay(1);
delay(10);
// Check for the INA219 module
if (!ina219.begin()) {
display_line_3 = (String) "INA219... Fail";
printDisplay(1);
// don't continue
while (true)
;
}
// Check for the internal LM module
if (!IMU.begin()) {
display_line_4 = (String) "IMU... Failed";
printDisplay(1);
// don't continue
while (true)
;
}
// check for the WiFi module:
if (WiFi.status() == WL_NO_MODULE) {
display_line_5 = (String) "Wifi... Failed";
printDisplay(1);
// don't continue
while (true)
;
} else {
while (status != WL_CONNECTED) {
// Connect to WPA/WPA2 network:
status = WiFi.begin(ssid, pass);
// wait 10 seconds for connection:
delay(5000);
}
}
}
As I said, if I comment the line status = WiFi.begin(ssid, pass), everything works just fine. So my question is: where is the problem likely? What would be the next step to troubleshoot it?
