How to Program miniMO

Attention! If you have a Mac running Catalina, there's no way at the moment to program miniMOs from it (unless you virtualize an older OS). I'll be looking into this shortly. - nov27, 2019

Overview

miniMO can not be programmed directly from the computer; this guide shows you how to program miniMO using an Arduino/Genuino UNO as an intermediary programmer.

Getting Ready

You will need the following items:

  • An Arduino/Genuino UNO, or an ISP (in-system programmer)
  • A computer with the Arduino IDE 1.5.7  installed, and ready to program the Arduino (here's the official guide to set it up)
  • Within the Arduino IDE, you need ATtiny cores:
    • Get the arduino-tiny cores available here. Unpack the folder, search inside for a file named Prospective Boards.txt, and rename it to Boards.txt
    • Follow the instructions on this post to install the cores
  • A miniMO (yep  😛 )
  • To connect the miniMO to the Arduino, you'll need either 5/6 male-male jumper wires (one is optional), or a 5-pin male header and an optional jumper wire. This is the best option, and I use a long angled header because it makes miniMO rest neatly next to the Arduino when connected (see pictures below)

Programming Steps

We'll start with the Arduino on its own, connected to the computer but not yet to miniMO.

Program Arduino to act as a programmer

First we are going to program Arduino so that can itself program a miniMO:

  • Open the Arduino IDE, and within the File/Examples menu, select ArduinoISP (ISP stands for In-Systems Programming)
  • In the Tools/Board menu, make sure you have your particular model of Arduino selected
  • Click the arrow to compile and upload the program to Arduino

Arduino will now work as a specialized programmer to send programs to miniMO.

Configure the IDE to work with miniMO

Up until now the IDE was set up to program Arduino; we'll change the configuration so that it uses the Arduino-as-a-programmer to program miniMO.

  • In the IDE, go to the Tools/Board menu, and select ATtiny85, 8Mhz, internal oscillator. Regardless of the actual writing, you should see only one option that meets these criteria. In my case, it says ATtiny85@8Mhz (internal oscillator; BOD disabled)
  • Now go to the Tools/Programmer menu, and choose Arduino as ISP

Connect miniMO to Arduino

We'll now align and connect both devices:

  • Get the header, and move the black plastic back so that the pins have approximately the same length at both sides of the bend -shorter headers should work unmodified, though these ones have a better grip

    Up: unmodified header. Down: plastic bit moved back -  the metal pins are now long enough to hold to a female header

  • Place the Arduino so that the longest row of female headers is located at its right
    • Locate the pin marked GND in the Arduino in the rightmost header, and insert the male header starting there, from GND to PWM10
    • Place the miniMO with the female header looking to the left.
    • Align the uppermost pin in miniMO with the uppermost pin of the male header, and insert miniMO. miniMO's lower pin won't have anything connected

      detail view

    • If you want to power miniMO from the Arduino, connect a jumper wire from the 3.3V header (5V is also fine, if available), to the free pin, and set the power jumper in miniMO to the leftmost position (external power)

Send Programs to miniMO

Finally, we'll use the IDE to program the module:

  • Make sure miniMO is turned ON
    • If you bought the miniMO from this site, it comes already loaded with a program (usually the DCO), so you should see the LED light turn ON
    • If you are sourcing your own ATtiny chip, click on Tools/Burn Bootloader. This will set the microcontroller to work at 8Mhz running on the internal oscillator, as selected previously (it doesn't actually burn a bootloader, as far as I know). Usually you will do this only once in the lifetime of your miniMO. You will see the LED flash briefly a few times, and then it will be ready for programming
  • Make sure miniMO has nothing connected to I/O 4; you can leave any other connections as they are (if you have something connected, that is)
  • Download the programs from the repository, and open any of them with the IDE
  • Click on the arrow to compile and upload the program to miniMO
    • If you uploaded the Oscillator program, run an input calibration: click the button three times, then move the knob to the rightmost and leftmost positions a couple times

After the initial setup, you will only need to repeat the last two steps (open with the IDE, click on arrow) to send new programs to miniMO.

Troubleshooting

If sending a program fails, most usually it is due to one of two things: miniMO's battery is running low, or you left port 4 connected to something.

  • If the batteries are low, either replace them, or power miniMO from the Arduino
  • If this doesn't work,
    • Unplug miniMO from Arduino completely
    • Unplug Arduino from the computer
    • Reconnect Arduino
    • Reconnect miniMO
    • Send the program again

If you're still in trouble, worry not! see if your problem is listed in the forum and, if it's not, open a new thread; I usually reply within a day or two, and I promise to do my best to help you 😛