MonomeArcClone
A clone of the monome arc that works with serialosc.
Install / Use
/learn @TheSlowGrowth/MonomeArcCloneREADME
Monome Arc Clone
An open source, protocol-compatible clone of the monome arc.
Before you start
Please note: if you encounter a problem, please do not post on the monome forums! Tehn will surely help you, but I don’t want my clone to cause them trouble and work. I’m very happy that they make their protocols open and I would like them to continue to do so in the spirit of openness.
For assistance, please write an email to my address instead: mail@johannesneumann.net I will try to help you out.
Required tools
During assembly and setup you will need the following tools
- AVR ISP programming device (supported by avrdude). I recommend USBasp or any of its clones. Alternatively you can also use STK500v2 clones or any other programmer that supports the ISP protocol. You get something like this on ebay for under 20€.
- Soldering iron, decent(!) flux, tweezers, solder wick
- a computer capable of flashing AVRs and FTDI EEPROMs
- a multimeter
Software installation
Before you start, please install all the software that’s needed to run monome devices. Please look at the instructions provided by http://monome.org. Even though you might not have a functioning monome at this point, we will need the drivers during the setup process.
Install the drivers for your AVR ISP programmer, if you haven’t already.
Windows
Install WINAVR from this link. This will install a AVR compiler and (more important) a tool called avrdude to upload the software to the ATMega88p microprocessor used in the device.
Install AVR-Burn-O-Mat from this link. This little tool will make it easier to upload the software to the chip as it provides a nice graphical user interface to avrdude installed with WINAVR.
Now we need to edit some files. Unfortunately as I am writing this (05.11.2014) it seems that some versions of avrdude and AVR-Burn-O-Mat don’t know the ATMega88p processor yet. So we teach them that it exists.
First, go to C:\WINAVR.......\bin\avrdude.conf and open it with a text editor (I recommend geany).
Search for "ATMega88p". If it takes you to something like this:
#------------------------------------------------------------
# Atmega88p
#------------------------------------------------------------
…then you don’t have to edit anything and the file is fine. Simply go to the next step.
If nothing is found, search for this part:
#------------------------------------------------------------
# ATmega88
#------------------------------------------------------------
This is the header for the (almost) equal ATMega88. We simply copy the whole passage below this line (down to the next similar looking header) and change a few things. The whole passage you have to copy is roughly 200 lines long.
Duplicate the whole passage and change the beginning to:
#------------------------------------------------------------
# ATmega88p
#------------------------------------------------------------
part
id = "m88p";
desc = "ATMEGA88P";
has_debugwire = yes;
flash_instr = 0xB6, 0x01, 0x11;
eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
0x99, 0xF9, 0xBB, 0xAF;
stk500_devcode = 0x73;
# avr910_devcode = 0x;
signature = 0x1e 0x93 0x0f;
pagel = 0xd7;
bs2 = 0xc2;
...
... more stuff follows here ...
...
Now avrdude knows the microprocessor.
Now we have to teach AVR-Burn-O-Mat as well. Go to the installation directory (mine is: D:\Program Files (x86)\AVR Burn-O-Mat) and open the file AVR8_Burn_O_Mat_Config.xml. With a text editor (e.g. geany).
Again, search for "Atmega88p". If it can be found, all is well and you don't have to do anything here. If nothing is found, search for "Atmega88". It should take you to this line:
<AVR name="m88" caption="ATmega88">
<Fuse name="UNUSED_E7" bit="7" ...
Copy the whole block (everything between <AVR name="m88" ... and </AVR>) and change the first line to
<AVR name="m88p" caption="ATmega88p">
Now AVR-Burn-O-Mat can program your Atmega88p processor.
Now open AVR-Burn-O-Mat and go to the settings page. Check if the directories are correct and enter the connection settings for your programmer.

I’m using an STK500V2 clone here, but if you click the dropdown menu, it will give you other options, such as USBasp. For most USB programmers, the Port must be set to "usb" or (if they are based on a serial COM interface) the respective COM port. You can open the device manager and plug in your programmer, then it should display the COM port in brackets behind the device name.

Install FT-Prog from this website. We will need it to configure the FTDI USB chip on the board.
Linux
On Linux, install avrdude using your system’s package manager.
Compile libftdi with the confuse library already present, and make sure you can run the ftdi_eeprom command it comes with. This is currently untested on linux, please refer to this guide for pointers on how to do it.
Mac OS X
Install avrdude, and avr-gcc if you want to compile your own hex files. You can do this either manually, or via CrossPack.
In order to be able to flash the FTDI chip’s EEPROM, you’ll need to install libftdi with the confuse library already installed. This is possible either manually, or using homebrew with a change to the libftdi formula detailed here.
Some old versions of CrossPack will be missing the avrdude reference files for the ATMega88p. You can test this by running avrdude -c stk500v2 -p m88p. If you get avrdude: AVR Part "88p" not found. then follow the instructions in the Windows section above, duplicating the ATMega88 definition for the 88p. Look for an avrdude.conf file to make these changes in, e.g. /usr/local/CrossPack-AVR-20100115/etc/avrdude.conf
USB Board Assembly
I won’t give step-by-step instructions for soldering. If you are not familiar with soldering and electronics in general, please do an easier project first. It can become very frustrating otherwise.
Once you’re done assembling the USB board, go to the device manager (Windows) or USB Prober (Mac OS). Connect the USB board to your computer via the USB jack and install the BUS_PWRD jumper on the USB board. You should see the device manager refresh and a new COM port device will appear.

If it does not appear, please disconnect it immediately and check your soldering!
Now we have to check the voltage of the on-board regulator. Connect a multimeter to the pins highlighted in the following picture:

Your meter should read 3,6V (or thereabouts). Fine, it looks like everything is okay.
Lets go on and flash the firmware to the chip. Connect your programmer to the 10-pin connector on the USB board. This connector is not the one commonly used for AVR devices, but it uses the same pinout and attaches to the same type of cables. You can simply use your programmers 10-pin cable and crimp micromatch connector to it. This should now be plugged into the USB board. Check the orientation. A good help can be the four ground-pins, which are connected to each other. On both the USB board and the programmer. Pin 1 of the cable is on the opposite side. In the image above, it is the pin on the bottom right of the connector, next to the "R14" label.
Also be sure, that the USB board is plugged into your computer as well and the BUS_PWRD jumper is installed, so the processor receives power.
Windows (AVR-Burn-O-Mat + FT_PROG)
Open *AVR-Burn-O-Mat *and connect your programmer to your PC.
First, we need to change the fuse-bits in the processor, to use the external 20MHz crystal as a clock source. Select Atmega88p from the "AVR type" menu. Then click on "Fuses"

In the new window, click "read fuses".

You should see some commands run in the bottom of the main window and eventually a message will pop up, saying: "fuses successfully read". If not: Check the commands in the main window. They can give you a hint to where the problem is. Usually the programmer settings are wrong (wrong COM port...) or the USB board is not connected properly. Some programmers offer a "low speed" programming mode, this should be used, as the processor is currently still running at its internal low clock speed.
If verything is fine, we can edit the fuse-bits to use the external crystal. Click on the "Oscillator/Clock Options" tab, then un-tick "divide system clock by 8" and select the "Full swing crystal oscillator" tab.
Double check everything! You might screw your chip up! Never attempt to write the fuses, if you were not able to correctly read them before. You might end up with a chip that has its programming interface disabled and can’t be rescued even with professional equipment.
Okay, once you are sure, everything is correct and matches the image below, you can click "write fuses" and again, some commands should run in the main window and a message should say: "Fuses successfully written". Then click "read fuses" again. If they can be read successfully, you have done everything right.

Now we can flash the firmware. Close the fuses window and select the firmware file in the main window. I recommend to use the pre-compiled one in the reposi
