top bar

Difference between revisions of "Arduino32bitBoards"

(Created page with "'''Micro-manager-Arduino32bit''' The original Micro-Manager Arduino firmware is specifically written for the Arduino UNO and does not work on the newer and faster 32-bit Ardu...")
 
(Advantages and Disadvantages of Arduino 32 Bit-boards in general)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Micro-manager-Arduino32bit'''
+
{| style="text-align: left"
 +
!Summary:
 +
|Adapter for [http://www.arduino.cc/ 32bit Arduino boards]
 +
|-
 +
!Author:
 +
|Bonno Meddens
 +
|-
 +
!License:
 +
|LGPL
 +
|-
 +
!Platforms:
 +
|Linux, Mac, and Windows
 +
|-
 +
!Since version:
 +
|1.4.23 - 20190731
 +
|-
 +
!Automated Serial Port Setup:
 +
|Yes
 +
|-
 +
!Peripheral device discovery:
 +
|No
 +
|-valign="top"
 +
!Wiki page:
 +
|Bonno Meddens<br/>Nico Stuurman
 +
|}
 +
----
  
The original Micro-Manager Arduino firmware is specifically written for the Arduino UNO and does not work on the newer and faster 32-bit Arduinos. This project aims to rewrite the original firmware to get compatibility with the newer arduino compatible boards. The original firmware and guide can be found on the micro-manager website link.
+
The Arduino32bitBoards device adapter contains extra features compared to the regular [[Arduino]] device adapter.
  
Please keep in mind that most 32-bit Arduino boards are damaged when 5V is applied to the input pins. Voltage level conversion must be used for 5V input on  boards that do not tolerate 5V. Also, the digital output is 3.3V. Most devices that work with 5V input also work fine with 3.3V input but this is not guaranteed.
+
Currently the Teensy 3.5 is the recommended board to be used with this device adapter, bur there is also firmware available for the teensy 3.2, ESP32 and feather M4.
  
The Teensy 3.5 is currently the recommended board.
+
Differences compared to regular Arduino Device Adapter:
Advantages of the sketches provided in this repo
+
* Two extra output channels to a total of 8
 +
* Added Pulse-width modulation (PWM) control
 +
* Unified DAC and PWM
 +
* Unified digital-out channels and DAC/PWM channels, this allows DAC/PWM blanking on all 8 channels
 +
* Changed unit of DAC/ PWM from "Volt" to "Power %" and the default scale to 0-100
 +
* In the Firmware: Channels 1 - 2 are by default DAC channels, channels 3-8 are by default PWM
  
    Works on newer and faster boards, pin registers don't have to be used
+
== Advantages and Disadvantages of Arduino 32 Bit-boards in general ==
    Easier to adapt since pin registers aren't used
+
'''Advantages:'''
        This allows PWM + blanking
+
* Much faster, because of higher clock speed and more work performed per clockcycle.
        DAC + blanking
+
* Baudrate increased to 500 000, nearly 9 times the transferspeed between Arduino and Micro-Manager (there are some exceptions). This can be even increased to 2 000 000, with micro-manager 2
        Possibility to choose different pins
+
* Most 32-bit Arduinos have a build-in DAC (max 3.3V output)
    No need for external DAC with most boards
+
* Higher PWM frequencies and PWM bitresolutions
 +
* More flexibility with pins used
  
Advantages of 32 Bit-boards in general
+
'''Disadvantages:'''
 +
*'''Most are not 5V tolerant''', this means you'll need voltage level converter when using the triggerpin. It is recommended to use Teensy 3.5 since this board does have 5V tolerant inputs. When using a not 5V tolerant board it is recommended to use a voltage level converter like this one [https://www.adafruit.com/product/757 link] or this one [https://www.sparkfun.com/products/12009 link]
  
    Much faster, because of higher clock speed and more is done per clockcycle.
+
* Library support might not always be great
    Baudrate increased to 500 000, nearly 9 times the transferspeed between Arduino and Micro-Manager (there are some exceptions). This can be even increased to 2 000 000, with micro-manager 2
+
    Most 32-bit Arduinos have a buildin DAC (max 3.3V output)
+
    Higher PWM frequencies and PWM bitresolutions
+
  
Working Arduino boards:
+
== Arduino boards information ==
  
    ESP32
+
Firmware code for these boards can be found on [https://github.com/bonnom/Arduino32BitBoards/tree/master/Firmwares Bonno Meddens github repository].
        Baudrate: 115200
+
        DAC1 on pin 25 and DAC2 on pin 26
+
        ADC not implemented
+
        Able to set PWM frequency and Resolution
+
        Low Price boards available
+
        KEEP IN MIND: NOT 5V TOLERANT!!
+
  
    ItsyBitsy M4
+
=== ESP32 ===
        The ADC does not work at the moment because of DAC implementation
+
* Baudrate: 115200
        Channel 8 has become channel 7
+
* DAC1 on pin 25 and DAC2 on pin 26
        KEEP IN MIND: NOT 5V TOLERANT!!
+
* ADC not implemented
 +
* Able to set PWM frequency and Resolution
 +
* Low Price boards available
 +
* KEEP IN MIND: NOT 5V TOLERANT!!
 +
* Pins used:
 +
** Trigger: Pin 5
 +
** Channel 1: Pin 25 (DAC)
 +
** Channel 2: Pin 26 (DAC)
 +
** Channel 3: Pin 27 (PWM)
 +
** Channel 4: Pin 15 (PWM)
 +
** Channel 5: Pin 14 (PWM)
 +
** Channel 6: Pin 4  (PWM)
 +
** Channel 7: Pin 23 (PWM)
 +
** Channel 8: Pin 19 (PWM)
  
Teensy 3.x Boards
+
=== ItsyBitsy M4 ===
All 3.x boards
+
* Baudrate 500 000
 +
* The ADC does not work at the moment because of DAC implementation
 +
* 12 bit PWM
 +
* KEEP IN MIND: NOT 5V TOLERANT!!
 +
* Pins Used
 +
** Trigger: Pin 5
 +
** Channel 1: Pin A0 (DAC)
 +
** Channel 2: Pin A1 (DAC)
 +
** Channel 3: Pin 6  (PWM)
 +
** Channel 4: Pin 9  (PWM)
 +
** Channel 5: Pin 10 (PWM)
 +
** Channel 6: Pin 11 (PWM)
 +
** Channel 7: Pin 12 (PWM)
 +
** Channel 8: Pin 13 (PWM)
  
    Able to set PWM frequency and Resolution, for more information link
+
=== Teensy 3.x and 4.0 Boards ===
    At least one DAC
+
* All 3.x boards
    handy: Pinouts page [https://www.pjrc.com/teensy/pinout.html]
+
** Able to set PWM frequency and Resolution, for more information [https://www.pjrc.com/teensy/td_pulse.html link]
 +
** At least one DAC
 +
** handy: [https://www.pjrc.com/teensy/pinout.html Pinouts page]
 +
** Baudrate 500 000 
  
    Teensy 3.1 & 3.2
 
        Seems to work fine, but more testing is needed
 
        All currently used pins in the sketch are 5V tolerant
 
        Only one DAC on pin A14
 
        All other pins are the same as the original UNO firmware
 
  
    Teensy 3.5 (Recommended)
+
*Teensy 3.1 & 3.2 (96 Mhz)
        Not yet tested
+
** All currently used pins in the sketch are 5V tolerant
        All currently used pins in the firmware are 5V tolerant
+
** Only one DAC on pin A14
        DAC1 on pin 21 and DAC2 on pin 22
+
** Current PWM frequency: 11718.75 Hz
        Able to set PWM frequency and Resolution
+
** Pins used:
 +
*** Trigger: Pin 2
 +
*** Channel 1: Pin A14 (DAC)
 +
*** Channel 2: Pin 20  (PWM)
 +
*** Channel 3: Pin 3  (PWM)
 +
*** Channel 4: Pin 4  (PWM)
 +
*** Channel 5: Pin 5  (PWM)
 +
*** Channel 6: Pin 6  (PWM)
 +
*** Channel 7: Pin 21  (PWM)
 +
*** Channel 8: Pin 22  (PWM)
  
    Teensy 3.6
 
        Uses same sketch as teensy 3.5
 
        Faster than teensy 3.5
 
        KEEP IN MIND: NOT 5V TOLERANT!!
 
  
Not working boards:
+
* Teensy 3.5 (Recommended) & Teensy 3.6
 +
** All currently used pins in the firmware for Teensy '''3.5''' are 5V tolerant
 +
** KEEP IN MIND: Teensy '''3.6''' is not 5V tolerant!!
 +
** DAC1 on pin 21 and DAC2 on pin 22
 +
** Current PWM frequency: 14648.437 Hz
 +
** Pins used:
 +
*** Trigger: Pin 2
 +
*** Channel 1: Pin A21 (DAC)
 +
*** Channel 2: Pin A22  (DAC)
 +
*** Channel 3: Pin 3  (PWM)
 +
*** Channel 4: Pin 4  (PWM)
 +
*** Channel 5: Pin 5  (PWM)
 +
*** Channel 6: Pin 6  (PWM)
 +
*** Channel 7: Pin 7  (PWM)
 +
*** Channel 8: Pin 8  (PWM)
  
    Esp8266 board
 
    Arduino Due
 
    Sipeed Maix boards
 
  
To be tested:
+
* Teensy 4.0
 +
** KEEP IN MIND: not 5V tolerant!!
 +
** Very fast
 +
** Does not have a DAC
 +
** Current PWM frequency: 468750 Hz (At 7-bits)
 +
** Pins used :
 +
*** Trigger: Pin 8
 +
*** Channel 1: Pin 23 (PWM)
 +
*** Channel 2: Pin 15 (PWM)
 +
*** Channel 3: Pin 3  (PWM)
 +
*** Channel 4: Pin 4  (PWM)
 +
*** Channel 5: Pin 10 (PWM)
 +
*** Channel 6: Pin 9  (PWM)
 +
*** Channel 7: Pin 6  (PWM)
 +
*** Channel 8: Pin 5  (PWM)
  
    Teensy LC
+
== Installation and Drivers ==
    A SAMD21 board
+
This Section is an overview of the installation links for Arduino and the respective boards
    Teensy 3.5 (Very likely Works)
+
 
 +
=== Arduino IDE ===
 +
Arduino offers two solutions, an online editor and a local Integrated development environment (IDE) program.
 +
It is recommended to use the local IDE software.
 +
The page for the software can be found [https://www.arduino.cc/en/Main/Software here].
 +
 
 +
=== Adafruit ===
 +
Adafruit makes two programming environments to use on their 32-bit boards. One is circuit python and Arduino. Circuitpython currently doesn't work with micro-manager.
 +
Guide for installing the Adafruit Feather M4 board can be found [https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51/setup here].
 +
Just the driver can be downloaded from [https://github.com/adafruit/Adafruit_Windows_Drivers/releases/latest here]. This also includes multiple drivers that work on many other boards as well.
 +
 
 +
=== Esp32 ===
 +
ESP32 arduino core installation link can be found [https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md here].
 +
Also when using an windows version older than Windows 10 driver installation might be needed. There are two types of USB to serial chips used with each their own driver. If you are not sure what IC is used just install both drivers.
 +
 
 +
These two are the most common type of drivers:
 +
* [https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers SiLabs cp210x]
 +
* [https://cdn.sparkfun.com/assets/learn_tutorials/8/4/4/CH341SER.EXE CH340]
 +
 
 +
=== Teensy Boards ===
 +
Teensy requires its own installation software that can be downloaded [https://www.pjrc.com/teensy/td_download.html here].
 +
Just the drivers can be found [https://www.pjrc.com/teensy/serial_install.exe here].
 +
 
 +
 
 +
 
 +
 
 +
{{Devices_Sidebar}}

Latest revision as of 01:22, 19 August 2019

Summary: Adapter for 32bit Arduino boards
Author: Bonno Meddens
License: LGPL
Platforms: Linux, Mac, and Windows
Since version: 1.4.23 - 20190731
Automated Serial Port Setup: Yes
Peripheral device discovery: No
Wiki page: Bonno Meddens
Nico Stuurman

The Arduino32bitBoards device adapter contains extra features compared to the regular Arduino device adapter.

Currently the Teensy 3.5 is the recommended board to be used with this device adapter, bur there is also firmware available for the teensy 3.2, ESP32 and feather M4.

Differences compared to regular Arduino Device Adapter:

  • Two extra output channels to a total of 8
  • Added Pulse-width modulation (PWM) control
  • Unified DAC and PWM
  • Unified digital-out channels and DAC/PWM channels, this allows DAC/PWM blanking on all 8 channels
  • Changed unit of DAC/ PWM from "Volt" to "Power %" and the default scale to 0-100
  • In the Firmware: Channels 1 - 2 are by default DAC channels, channels 3-8 are by default PWM

Advantages and Disadvantages of Arduino 32 Bit-boards in general

Advantages:

  • Much faster, because of higher clock speed and more work performed per clockcycle.
  • Baudrate increased to 500 000, nearly 9 times the transferspeed between Arduino and Micro-Manager (there are some exceptions). This can be even increased to 2 000 000, with micro-manager 2
  • Most 32-bit Arduinos have a build-in DAC (max 3.3V output)
  • Higher PWM frequencies and PWM bitresolutions
  • More flexibility with pins used

Disadvantages:

  • Most are not 5V tolerant, this means you'll need voltage level converter when using the triggerpin. It is recommended to use Teensy 3.5 since this board does have 5V tolerant inputs. When using a not 5V tolerant board it is recommended to use a voltage level converter like this one link or this one link
  • Library support might not always be great

Arduino boards information

Firmware code for these boards can be found on Bonno Meddens github repository.

ESP32

  • Baudrate: 115200
  • DAC1 on pin 25 and DAC2 on pin 26
  • ADC not implemented
  • Able to set PWM frequency and Resolution
  • Low Price boards available
  • KEEP IN MIND: NOT 5V TOLERANT!!
  • Pins used:
    • Trigger: Pin 5
    • Channel 1: Pin 25 (DAC)
    • Channel 2: Pin 26 (DAC)
    • Channel 3: Pin 27 (PWM)
    • Channel 4: Pin 15 (PWM)
    • Channel 5: Pin 14 (PWM)
    • Channel 6: Pin 4 (PWM)
    • Channel 7: Pin 23 (PWM)
    • Channel 8: Pin 19 (PWM)

ItsyBitsy M4

  • Baudrate 500 000
  • The ADC does not work at the moment because of DAC implementation
  • 12 bit PWM
  • KEEP IN MIND: NOT 5V TOLERANT!!
  • Pins Used
    • Trigger: Pin 5
    • Channel 1: Pin A0 (DAC)
    • Channel 2: Pin A1 (DAC)
    • Channel 3: Pin 6 (PWM)
    • Channel 4: Pin 9 (PWM)
    • Channel 5: Pin 10 (PWM)
    • Channel 6: Pin 11 (PWM)
    • Channel 7: Pin 12 (PWM)
    • Channel 8: Pin 13 (PWM)

Teensy 3.x and 4.0 Boards

  • All 3.x boards
    • Able to set PWM frequency and Resolution, for more information link
    • At least one DAC
    • handy: Pinouts page
    • Baudrate 500 000


  • Teensy 3.1 & 3.2 (96 Mhz)
    • All currently used pins in the sketch are 5V tolerant
    • Only one DAC on pin A14
    • Current PWM frequency: 11718.75 Hz
    • Pins used:
      • Trigger: Pin 2
      • Channel 1: Pin A14 (DAC)
      • Channel 2: Pin 20 (PWM)
      • Channel 3: Pin 3 (PWM)
      • Channel 4: Pin 4 (PWM)
      • Channel 5: Pin 5 (PWM)
      • Channel 6: Pin 6 (PWM)
      • Channel 7: Pin 21 (PWM)
      • Channel 8: Pin 22 (PWM)


  • Teensy 3.5 (Recommended) & Teensy 3.6
    • All currently used pins in the firmware for Teensy 3.5 are 5V tolerant
    • KEEP IN MIND: Teensy 3.6 is not 5V tolerant!!
    • DAC1 on pin 21 and DAC2 on pin 22
    • Current PWM frequency: 14648.437 Hz
    • Pins used:
      • Trigger: Pin 2
      • Channel 1: Pin A21 (DAC)
      • Channel 2: Pin A22 (DAC)
      • Channel 3: Pin 3 (PWM)
      • Channel 4: Pin 4 (PWM)
      • Channel 5: Pin 5 (PWM)
      • Channel 6: Pin 6 (PWM)
      • Channel 7: Pin 7 (PWM)
      • Channel 8: Pin 8 (PWM)


  • Teensy 4.0
    • KEEP IN MIND: not 5V tolerant!!
    • Very fast
    • Does not have a DAC
    • Current PWM frequency: 468750 Hz (At 7-bits)
    • Pins used :
      • Trigger: Pin 8
      • Channel 1: Pin 23 (PWM)
      • Channel 2: Pin 15 (PWM)
      • Channel 3: Pin 3 (PWM)
      • Channel 4: Pin 4 (PWM)
      • Channel 5: Pin 10 (PWM)
      • Channel 6: Pin 9 (PWM)
      • Channel 7: Pin 6 (PWM)
      • Channel 8: Pin 5 (PWM)

Installation and Drivers

This Section is an overview of the installation links for Arduino and the respective boards

Arduino IDE

Arduino offers two solutions, an online editor and a local Integrated development environment (IDE) program. It is recommended to use the local IDE software. The page for the software can be found here.

Adafruit

Adafruit makes two programming environments to use on their 32-bit boards. One is circuit python and Arduino. Circuitpython currently doesn't work with micro-manager. Guide for installing the Adafruit Feather M4 board can be found here. Just the driver can be downloaded from here. This also includes multiple drivers that work on many other boards as well.

Esp32

ESP32 arduino core installation link can be found here. Also when using an windows version older than Windows 10 driver installation might be needed. There are two types of USB to serial chips used with each their own driver. If you are not sure what IC is used just install both drivers.

These two are the most common type of drivers:

Teensy Boards

Teensy requires its own installation software that can be downloaded here. Just the drivers can be found here.



© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact