PO Box 6603

Huntsville, AL 35813, USA

+1-256-970-1906

max@CliveMaxfield.com

Say Hello to the Seeeduino XIAO

As small as a postage stamp, the Seeeduino XIAO boasts a 32-bit Arm Cortex-M0+ processor running at 48 MHz with 256 KB of flash memory and 32 KB of SRAM.

Blog Sponsors

Support My Blog


A couple of months ago, I penned a column, The Worm Turns, in which I revealed that — although I’d been bravely fighting my urges — my will had crumbled and I had decided to create a display comprising a 12 x 12 = 144 array of ping pong balls, each illuminated with a tricolor WS2818 LED (a.k.a. a NeoPixel).
The author proudly presenting his 12 x 12 ping pong ball array (Click image to see a larger version — Image source: Max Maxfield)
First, I found a pack of 144 ping pong balls on Amazon for only $11. I ordered two cartons because I knew I would need some spares. Of course, this immediately tempted me to increase the size of my array to 15 = 15 = 225 ping pong balls, but I’d already ordered 150 NeoPixels in the form of five meters of 30 pixels/meter strips from Adafruit, so I decided to stick with the original plan, which we will call “Plan A” so no one gets confused. Thank goodness I restrained myself, because the 12 x 12 array is proving to be a lot more work than I expected — a 15 x 15 array would have brought me to my knees. The next step was to build a 2-ball prototype because I wanted to see whether it was best to attach the NeoPixel to the outside of the ball (the fast-and-easy option) or inside the ball (the slow-and-painful alternative). Although you can’t see it from the picture or from this video, there is a slight but noticeable difference in the real-world, and one method is indeed better than the other — can you guess which one?
A prototype using two ping pong balls (Click image to see a larger version — Image source: Max Maxfield)
Have you ever tried to drill 3/8” holes into 144 ping pong balls? Me neither. Over the years, I’ve learned a thing or two, and one of the things I’ve learned is that drilling holes in ping pong balls always ends in tears. Thus, I ended up cutting these holes using a small pair of curved nail scissors (there’s one long evening I’ll never see again). The reason for using the strips is that this is the cheapest way to purchase NeoPixels with associated capacitors in the easiest-to-use form. Unfortunately, the ball-to-ball spacing (43 mm) on the board is greater than the pixel-to-pixel spacing (33 mm) on the strip. This means chopping the strip into segments, attaching each segment to its associated ping pong ball, and then connecting adjacent segments together using three wires. So, 144 x 3 = 432 short wires to strip and solder. Do you have any idea how long this takes? I do!
The Seeeduino XIAO is the size of a small postage stamp (Click image to see a larger version — Image source: Seeed Studio)
Now, you may have noticed that I was driving my 2-ball prototype with an Arduino Uno, but this is too large to be used in my array. In the past, I would have been tempted to use an Arduino Nano, which is reasonably small and not-too-expensive. On the other hand, the fact that this is an 8-bit processor running at only 16 MHz with only 32 KB of flash memory and only 2 KB of SRAM would limit the effects I could achieve. Sometimes (rarely) the fates decide to roll the dice in one’s favor. In this case, while I was pondering which processor to employ, the folks from Seeed Studio contacted me to tell me about their Seeeduino XIAO. OMG! This little rapscallion — which is only the size of a small postage stamp and costs only $5 — is awesome! In addition to a 32-bit Arm Cortex-M0+ processor running at 48 MHz, this bodacious beauty boasts 256 KB of flash memory and 32 KB of SRAM. As an aside, it’s important to note is that the Seeeduino XIAO’s programming connector is USB Type-C, which means you’re going to need a USB-A to USB Type-C cable.
The Seeeduino XIAO’s 11 input/output pins pack a punch (Click image to see a larger version — Image source: Seeed Studio)
In addition to its power and ground pins, the Seeeduino XIAO has 11 data pins, each of which can act as an analog input or a digital input/output (I/O). Furthermore, one of these pins can by driven by an internal digital-to-analog converter (DAC) and act as a true analog output, while the other pins can be used to provide I2C, SPI, and UART interfaces. Sad to relate, there is one small fly in the soup or a large elephant in the room (I’m feeling generous today, so I’ll let you pick the metaphor you prefer). The problem is that, although it can be powered with the same 5 V supply as the NeoPixels, the Seeeduino XIAO’s I/O pins use a 3.3 V interface, but the NeoPixels require 5 V data signals, so we need some way to convert between the two. In the past, I would probably have used a full-up bidirectional logic level converter, like the 4-channel BOB (breakout board) from SparkFun, but I only need a single unidirectional signal, so this seems a bit of overkill. Happily, I recently ran across an awesome hack on Hackaday.com that provides a simple solution requiring only a single general-purpose IN4001 diode.
A cheap-and-cheerful voltage level converter hack (Click image to see a larger version — Image source: Max Maxfield)
The way this works is rather clever. From the NeoPixel’s data sheet we learn that a logic 1 is considered to be 0.7 * Vcc. Since we are powering our NeoPixels with 5 V, this means a logic 1 will be 0.7 * 5 = 3.5 V, which is higher than the XIAO’s 3.3 V digital output. Bummer! Actually, if the truth be told, there is some “wriggle room” here, and the 3.3 V signal from the XIAO might work, but are we the sort of people for whom “might” is good enough? Of course we aren’t! The solution is to add a “sacrificial NeoPixel” at the beginning of the chain, and to power this pixel via our IN4001 diode. Since the IN4001 has a forward voltage drop of 0.7 V, the first NeoPixel will see a Vcc of 5 – 0.7 = 4.3 V. Remember that the NeoPixel considers a logic 1 to be 0.7 * Vcc, so this first NeoPixel will accept anything above 0.7 * 4.3 = 3.01 V as being a logic 1. Meanwhile, the next NeoPixel in the chain will see the 4.3 V data signal coming out of the first NeoPixel as being a valid logic 1. Pretty clever, eh? I’m currently about half of the way through wiring everything up. I cannot wait to see my array light up for the first time. Once everything is up and running, I will return to regale you with more details. Until that frabjous day, I will delight to hear your comments, questions, and suggestions.

Blog Sponsors

Support My Blog

0 0 vote
Article Rating
Subscribe
Notify of
guest
18 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

David Ashton

Max – love the Neopixel voltage converter hack. So cunning you could pin a tail on it and call it a weasel…. Can you actually use the sacrificial Neopixel as a LED (if so does it have reduced brightness?

The Seeduino looks a good bit of gear as well – especially seeing as you can use it surface mount or thru hole. Don’t like the USB-C but I guess I better get used to it…..

Elizabeth Simon

You could mount the extra pixel on the back of your array and use it for a “health indicator ” for troubleshooting or indicating which of several effects is on tap. I assume there will be buttons or some such to select the effects. so an indicator visible form the side or bottom might be useful.

David Ashton

I always find it difficult to judge – are those holes on the Seeeduino at standard 0.1 inch spacing?

David Ashton

Also difficult to judge, but the spacings on the Neopixel connections also look like 0.1 inch. Which gives me an idea. Could you solder the neopixels to veroboard (stripboard)? Then the only work would be soldering them to the veroboard – if that is possible then it would be heaps quicker than stripping all those wires – and you’d have to make 3 cuts in the strips under each neopixel – very quick and easy with the proper tool. And positioning might be a problem if they aren’t exactly lined up with the holes in the veroboard, but you could make a jig for that…. You’d also have to buy LOTS of veroboard but it’s not that pricey.

Elizabeth Simon

I must say that this XIAO board does look nice. Will have to keep it in mind for future projects. Assuming that I find any time for such…

One potential issue is there are no mounting holes so I assume you either attach it to a breadboard (which somewhat negates the size advantage or use sticky tape of some kind.

I just got a set of LoRa boards from SparkFun to play with. Hoping that I’ll find time to get them going….

Elizabeth

The XIAO makes the Grove connectors look huge.

Let’s see, Seeed has Grove BOBs while SparkFun has Qiic BOBs. SparkFun has a Qiic to Grove cable though…

Not that I have any time to mess with any of this.

Blog Sponsors

Buy this space!

Recent Posts

A Deepfake Video Never Lies 

Swimming to Antarctica with the NuttX RTOS 

Kunning Kool Kinetic Klock 

Resurrecting 21-Segment Victorian Displays 

Want a $160 Laser Engraver? 

12 x 12 Ping Pong Array Simulator (Part 1) 

Pass Me My Pencil Pointer 

Feel the Power of the PoE FeatherWing 

Mesmerizing Kinetic Sculptures 

There’s No Need to Eat CrowPi2 

  • LOGIN
  • REGISTER
LOGIN

Already a member? Login


Oops, forgot your password?

Please enter your username or email address.
You will receive a link to create a new password via email.

REGISTER
  • Name

  • Usernames cannot be changed.
  • Contact Info

  • About Yourself

  • Share a little biographical information to fill out your profile. This may be shown publicly.
  • Add or Edit GravatarYou can change your profile picture on Gravatar
  • Type your password.
  • Type your password again.

Edit Profile

You must be logged in to edit your profile.

18
0
Would love your thoughts, please comment.x
()
x