Upgrade weekend

This weekend was planned in for upgrading the Mitochondrion from version 3.4 (frequently crashing, really shagged batteries, broken bits) to 3.5 (made entirely of happy kittens). Umm… So I did some of that and some relaxing, for once in my life.

See the middle bit that’s made of four bits?

That’s a washer. It squeezes the black bit (a rubber o-ring) against the outer tube. That’s how the Mitochondrion stops it’s guts from falling out. It took six bloody hours to make and that’s why I want a decent workshop where I can churn things like that out in half an hour.

See the lighty up bit?

That’s the test load on the power regulator, which is the rest of the gubbins on the board (MAX756, for those that care). Battery power can be anything between 2 to 5 Volts depending on how shagged the batteries are and what else is going on. This turns shagged battery power into a nice, steady 5 Volts for the microcontroller that runs the Mitochondrion. I’ve not had a good record building these, but this one has yet to die. Next step is two more tests, then hopefully an install.

New batts? Not this weekend, and week is looking pretty full already. Then again, we did steal the dog and go find this:

25 thoughts on “Upgrade weekend”

  1. I like to think of it as borrowing.

    Also, weren’t there supposed to be pictures of you on this blog this year? Where are they? Enquiring minds want to know.

    1. The borrowing was just a cover story so you didn’t notice the stealing. Yup.

      And as for the pics, well people had better take then, hadn’t they? (I have short arms, that’s my excuse for not doing the myspace pose.)

      1. When other people take the photos, they are then on the other people’s cameras, which involves them doing the donkey work that gets them to your possession, where you then may or may not post them to your blog.

        Most cameras have a timer function these days, and you just built a shiny toy in your kitchen sink.

        I do not accept your excuse.

    1. Is 4 NiMH => 5V. This is strongly advised against. I want the microcontroller to still be running when the battery voltage drops.

      Currently, microcontroller dies around 4.5 V but LED drivers don’t die till 2.3 V, hence failure mode where microcontroller dies, LED drivers stay on and batteries get flogged to death.

      Charger is a wall plug, coz I didn’t think I could solder in a USB port when I was building the ports. Charger for mark 4 might be USB, if I can get enough current through the port, coz mark 4 will have a phuge Li battery.

      1. I was interested as the DDJ currently runs on 2 x NiMH, which is 2.4v nominal, 2v discharged, 3.2v peak.

        My circuit needs diodes in various places (to separate battery from external power) and so I run into a problem that the regulator can’t cope below about 2.8v (equating to 2.4 at the regulator input).

        If I put a second battery in, I’ll have 3.6v / 3v / 4.8v which should be fine on discharge, but I’ll have a problem getting to full charge because I only have about 4.2v on the other side of the charge diode to play with.

        A 6v non-USB battery charger would sort it, but I’ve whinged too much about non-standard chargers to perpetrate one in a production device.

        1. When I was kicking around ideas on how to structure the power supply for a very very early prototype, I came across the same problem. I wanted to put a diode in place to ensure polarity, but the voltage drop is a bit steep from most diodes.

          One way around that is a P-Channel MOSFET, they’re considerably lower loss than a diode, and they aren’t too physically big either. I hadn’t actually built it, but it seems like there’s good data on using them that way.

          1. Hey, thanks for that! I accidentally found that configuration, but wasn’t going to use it because the datasheet had a typical If of 1A. But I looked further to make sure I wasn’t being stupid, and that’s at 18.6A – at low current it’s in the .5 volt range, which I think I can live with.

            It’s still no better than a Schottky diode, though.

        2. You’ll want everything running off regulated power, so why not one big step-up to something like 6 Volts plus, then individual step-downs for each voltage that you need? This gives you a good separation of battery (&charger) voltage from circuit voltage. Efficiency will take abit of a hit, but step-ups and step-downs are pretty efficient to start with.

          1. Yeah, but that’s another dc-dc converter, and its discretes (which cost more and use more space than the chip).

            I’m surprised you can’t buy a battery charger + regulated PSU in a single chip, but haven’t found one.

          2. True, but how much current are we talking about here? The above regulator is 5V, 200 mA, and it’s approximately thumb-nail sized.

            It’s only so grunty coz of the op-amps. If the current is under 100 mA, then you could go for something charge-pumpy and the externals are just three caps or so.

            And yeah, as for single chips, there’s a lot out there but rarely quite the one you need. I want:
            a) an audio spectrum analyser on a chip in a solderable size, with voltage outputs for each channel, not PWM
            b) a lithium battery charge monitor that can cope with forty cells in parallel

            Can I find them? Can I coco.

          3. I need 300mA for the NiMH batteries (900mAH, charge at up to C/3). My approach is to use the CPU to work out the PWM duty cycle to give this from nominal USB voltage and measured battery voltage.

            If you want to analyse audio spectrums, I think you’re headed for an ARM core – that could run FFTs or digital filters at a reasonable rate.

          4. Much as I could get some mega-mip core running an FFT, I’d really rather hand that off to something simpler. I did find a single-chip solution for this, but it was:
            a) LLP and 3 mm square
            b) only three channels
            c) gave the results as PWMs, which is fine for controlling one RGB LED, but not for feeding back into the microcontroller that’s individually controlling a hundred RGB LEDs

            I could go for bandpass filters, I know I can manage four channels in one package (e.g. MAX274) and then just an RC to hold the value for the 5 ms that it might take for each ADC to get around to reading that channel. But then again, that route requires a whole bunch of actual electronics to get it to work and my knowledge of analog circuits is pretty minimal, considering what I’m trying to do.

          5. As Rich commented, you can do PWM->digital conversion using one of the timers in input compare mode. It’s probably the most accurate way to do it, but interrupts is another. Just be aware you are generally limited to few external interrupts on a lot of the Atmel chips, and annoyingly on the one I’m using, two of the three are overloaded on a USART’s RX/TX.

      2. BTW, ATmega* stuff generally runs down to 1.8V (certainly 3.3V, but I think 1.8V is an option on some parts), although you are clock-limited if you do so to 8-10MHz. However, since that’s really 8-10 MIPS (since they are pipelined cores), it’s still a decent clock speed.

        Something to keep in mind for 4.0 🙂

        1. 4.0 will be lithiums, so base voltage of 3.7. The LEDs & drivers will be running off the raw battery power, coz they’ll be pulling silly currents. The regulated power will just be for the logic and sensors. While I’m tempted to run the lot at 3.3V, there’s an audio op-amp that’ll benefit from having 5V supply to give a decent range on the ADCs. Also, the battery voltage gets kicked around like abitch when I switch on a hundred-plus LEDs all in the same millisecond, so I’m thinking that the further the regulated power voltage is above the voltage that’ll make the microcontroller die, the better.

  2. I’m sure you probably already know, but that there’s that ponoko.com place in the city. You could get all those washer type things laser cut in clear acrylic or something… it’d look really awesome actually.

    1. Now that is actually a really awesome idea.

      I’ve been scratching my head trying to work out how to do the ends for the Mark 4, trying to fit in all the bits, make the connections easy, keep it strong enough and still make it manufacturable. For bonus points I wanted to find some way of lighting the connectors, for ease of use in dark fields. I think you’ve just cracked it.

      So, plan for Mark 4 is a stack of acrylic disks, with all the holes needed, accurate, lined up and just a piece of piss. Thanks very much.

      1. Perfect. I’m sure you could get every part necessary for the whole thing all on one reasonably sized piece of acrylic. If a part needs to be thicker, you could always make it out of multiple pieces of acrylic with alignment holes. Stack them and bond them (acrylic bonds easily enough)!

        I plan on getting a case cut for the clock I designed, but the PCB still hasn’t arrived from pcbcart in 3 months.

        1. Yup, a trial layout suggests I can get it all on one of the small sheets. There’s going to have to be many layers, coz in one end there’s got to be a counterbored hole for a bolt, space for a microphone that doesn’t overlap the bolt head, a micro-USB sockey (probably), an o-ring and some flats along the length where two PCBs attach. Maybe five pieces, possibly seven. Hopefully they’re all the same thickness, otherwise there’ll have to be more pieces. But hey, the laser’s cutting them, it’s not my prob!

          1. yeah man, exactly.

            I’m curious what software you’re going to end up using for it. Some sort of CAD software would be perfect, but on the website I just see them supporting regular vector graphics stuff. Then again, I’m sure most CAD software can export to SVG or something?

            I just bought a used digital camera that can be reprogrammed to do time lapses pretty damn easily (http://chdk.wikia.com/wiki/CHDK), and I think I want to build a 2 axis motorized tripod head for it (or at least 1 axis..), so I can program it to move x degrees in y minutes while I’m doing the time lapse. If the idea for the tripod head still seems cool after a few days, I’ll probably do acrylic pieces from ponoko for it.

          2. The only format they take in is EPS. With CAD, it’d be a case of draw it up, section it, then convert those sections. I don’t know what you’d use for that, but I expect it’s not too tricky.

            Nearly ten years ago I had a job coding internals for CAD packages. I had copies of Solid Works, Solid Edge and Unigraphics just sitting on my desk and I got passable at Solid Works. Nowadays, I’m a tad rusty and for the end assemblies, it’s going to be feasible and easier just to draw the slices up directly in Inkscape.

            Easier but not as much fun.

Leave a Reply

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