Notifications
Clear all

LED current limiting resistor

4 Posts
2 Users
0 Likes
680 Views
(@jfabernathy)
Member
Joined: 3 years ago
Posts: 141
Topic starter  

In the recent video on the Xiao, the LED was not connected with a current limiting resistor.  Why is that?

If your code won't compile, have another glass of bourbon. Eventual the problem will be solved.


   
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1087
 

Good observation!

The XIAO has 3.3-volt outputs with an internal current limiting of 30ma.  That's admittedly a bit "hot" for a red LED, I probably should have used a blue one as it requires a higher voltage than a red one. 

Technically you're correct, a 22 to 100-ohm resistor would have been a good idea with the red LED.  But my XIAO survived!

As a blue LED requires the full 3.3-volts it would not have needed a current-limiting resistor.

😎

Bill

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
(@jfabernathy)
Member
Joined: 3 years ago
Posts: 141
Topic starter  

@dronebot-workshop, Well I didn't take any chances. I put a 220 ohm between GND and the cathode of the LED and that worked fine. I just received my 3 Xiao MCUs today and got them working on some Arduino examples and I put in Circuit python to test some examples with that.  Then I reset it back to Arduino IDE.  

Fun fact, Windows 10 switches com port numbers between 4 and 5 every time I switch between IDE and circuit python.

It's been a good first day with the Xiao. I even soldered on the stake pins without damaging the device. Not bad for $15 for 3 of them. Amazon Prime delivered them for free, and it took 2 days.

If your code won't compile, have another glass of bourbon. Eventual the problem will be solved.


   
ReplyQuote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1087
 

@jfabernathy

The resistor was a good move, although you could probably drop it down to 100 ohms - remember it's 3.3v and not 5v.

I got my most recent batch of XIAO's from Digikey, they were even cheaper than Amazon (at least they were here in Canada) and it's also next-day delivery. I bought the originals in a 3-pack from Amazon, the ones I got from Digikey were individually packed.

Great that you're playing with Circuit Python as well, the XIAO is about the cheapest way to get into that.  You might also want to check out the Adafruit QT-Py, it's a buck more than the XIAO and has similar specs - in fact, it's pin-for-pin compatible.  It also has a better Reset switch and it uses an RGB NeoPixel LED in lieu of the discreet LED's the XIAO uses.

It's amazing what you can buy for next to nothing these days!

😎

Bill

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote