Conditions
Device:
Seeed Studio XIAO SAMD21
Power:
USB type C port from pc, however, it has been powered by both usb and 3.3v to the 3.3v pin(11) at the same time for programming. It was my intention to power via the 3.3v pin only for long term operation. 3.3v power was applied via adafruit 3.3v buck converter. See links at bottom for product details.
Measurement:
To measure voltage I am simply measured from pin 10 to ground. A 3.3v relay is attached to pin 10. See links at bottom for product details.
Code:
The test code is simply the blink example with the pin number changed with additonal time between state changes so I have enough time to measure.
const int ledPin = 10; // the number of the LED pin
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(ledPin, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(5000); // wait for a second
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
delay(5000); // wait for a second
}
Problem:
Both relay contacts and pin to ground measuring methods report roughly 200mV during the 5 seconds it is set to High. It does cycle between 200mV and 0 as instructed by the code but that isn’t enough to energize the relay coil. I did the same test with pin 9 and it outputs 3.3v like its supposed to. I am wondering if there is any know issue like this or a problem with my setup. I have it soldered into a custom pcb and I’d like to know if there is anything I can do before doing a lot of disassembly work. I do have schematics for my pcb design if that is needed.
Attempts to fix
I have tried both resetting and loading bootloader mode and powering with only the usb. Also I mentioned before I tested pin 9 which works correctly. I have also verified the 3V relay is functional by applying 3v to the coil which does activate normally. For reference the coil resistance is 28ohms. I measured the voltage in from the buck converter and its normal. I tested another xiao with the same code by itself outside the circuit and it works just fine. My next step would be to replace the Xiao but if something I did will break this one too I want to know before I replace it. Should the Xiao only be powered by the pads on the back with 5V? Is powering via the 3.3V pin wrong? Thanks in advance for any advice!
Product links:
3.3v Buck Converter: MPM3610 3.3V Buck Converter Breakout - 21V In 3.3V Out at 1.2A : ID 4683 : $5.95 : Adafruit Industries, Unique & fun DIY electronics and kits
3.3v Relay: https://www.amazon.com/gp/product/B00IIDY8JU/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1