Arduino Nano BLE 33 digitalWrite gives very low voltage

Dear all,

I tried the following code on a Nano BLE 33:

void setup() {
pinMode(8, OUTPUT);
}

void loop() {
digitalWrite(8, HIGH);
 }

and connected a LED using a 220 ohm resistor (GND side).

The intensity of led is very low! The same is happening with the others digital pins.
Moreover, if I connect the same led with the same resistor directly to a 3.3 Volt battery I get a bright light.

Do you have any idea?
Thank you in advance!

Yes, this is a known issue. The issue is mbedOS uses pins differently. Arduino uses mbedOS for this device and the pin functions are slightly incompatible. This only affects you when you write the pin so often.

There is another posts about this in this forum with some more information.

https://forum.arduino.cc/index.php?topic=663776.0

Thank you,

so no way that we can find a solution unless Arduino will solve it?

Hello,

I decided to try something. Since I wanted to turn a LED on (with no success because of the low voltage) I switched to a LED (from a headlamp, with a LED driver circuit included, CX2859) which I control with a transistor following the circuit below attached. I tried and it works very nicely, but since I am not an expert, I just wanted to ask your opinion about it. What do you think?

You should always add a current-limiting resistor in series with a LED. In a light bulb when the metal wire heats up the resistance increases and stops the wire from burning up. LEDs are semiconductor diodes and their resistance decreases as they heat up. That is why you need to limit the current to prevent damage.

The issue with the low voltage does not happen when you stop writing to the port pin so often. Right now, loop runs hundred thousand of times a second. A few times a second is OK if you want to blink the LED. Try add a delay(100) or so to your code and the issue will be gone. But do not use delay in real applications, just for this test. :slight_smile: