Skip to content

dcfusor/Nano-clone-32mhz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nano clone, 32 mhz

Some examples for an inexpensive double speed nano clone

I recently saw a youtube video by Ralph Bacon about a new clone of the arduino nano that runs double speed and is dirt cheap. The board described isn't an exact clone, and requires another board support library.
David Buezas provides an excellent one here on github. The board in question is available at Banggod among other places for well under 10 dollars for 3, so it seemed a low to no risk thing to give a whirl. It appears to work as advertised.

I ported what is a standard application here to it, making a few changes to take advantage of the better speed, and higher A/D resolution. This sketch does some basic data acq and spits it out over the serial link at 115200 baud.
It samples the first 4 A/D channels and a hardware counter at 10hz, and outputs this data along with the time since reset in ms in plain ASCII. The format is time AD0 AD1 AD2 AD3 counts \n using tabs for the whitespace.

I originally did this work on a Raspberry Pi 4, using arduino IDE 1.8.10, but have since tested it on a couple of x86 NUC machines, where everything is of course, faster, and the high baud rate is better handled.

Here's the board support string to add in your arduino preferences:

https://raw.githubusercontent.com/dbuezas/lgt8fx/master/package_lgt8fx_index.json

Info in the file LGinfo.txt, and of course, in the sketch itself. Not only does the A/D have more bits of resolution than a stock Nano, in this sketch, 8 samples per interval are taken and summed. The raw result is reported, and you'll just have to take that into account in any scaling. This is done to let any noise dither the result a little and get any extra goodness that might be there. It's an old DSP trick... The sketch has some throwaway one time demo code for an SH1106 display - I recently bought a few and was just looking at the lay of the land. I think the way I did this in setup() would not have been fast enough to keep up with 10hz in the loop, and those few lines of code are disposable. But nice to know that a cheap OLED display can fit 6 readable lines of text.

Bonus is the toggle sketch, which simply shows how to use the new fastio feature to toggle a pin. If you hook up a scope to that pin, the speed at which this thing gets around the loop() function is pretty amazing.

I also did this in the data acq sketch, so I could see what effect other things had on the timing.

About

Nano clone 32 mhz examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages