Mitochondrion Mark 4.2 Build Log: The inevitable stage where nothing works

The Mitochondrion Mark 4.2 build is getting to the fun part, the bit where pretty much none of the parts work. However, there are at least parts that don’t work, as opposed to no parts. This counts as progress.


1) The new main board holds all of the electronics and connects them up. The board itself has been made, is currently in the post and, when it arrives, the soldering begins.

2) The centre section of the metal spine needs to be remade. It’s full of bolt holes aligned with the Mark 4.1 main board, but the Mark 4.2 board has holes in different places. Adding those holes to the existing spine would end up with some very weak points, so two new bits of aluminium needed. This is the most trivial task – cut, bend, drill, tap & countersink.

3) There’s wiring to fiddle with. Bastard wiring.

4) For the software, the task scheduler works. I used the world’s most minimal Arduino task scheduler and added bits. Everything is a task, there’s a list of tasks set at compile time, each task has a time when it will run, and a loop just ticks through the microseconds to see if any of the tasks can run yet. My brainwave of an extension is just a boolean flag added to each task to see if it should run, as well as if it can run.

5) I think I’ve got the inter-task communication straight in my head. Messages are just a global pool of flags to describe various overall states (is it spinning, is the battery flat, etc…). Every task can change those messages, but there’s a small enough number of tasks that it shouldn’t be a problem. I think I’ve got the design straight, but there’s going to be drawing of arrows and boxes on pieces of paper today until I’m more certain. Then I’ll write some code and it’ll probably turn to custard.

6) The patten generators working from stored images aren’t working, coz the library that reads the memory storage isn’t working coz the library that controls the network that connects the memory to the microcontroller isn’t working. The I2C library uses 8-bit addressing and my 128 kByte EEPROM needs 17-bit addressing, and buggered if I can get that to work. I’ve asked a few people, but seriously, reading an EEPROM from an Arduino? When that EEPROM is more than 32 kB and you don’t want to use the standard Wire library (coz it can lock up the entire Arduino) Grr… Also argh!

7) The pattern generators working from audio seem fine, except the audio amp seems to have a very narrow frequency range. This needs fixing. It might be down to the op amp, but all this involves analogue electronics, where I really have no idea what I’m doing.

8) The BlueTooth module can be seen by BlueTooth devices, but getting data through it isn’t happening yet. More poking needed. Also, turning the bugger on creates enough noise in the audio amp to drown out audio. Local capacitors on the power lines don’t help, so current plan is just to turn BlueTooth off when in modes that use audio.

9) The code to switch between modes… I think it will play nicely with the task manager, but I’ve just got to write it.

10) Getting it all fast enough. Every millisecond matters when you’re wanting to push new patterns out every ten milliseconds. Magnetometer reads take 3, EEPROM reads currently take 0.5 per byte and I’d like to read 48 at a time. All this needs investigating and accelerating, or squeezing into dead time. There’s not much dead time.

I think my next project may involve no electronics whatsoever.

12 thoughts on “Mitochondrion Mark 4.2 Build Log: The inevitable stage where nothing works”

  1. Bigger processor. And no bluetooth – *what* were you thinking?

    And make something easier – a cat scanner for instance or maybe a small hadron collider.

    1. Well, you know, a direct and easy wireless link from phone to Arduino in a sub-20 mm wide package?

      Samsung Galaxy S2’s inexplicably don’t support 433 MHz, ZigBee/XBee, WiFly, ANT+ or any of the other wireless drop-in serial line replacements, so BlueTooth it is, allowing me to be badly burnt by the white heat of technological revolution.

  2. I think my next project may involve no electronics whatsoever.

    Your previous project involved no electronics whatsoever, and you still gave the distinct impression there was much swearing. Just saying.


      1. If you make your next project entirely software, and in the cloud, it will involve no accessible electronics, and no accessible physical things. There will still be swearing though.

        1. Ah well, I’ve done one of those cloud projects. It turned out awesome, frankly quite astounding.

          I’d show everyone, but it’s in the cloud, and, erm… encrypted and stuff.

  3. I didn’t know Wire could lock up the arduino. That’s really inconvenient.
    What does your audio look like?
    My vaguely similar but vastly simpler setup is an electret mic feeding into an LM324 single-stage, biased up to 2.5v so I don’t have to mess with negative voltages. It’s not good, but it seems to be picking up stuff to roughly the limit of the avr’s (and crappy code’s) ability to sample.

    1. The standard Wire library is a hideous dog that regularly takes a crap all over the lawn. The replacement I2C library is smaller, faster, and doesn’t poop incontinently, but isn’t a drop-in replacement.

      The audio amp looks a lot like this design using an LM358. Testing with one of those worked great, wide frequency response from sub-bass upwards. Sadly, I don’t have room on the final board for an LM358, so I’m using a TS951 in an SOT23-5 package. Current testing with a TS951 in a DIP8 on the breadboard looks like it has terribly uneven frequency response, but I’ve not had the chance to dig into why, given that I’ve been spending the time on other parts of the build. There may be simple things I can do to fix it, but task scheduler for brain currently has no dead time to allocate to this process.

      In other news, Arduino task scheduler is making it easy to schedule tasks. I can just tell parts to get on with what they’re supposed to get on with and not have to bother about them again. Which is nice.

Leave a Reply

Your email address will not be published. Required fields are marked *