miniMO's no-frills, laid-bare design makes it, as someone once said, eminently hackable -it is trivial to mod with, say, a different LED light, or female instead of male pins for the inputs/outputs. Here are a number of interesting hacks that allow miniMO to do things beyond its original specification -even things it's not supposed to do at all!
Due to their very nature, understanding these hacks requires having various degrees of familiarity with miniMO; some of them apply right away and require no programming whatsoever, so you should find useful information here regardless of your experience.
Mix audio from several modules without a mixer
- How-to: (Example with three modules, A, B, and C from left to right)
- Connect one of A's outputs with one of B's outputs
- Connect B's free output with one of C's outputs
- You can take mixed audio out of the free outputs in A and C
- Why it works:
- I/O 1 and 2 fork from the same path, so if you add a signal to one, you hear it in the other, too. When you connect I/O 1 or 2 in one module to I/O 1 or 2 in another module, they form a voltage divider and merge their outputs evenly
- Tradeoffs:
- Every module you chain dims the output of the group
Power up external peripherals
- How-to:
- Bridge the three pins in the On-OFF switch
- Draw power from the VCC pin in the Programming Header (you can also use the header's GND)
- Tradeoffs:
- You can only use battery power (because you're using the external input as an external output)
- You can only power peripherals that take the same voltage as miniMO on battery (3V)
- Example Programs using this hack:
Use I/O 3 to read sensors
- How-to:
- Connect the sensor to I/O 3
- Use the potentiometer to adjust the value range
- Why it works:
- The potentiometer connects to I/O 3 through a voltage divider, which makes it act as an offset to the input
- Tradeoffs:
- You lose about half the reading range (the potentiometer and external input contribute one half each)
- Example Programs using this hack:
Use I/O 4 as a momentary switch
- How-to:
- Set I/O 4 as an analog input
- Place a finger on both terminals of I/O 4
- Why it works:
- The + pin of I/O 4 is connected to power trough a resistor, and usually reads the maximum value for the range you've set (255 if you're using 8 bits). If you bridge the pins, current flows straight through the resistor and the sensor reads 0; when you use a finger, the resistance of the skin makes a voltage divider with the resistor in the circuit. Since this resistor is 1 Mega Ohm, much bigger than the resistance of the skin, readings drop considerably. You can then interpret the drop as a button being pressed.
- Low Power Beacon
- Why it works:
- Tradeoffs:
- The finger's resistance changes a lot depending on many of factors, so finding a good threshold value to use as a reference takes a bit of experimentation.
- Fast "presses" are unreliable
Use I/O 4 as a latching switch
- How-to:
- This hack works on the same principle as the one before, but instead of using a finger you simply place a jumper on the pins. While the jumper is connected, the input reads 0, and when it's not, it reads 1
- Example Programs using this hack:
- Chiptune Player -Without the pin, it stops at the end of the current song. With the pin, it continues and plays the whole playlist in a loop
Use I/O 2's raw output
- How-to:
- Bridge I/O 2's positive pin with the microcontroller's pin which is right across from it
- Why it works:
- The audio signal usually goes from that pin to the output via a simple audio filter, but since they are next to one another and neatly aligned, it is easy to bridge them and bypass the filter, thus allowing the pin to send data other than audio
- Tradeoffs:
- You can only take the raw output from this one pin in the microcontroller (PB4 in the datasheet), and only from I/O 2 in miniMO
- Example Programs using this hack:
Repurpose the Programming Header
- Though the header was originally intended for programming miniMO, it provides you with useful connections to several pins:
- With GND and VCC you can power up external peripherals, as explained above;
- With SCK and MO you can access I2C peripherals (like the display in the examples above). This alone opens a wealth of possibilities
- SCK connects to I/O 4, so it could act as an auxiliary input
- MI connects to the switch line, so you can use it to send external triggers
- MO connects to the LED output line, so you can also use it to send external triggers (e.g. in a program where the LED responds to peaks in the level of an input). Now, you can do PWM with the LED -food for thought 😛
- RST connects to the reset line. It is possible to repurpose that line to be another input using a high voltage programmer