Difference between revisions of "SpecialBoards"

From Interaction Station Wiki
Jump to navigation Jump to search
 
(54 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
[[File:specialboards.png]]
  
 
== Normal boards ==
 
== Normal boards ==
  
I have worked a lot with AVR boards, Arduino, or setups with ATmega328, also ATtiny85. Sometimes with RF12, for wireless transmission. With sensor boards attached. Sometimes this board plus sensors is too fragile or to big, or just clumsy. There are now boards with sensors built in. This saves space and makes the board more portable. For education there is the BBC Microbit board, having all kinds of expressions and input without any wires. Of course these boards are not better or so than the Arduino. These boards give other possibilites.
+
This text was written in 2020 about boards bought in 2019. The boards evolve quite quickly.
  
Example of a swatch, different sensors attached to a Arduino Pro Mini (looks quite nerdy!)
+
I have worked a lot with AVR boards, Arduino, or setups with ATmega328, also ATtiny85. Sometimes with RF12, for wireless transmission. Of course with sensor attached to the boards. Sometimes this board plus sensors is too fragile or to big, or just clumsy. There are now boards with sensors built in. This saves space and makes the board more portable. For education there is the BBC Microbit board, having all kinds of expressions and input without any wires. Of course these boards are not better or so than the Arduino. These boards give other possibilites.
  
[[File:Four sensor body.png]]
+
 
 +
[[File:Four sensor body.png|300px]]
 +
 
 +
Example of a swatch, different sensors attached to a Arduino Pro Mini (it looks quite nerdy with all these wires!)
 +
 
 +
[[File: normalBoards2.png|800px]]
 +
 
 +
Other "normal" boards, Arduino, Leonardo, Arduino with shield, Nano as Arduino, mini board with RF12 wireless, Due, Pro mini, Pro mini with sensor, lipo and powerless, pro mini with sound detector, TeensyLC and Teensy2.0. What is normal? Normal than is that you don't even think of programming it in something else than the Arduino IDE...maybe sometimes AVR Studio.
 +
 
 +
Normal is also the ATiny85, although a bit different. This smaller microcontroller I programmed also more in AVR Studio, but most of the times Arduino is ok, when you don't have to worry about the memory space.
  
 
== A wave of specialized micro controller boards ==
 
== A wave of specialized micro controller boards ==
Line 29: Line 39:
  
 
Adafruit circuit playground express (29,95) https://www.adafruit.com/product/3333
 
Adafruit circuit playground express (29,95) https://www.adafruit.com/product/3333
 +
 +
Sparkfun Edge (18,09) https://www.sparkfun.com/products/15170
 +
 +
The Edge has the Ambiq Apollo3 microcontroller, which runs on very little energy: https://www.youtube.com/watch?v=KeN4Gq7RZs8
 +
 +
The Edge has tensor flow: https://codelabs.developers.google.com/codelabs/sparkfun-tensorflow/#1
  
 
[[File:otherBoards.png]]
 
[[File:otherBoards.png]]
  
 
Still some wires visible: mostly to the Lipo battery and providing a switch.
 
Still some wires visible: mostly to the Lipo battery and providing a switch.
 +
 +
There is so much you can do with the boards, this post is only skimming the surface...
  
 
== SD cards included ==
 
== SD cards included ==
 
For fast real time data collection. The data are stored on the SD card and can later be retrieved and analyzed, for instance using Processing.
 
For fast real time data collection. The data are stored on the SD card and can later be retrieved and analyzed, for instance using Processing.
 +
 +
[[FIle:razor.png]]
  
 
Boards with SD-card:
 
Boards with SD-card:
 +
 
* Sparkfun Razor
 
* Sparkfun Razor
 +
 
IMU sensors incorporated – https://learn.sparkfun.com/tutorials/9dof-razor-imu-m0-hookup-guide/all#libraries-and-example-firmware
 
IMU sensors incorporated – https://learn.sparkfun.com/tutorials/9dof-razor-imu-m0-hookup-guide/all#libraries-and-example-firmware
  
Line 50: Line 72:
  
 
== Acceleration included ==
 
== Acceleration included ==
A lot of boards have acceleration sensors included.
+
A lot of these special boards have acceleration sensors included.
  
 
These sensors are referred to as IMU
 
These sensors are referred to as IMU
Line 57: Line 79:
 
*Sparkfun Razor https://www.sparkfun.com/products/14001
 
*Sparkfun Razor https://www.sparkfun.com/products/14001
 
*Adafruit circuit playground express (29,95) https://www.adafruit.com/product/3333
 
*Adafruit circuit playground express (29,95) https://www.adafruit.com/product/3333
 +
*Intel Curie/(Arduino101) (around 25, not for sale anymore) https://www.intel.com/content/dam/support/us/en/documents/boardsandkits/curie/intel-curie-module-datasheet.pdf
  
These sensors come into a few variaties.
+
These sensors come into a few variaties, depending on the number of sensors - acceleration - 3 plus gyro 3 axes - plus compass 3 axes.
  
 
*3 axes, acceleration x,y,z
 
*3 axes, acceleration x,y,z
Line 64: Line 87:
 
*9 axes,  acceleration x,y,z, gyro x,y,z, compass x,y,z
 
*9 axes,  acceleration x,y,z, gyro x,y,z, compass x,y,z
  
Only...no position!
+
Only orientation...no position!
  
 
You could think that integrating the acceleration would make it possible to keep track of the sensor and calculate the position after a certain time. The formulas from physics suggest this: just integrating over time. The problem is that the errors are building up.
 
You could think that integrating the acceleration would make it possible to keep track of the sensor and calculate the position after a certain time. The formulas from physics suggest this: just integrating over time. The problem is that the errors are building up.
Line 77: Line 100:
  
 
The Sparkfun Razor software has this quaternions possibility built in.
 
The Sparkfun Razor software has this quaternions possibility built in.
 +
 +
[[File: cameras.png ]]
 +
 +
OpenMV - Edge - Esp-Eye - Maix Dock
  
 
== Camera included ==
 
== Camera included ==
 +
 +
*Edge - you have to buy the camera separately, but it is cheap.
 +
 +
But where are some striking examples, scripts? (Well the board is still ... young" (see below)
 +
 +
*Esp-eye, with WIFI and video in the browser.
  
 
The ''bigger'' boards now have cameras included:
 
The ''bigger'' boards now have cameras included:
Line 87: Line 120:
  
 
*Maix Dock one (30,95) https://www.antratek.nl/sipeed-m1w-ai-dev-board-with-lcd-and-camera
 
*Maix Dock one (30,95) https://www.antratek.nl/sipeed-m1w-ai-dev-board-with-lcd-and-camera
 +
 +
For the money this combination of camera, LCD and microcontroller is quite remarkable...
 +
 +
[[File:maixDock.png | 400px ]]
 +
 +
[[File: maixDockIDE.png | 400px ]]
 +
 +
The Maix Dock programming IDE (comparable to the OpenMV)
 +
 +
Maix Dock Example scripts: https://github.com/sipeed/MaixPy_scripts
  
 
== AI included ==
 
== AI included ==
Line 97: Line 140:
  
 
*Intel Curie Tiny Tile https://software.intel.com/en-us/node/675623
 
*Intel Curie Tiny Tile https://software.intel.com/en-us/node/675623
 +
 +
The Intel Curie is a small version of the Arduino 101
 +
 +
Face Recognition
 +
 +
*Maix Dock
 +
 +
*Edge
 +
 +
*OpenMV
 +
 +
*ESP-Eye
 +
 +
This board presents a WIFI connection and the video image is displayed on a web page in the browser.
  
 
The camera boards have some face recognition possibilities, that is they recognize a face - not a person...
 
The camera boards have some face recognition possibilities, that is they recognize a face - not a person...
  
 
== Slow and Fast Sensors ==
 
== Slow and Fast Sensors ==
 +
 
Some data have to be tracked fast, like acceleration, gyro, compass, others can be sampled at a lower rate, like temperature, pollution, air pressure.
 
Some data have to be tracked fast, like acceleration, gyro, compass, others can be sampled at a lower rate, like temperature, pollution, air pressure.
  
 
This means that different sets of sensors can be grouped together.
 
This means that different sets of sensors can be grouped together.
 +
 +
On the special boards there are fast sensors: acceleration and IMU, sound, camera.
 +
 +
== Speed test ==
 +
 +
Although any number about the processor speed seems fast, there is a significant difference in speed. For recording data in real time, for instance acceleration, speed is needed to follow every movement. For AI applications lots of calculating has to be done.
 +
 +
For this speed test the script in « a neural network for arduino », http://robotics.hobbizine.com/arduinoann.html , was used.
 +
 +
{|
 +
|Feather M0 ADALOGGER
 +
|48MHz
 +
|62.6 seconds for a learning cycle
 +
|-
 +
|intel Curie Tiny Tile - Arduino101
 +
|32MHz
 +
|6.4 seconds
 +
|-
 +
|Arduino Due
 +
|84 MHz
 +
|18 seconds
 +
|-
 +
|9DOF_Razor_IMU
 +
|48MHz
 +
|62.6, exactly the same as the Feather
 +
|-
 +
|Arduino Pro Mini
 +
|8 MHz (3.3V versions) or 16 MHz (5V versions)
 +
|100 seconds
 +
|-
 +
|Teensy 3.2
 +
|48 MHz
 +
|14 seconds
 +
|}
 +
 +
the intel Curie Tiny Tile is 10 times faster than the Razor, so for heavy jobs, if possible use the Tiny Tile…
 +
 +
The processor speed indicated in the technical specifications does not seem to influence the results much.
 +
 +
When storing the data on SD cards, also this storage time has to be taken into account. No doubt the way the script is written can save time. Also the way data are stored influences the final results.
  
 
== BLE included ==
 
== BLE included ==
  
The BBC Microbit has BLE and the microbit can communicate amongst themselves quite easily.
+
*BBC Microbit has BLE
 +
the microbits can communicate amongst themselves quite easily.
 +
 
 +
*Adafruit circuit Express now also has BLE.
 +
 
 +
*Intel Curie
 +
 
 +
If you want to get the BLE data on your smart phone you have to dive into the Nordic code. I used the so called Pfod parser method, it worked (after a while): https://airlaboart.wordpress.com/2019/08/06/ble-interactions-tiny-tile-pfod-2/
 +
 
 +
Pfod: https://www.forward.com.au/pfod/index.html
 +
 
 +
[[File: BLE_Pfod.png]]
 +
 
 +
*Sparkfun Edge
 +
 
 +
Yes there is an BLE antenna on the Edge, but no example script using this...
 +
 
 +
== Direction of sound! ==
  
(I saw that the Adafruit circuit Express now also has BLE).
+
The MAIX Dock has a nice extension (besides the camera and the LCD screen).
 +
 
 +
The mic-array has 6 neopixels and six microphones. It can indicate the direction the sound is coming from.
 +
 
 +
This direction is shown on the ring, but also quite nicely displayed on the screen.
 +
 
 +
[[File: maixMIC.png]]
 +
 
 +
Only 12 lines of code in micropython.
  
 
== Summery of the boards ==
 
== Summery of the boards ==
Line 121: Line 244:
 
IMU library: NXPMotionSense
 
IMU library: NXPMotionSense
  
*Intel Curie Tiny Tile: https://software.intel.com/en-us/node/675623
+
*Intel Curie Tiny Tile (Arduino 101): https://software.intel.com/en-us/node/675623
  
 
Manual: https://www.intel.com/content/dam/support/us/en/documents/boardsandkits/curie/intel-curie-module-datasheet.pdf
 
Manual: https://www.intel.com/content/dam/support/us/en/documents/boardsandkits/curie/intel-curie-module-datasheet.pdf
Line 150: Line 273:
  
 
AI, sound
 
AI, sound
 +
 +
*ESP-Eye (30,19 ) https://github.com/espressif/esp-who/blob/master/docs/en/get-started/ESP-EYE_Getting_Started_Guide.md
 +
 +
== Conclusions ==
 +
 +
This investigation is just the rim. Discovering the Arduino board already takes years and every time you can go deeper. These boards offer even more possibilities, in programming, in AI concepts, sensors.
 +
 +
Which board to buy depends on your goals. But you only learn about the possibilities of the board for you by buying and starting to work with it.
 +
 +
Many boards, many possibilities. Every possibility costs time to investigate. Getting the tool chain working is sometimes 5 minutes, sometimes days of installing and reinstalling. Sometimes an IDE that worked, will not work in the next update of your OS. If you invest in one board, you learn also about the things it cannot do, and you will be tempted to look for another board. Other boards always look promising and new boards are being developed all the time.
 +
 +
To cope with this luxury is our world.
 +
 +
== In Development ==
 +
 +
The above boards are very much in development.
 +
 +
For instance about the SparkFun Edge (from around March 2019), see the effort to recognize the word "yes": https://youtu.be/xFbLHf0lIcw?t=239
 +
 +
 +
== Magic words ==
 +
 +
*Ambiq's Apollo3 SDK: this is an SDK for the lowest energy consumption: used in Sparkfun Edge, which can "run for weeks on a coin cell battery".
 +
 +
[[File: Edge_coin_cell.png |200px]]
 +
 +
Then it is understandable that there is no screen attached, and the camera is for some kind of recognition, but only giving the result, not the "image".
 +
 +
*Tensor flow lite: https://www.tensorflow.org/lite/
 +
 +
This is the portable version of machine learning, meaning it does not contain the "learning" part, which is done elsewhere, the code only has the fixed model.
 +
 +
[[File: tensor.png]]
 +
 +
Categories, mainly for mobile use, for microcontrollers there are examples of gesture (characters/letters in the air), speech (one word "yes", maybe two words - yes and no).
 +
 +
*FFT Fast Fourier transform, a way to analyze sound and noise for frequencies, (not sound recognition).
 +
 +
[[File: FFT_maix.png ]]
 +
 +
Maix Dock displays the Frequencies using the FFT example.
 +
 +
[[Category:Electronics]][[Category:Microcontrollers]]

Latest revision as of 15:46, 21 November 2022

Specialboards.png

Normal boards

This text was written in 2020 about boards bought in 2019. The boards evolve quite quickly.

I have worked a lot with AVR boards, Arduino, or setups with ATmega328, also ATtiny85. Sometimes with RF12, for wireless transmission. Of course with sensor attached to the boards. Sometimes this board plus sensors is too fragile or to big, or just clumsy. There are now boards with sensors built in. This saves space and makes the board more portable. For education there is the BBC Microbit board, having all kinds of expressions and input without any wires. Of course these boards are not better or so than the Arduino. These boards give other possibilites.


Four sensor body.png

Example of a swatch, different sensors attached to a Arduino Pro Mini (it looks quite nerdy with all these wires!)

NormalBoards2.png

Other "normal" boards, Arduino, Leonardo, Arduino with shield, Nano as Arduino, mini board with RF12 wireless, Due, Pro mini, Pro mini with sensor, lipo and powerless, pro mini with sound detector, TeensyLC and Teensy2.0. What is normal? Normal than is that you don't even think of programming it in something else than the Arduino IDE...maybe sometimes AVR Studio.

Normal is also the ATiny85, although a bit different. This smaller microcontroller I programmed also more in AVR Studio, but most of the times Arduino is ok, when you don't have to worry about the memory space.

A wave of specialized micro controller boards

For a project with interactive kites: https://airlaboart.wordpress.com, I bought and investigated a lot of boards with special characteristics.

All the different categories below require quite a bit of time to get used to and to get it working.

Sometimes you have to write in another programing language, like Micropython

Sometimes you have to install a new tool chain, using the terminal window.

A few links showing this tool chain pain:

https://airlaboart.wordpress.com/2019/07/04/further-intelligence/

https://airlaboart.wordpress.com/2019/07/07/and-the-third-toolchain-maix-dock/

After this project I investigated also the

BBC Microbit (22,95) https://www.floris.cc/shop/en/home/1848-microbit-go-bundel-microbit.html

Adafruit circuit playground express (29,95) https://www.adafruit.com/product/3333

Sparkfun Edge (18,09) https://www.sparkfun.com/products/15170

The Edge has the Ambiq Apollo3 microcontroller, which runs on very little energy: https://www.youtube.com/watch?v=KeN4Gq7RZs8

The Edge has tensor flow: https://codelabs.developers.google.com/codelabs/sparkfun-tensorflow/#1

OtherBoards.png

Still some wires visible: mostly to the Lipo battery and providing a switch.

There is so much you can do with the boards, this post is only skimming the surface...

SD cards included

For fast real time data collection. The data are stored on the SD card and can later be retrieved and analyzed, for instance using Processing.

Razor.png

Boards with SD-card:

  • Sparkfun Razor

IMU sensors incorporated – https://learn.sparkfun.com/tutorials/9dof-razor-imu-m0-hookup-guide/all#libraries-and-example-firmware

If the SD card is not on the board you can use this device:

OpenLog: https://learn.sparkfun.com/tutorials/openlog-hookup-guide?_ga=2.10013043.776216311.1558331043-1571920724.1558331043#firmware

Acceleration included

A lot of these special boards have acceleration sensors included.

These sensors are referred to as IMU

These sensors come into a few variaties, depending on the number of sensors - acceleration - 3 plus gyro 3 axes - plus compass 3 axes.

  • 3 axes, acceleration x,y,z
  • 6 axes, acceleration x,y,z, gyro x,y,z
  • 9 axes, acceleration x,y,z, gyro x,y,z, compass x,y,z

Only orientation...no position!

You could think that integrating the acceleration would make it possible to keep track of the sensor and calculate the position after a certain time. The formulas from physics suggest this: just integrating over time. The problem is that the errors are building up.

Gimbal lock - Quaternions

Even more problems: you really need the coordinates to be in so called quaternions and not Euler angles to get a nice graph.

About Quaternions: https://www.3dgep.com/understanding-quaternions/ (This is more theoretical about the math)

Practical, about the sensor data of acceleration, gyro and compass contributing to the quaternions: http://www.camelsoftware.com/2016/02/20/imu-maths/

The Sparkfun Razor software has this quaternions possibility built in.

Cameras.png

OpenMV - Edge - Esp-Eye - Maix Dock

Camera included

  • Edge - you have to buy the camera separately, but it is cheap.

But where are some striking examples, scripts? (Well the board is still ... young" (see below)

  • Esp-eye, with WIFI and video in the browser.

The bigger boards now have cameras included:

The OpenMV system has an IDE and in this IDE, there is face recognition (sort of).

For the money this combination of camera, LCD and microcontroller is quite remarkable...

MaixDock.png

MaixDockIDE.png

The Maix Dock programming IDE (comparable to the OpenMV)

Maix Dock Example scripts: https://github.com/sipeed/MaixPy_scripts

AI included

Speech recognition:

Gesture recognition:

The Intel Curie is a small version of the Arduino 101

Face Recognition

  • Maix Dock
  • Edge
  • OpenMV
  • ESP-Eye

This board presents a WIFI connection and the video image is displayed on a web page in the browser.

The camera boards have some face recognition possibilities, that is they recognize a face - not a person...

Slow and Fast Sensors

Some data have to be tracked fast, like acceleration, gyro, compass, others can be sampled at a lower rate, like temperature, pollution, air pressure.

This means that different sets of sensors can be grouped together.

On the special boards there are fast sensors: acceleration and IMU, sound, camera.

Speed test

Although any number about the processor speed seems fast, there is a significant difference in speed. For recording data in real time, for instance acceleration, speed is needed to follow every movement. For AI applications lots of calculating has to be done.

For this speed test the script in « a neural network for arduino », http://robotics.hobbizine.com/arduinoann.html , was used.

Feather M0 ADALOGGER 48MHz 62.6 seconds for a learning cycle
intel Curie Tiny Tile - Arduino101 32MHz 6.4 seconds
Arduino Due 84 MHz 18 seconds
9DOF_Razor_IMU 48MHz 62.6, exactly the same as the Feather
Arduino Pro Mini 8 MHz (3.3V versions) or 16 MHz (5V versions) 100 seconds
Teensy 3.2 48 MHz 14 seconds

the intel Curie Tiny Tile is 10 times faster than the Razor, so for heavy jobs, if possible use the Tiny Tile…

The processor speed indicated in the technical specifications does not seem to influence the results much.

When storing the data on SD cards, also this storage time has to be taken into account. No doubt the way the script is written can save time. Also the way data are stored influences the final results.

BLE included

  • BBC Microbit has BLE

the microbits can communicate amongst themselves quite easily.

  • Adafruit circuit Express now also has BLE.
  • Intel Curie

If you want to get the BLE data on your smart phone you have to dive into the Nordic code. I used the so called Pfod parser method, it worked (after a while): https://airlaboart.wordpress.com/2019/08/06/ble-interactions-tiny-tile-pfod-2/

Pfod: https://www.forward.com.au/pfod/index.html

BLE Pfod.png

  • Sparkfun Edge

Yes there is an BLE antenna on the Edge, but no example script using this...

Direction of sound!

The MAIX Dock has a nice extension (besides the camera and the LCD screen).

The mic-array has 6 neopixels and six microphones. It can indicate the direction the sound is coming from.

This direction is shown on the ring, but also quite nicely displayed on the screen.

MaixMIC.png

Only 12 lines of code in micropython.

Summery of the boards

manual: https://www.pjrc.com/teensy/K66P144M180SF5RMV2.pdf

SD card: https://forum.pjrc.com/threads/55114-SD-Datalogging-Best-Practice-in-2019

IMU library: NXPMotionSense

Manual: https://www.intel.com/content/dam/support/us/en/documents/boardsandkits/curie/intel-curie-module-datasheet.pdf

Review: https://www.element14.com/community/roadTestReviews/2425/l/element14-tinytile-intel-curie-based-board-review

IMU

SD card

AI

IMU

Camera

AI, sound

Conclusions

This investigation is just the rim. Discovering the Arduino board already takes years and every time you can go deeper. These boards offer even more possibilities, in programming, in AI concepts, sensors.

Which board to buy depends on your goals. But you only learn about the possibilities of the board for you by buying and starting to work with it.

Many boards, many possibilities. Every possibility costs time to investigate. Getting the tool chain working is sometimes 5 minutes, sometimes days of installing and reinstalling. Sometimes an IDE that worked, will not work in the next update of your OS. If you invest in one board, you learn also about the things it cannot do, and you will be tempted to look for another board. Other boards always look promising and new boards are being developed all the time.

To cope with this luxury is our world.

In Development

The above boards are very much in development.

For instance about the SparkFun Edge (from around March 2019), see the effort to recognize the word "yes": https://youtu.be/xFbLHf0lIcw?t=239


Magic words

  • Ambiq's Apollo3 SDK: this is an SDK for the lowest energy consumption: used in Sparkfun Edge, which can "run for weeks on a coin cell battery".

Edge coin cell.png

Then it is understandable that there is no screen attached, and the camera is for some kind of recognition, but only giving the result, not the "image".

This is the portable version of machine learning, meaning it does not contain the "learning" part, which is done elsewhere, the code only has the fixed model.

Tensor.png

Categories, mainly for mobile use, for microcontrollers there are examples of gesture (characters/letters in the air), speech (one word "yes", maybe two words - yes and no).

  • FFT Fast Fourier transform, a way to analyze sound and noise for frequencies, (not sound recognition).

FFT maix.png

Maix Dock displays the Frequencies using the FFT example.