Jump to content
 

Seeeduino Xiao - Anyone used them with the Arduino IDE 2 or 1.8.x?


melmerby
 Share

Recommended Posts

  • RMweb Premium

Hi all

I have acquired a couple of Xiaos to make small dcc signal decoders

I have added the board package to the Arduino IDE but when I compile a sketch it comes up with 3 x file not found errors.

The same sketch compiles and runs perfectly on a Nano.

On another forum it said this was due to a corrupt install, so I did the recommended fix, which was to delete all board packages and re-instal them.

That made no difference as it is exactly the same (The board packages for standard Arduinos re-installed correctly)

 

Any suggestions?

Link to post
Share on other sites

  • RMweb Premium
On 06/03/2022 at 12:07, KingEdwardII said:

What are the files that are not found?

 

Yours, Mike.

Hi Mike.

All seems sorted now after also posting in the Arduino forum.

 

I have been using IDE2 for my most recent sketches and when you save something such as "test file no1" it saves it as "test file no1.ino" complete with spaces (A bug apparently).

The IDE 1.8.x saves it correctly as "test_file_no1.ino"

If you are using the Arduino AVR board interpreter in IDE2 it will read it correctly with the spaces but the Xiao interpreter doesn't like the spaces and completely scrambles it, resulting in 'file not found' errors.

 

The solution is to make sure all sketches are space free when saved in IDE2.

 

Link to post
Share on other sites

Keith,

 

Glad it's fixed.

 

I long since got into a habit of eliminating spaces in filenames due to many problems of this kind that I ran into over the years, with the underscore being my favourite go-to.

 

It would be interesting to hear of your experiences with Seeeduino if you have the time to post about them at some point. The more modern chipsets they use make them very interesting.

 

Yours,  Mike.

Link to post
Share on other sites

  • RMweb Premium
3 hours ago, KingEdwardII said:

Keith,

 

Glad it's fixed.

 

I long since got into a habit of eliminating spaces in filenames due to many problems of this kind that I ran into over the years, with the underscore being my favourite go-to.

 

It would be interesting to hear of your experiences with Seeeduino if you have the time to post about them at some point. The more modern chipsets they use make them very interesting.

 

Yours,  Mike.

I'm using one Xiao for a DCC decoder for the Dapol Servo signals.

I've already made a couple using a Nano & a Uno (since dismembered!) but for operating one Dapol bracket signal, they waste more than 50% of their capability due to the small number of pins required.

One pin is required for DCC input (via opto coupler) and 4 outputs to operate the 4 states of the signal (also via opto couplers)

Using a Xiao has the advantage of a much smaller footprint, hence a smaller decoder for one signal.

 

The processor as I assume you already know is an Arm Cortex M0 running at 48Mhz and has loads more memory than an Arduino. I won't be taxing it much!

The one disadvantage that it is, like the RP2040 processor which is the same family, a 3.3v device and isn't 5v tolerant. This however shouldn't be a problem for my application.

Link to post
Share on other sites

  • RMweb Premium

Another thing to bear in mind with the Xiao is that, like a RPi Pico, the outputs are quite weak, current wise.

Source current from a high pin is 7mA max, way below an Arduino with Atmel processor.

I have had to reduce the current drive to the opto couplers from about 10mA with the Arduino down to 5mA.

Hopefully that should still be enough drive, the specs of the opto device suggests it should be fine at 5mA.

Link to post
Share on other sites

  • RMweb Premium

Problem

The Xiao doesn't run the DCC decoder program.

I know not why, as it compiles properly, it uploads correctly and I can monitor the dcc input signal by a digital read command and output that signal to a spare pin, so the signal is getting into the processor.

However the DCC decoding does not work. The Xiao is definitely working properly as I can define the pins I am using and input and output logic level signals.

 

I have posted the problem on Seeed & Aduino Forums but nobody has even replied.

So I am stuck.

 

Link to post
Share on other sites

  • RMweb Premium

I've been in touch with the guy who wrote the DCC master which is on Git Hub

He seems to think most problems are caused by poor crystals in cheap Arduino copies and suggests checking the frequency.

Not quite sure why that would be a problem as different Arduinos run at different frequencies anyway.:scratchhead:

The Seeeduino runs at a much higher frequency than a Nano and there is no way of checking as all the workings are inside a 1cm x 1cm tin box!

 

EDIT

Still no response from either the Arduino forum or the Seeed forum.

Looks like the Xiao is a waste of space. Back to the Nano.

Edited by melmerby
Link to post
Share on other sites

  • RMweb Premium

I have found that on paper the Xiao is a great little board, in practice, less so.

It wont run many Arduino sketches due to missing facilities.

e.g. The NmraDCC library requires onboard Eeprom, so wants to see that library.

It doesn't exist for SAMD21 based boards because there is no Eeprom in the processor, unlike the normal Atmel devices.

The more I investigate, the less I like.

 

Shame really, it promised a lot.

Link to post
Share on other sites

  • 2 weeks later...
  • RMweb Premium

The Dynabay DCC Decoder Master uses the standard Arduino interrupt routines, including "interrupt.h"

The SAMD21 processor in the Xiao is different and the Seeduino library has just a holding page for the Arduino "interrupt.h" library with no actual code in it for compatibilty.

 

I am currently in an exchange with a person on the Seeed forum, trying to sort this out. It's not easy.

Edited by melmerby
Link to post
Share on other sites

  • RMweb Premium
On 08/03/2022 at 20:35, melmerby said:

Another thing to bear in mind with the Xiao is that, like a RPi Pico, the outputs are quite weak, current wise.

Source current from a high pin is 7mA max, way below an Arduino with Atmel processor.

I have had to reduce the current drive to the opto couplers from about 10mA with the Arduino down to 5mA.

Hopefully that should still be enough drive, the specs of the opto device suggests it should be fine at 5mA.

More on this

In default mode the output source current is actually less than 3mA and a command to set "driver strength" to high is required.

Without it the output source is high(ish) resistance and the output voltage will fall as current is increased, effectively self limiting.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...