top bar


Revision as of 10:57, 9 August 2019 by Nico (Talk | contribs)

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 original [Micro-Manager Arduino firmware] was 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.

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.

The Teensy 3.5 is currently the recommended board. Advantages of the sketches provided in this repo:

  • Works on newer and faster boards, pin registers don't have to be used
  • Easier to adapt since pin registers aren't used
    • This allows PWM + blanking
    • DAC + blanking
    • Possibility to choose different pins
  • No need for external DAC with most boards

Advantages of 32 Bit-boards in general

  • 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

Working Arduino boards:

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
  • ItsyBitsy M4
    • The ADC does not work at the moment because of DAC implementation
    • Channel 8 has become channel 7
  • Teensy 3.x Boards
    • All 3.x boards
      • Able to set PWM frequency and Resolution, for more information link
      • At least one DAC
      • handy: Pinouts page
    • 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)
      • Not yet tested
      • All currently used pins in the firmware are 5V tolerant
      • DAC1 on pin 21 and DAC2 on pin 22
      • Able to set PWM frequency and Resolution
    • Teensy 3.6
      • Uses same sketch as teensy 3.5
      • Faster than teensy 3.5

Boards that do not work with this firmware/device adapter:

  • Esp8266 board
  • Arduino Due
  • Sipeed Maix boards

To be tested:

  • Teensy LC
  • A SAMD21 board
  • Teensy 3.5 (Very likely Works)

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