Gian Pablo Villamil

Gian Pablo Villamil

Solving new problems in video, electronics and strategy

Gian Pablo Villamil RSS Feed
 
 
 
 

Variable rate time-lapse video using motion detection

As part of a larger project involving timelapse video, I developed a technique that uses motion detection to identify frames for capture, and skips over frames where nothing is happening.

YouTube Preview Image

The video on the left implements this technique. You can see how it works, by skipping the stops at the stations in the video. The video on the right is original source video, sped up to match the duration of the video on the left. You can see that it does not skip the stops at the station.

I implemented this in Max/MSP/Jitter. The basic algorithm keeps track of the last frame written, and constantly compares the incoming video feed with that frame, calculating a constant difference score that tracks not only the number of differing pixels, but also the amount of difference. When this difference exceeds a defined threshold, then it captures that frame.

Comparing against the last frame captured, instead of simply the previous frame, ensures that even gradual changes will be recorded.

Things I have learned (part 3)

Yet more random learnings…

  1. On long trips, driving at around 55 mph will get you to your destination faster and more relaxed than by speeding – fewer fuel stops outweigh the greater speed
  2. Before asking questions, ask yourself if you really want to know the answer, or if you’re just showing off
  3. Get duplicates of any key toiletries (toothbrush, deodorant) and travel accessories (phone chargers, plug adapters) and keep them packed, next to your suitcase. This way you can pack for trips the night before and still brush your teeth before going to the airport.
  4. Telling someone to “just be yourself” is rarely good advice. However, telling them to pretend to be someone else opens up the door to learning and transformation.
  5. Never buy just one tube of toothpaste. Get two or three at a time, you’ll run out less frequently. Same goes for toilet paper, buy the jumbo pack.
  6. Change only one variable at a time
  7. Whenever you’re trying to get something done with a group of people, communicate constantly. Communicate more than you might think is necessary.
  8. You can’t make anything from a good mango that is better than that. Just eat it raw.
  9. Once you get started on a difficult task, it will seem a lot easier.
  10. Memories are startlingly inaccurate. Keep records. Revisit them and be surprised.

Making a Makerbot (part 5) – Kapton and Makergear nozzle

Last time I checked in, I had added the heated build platform and a Paxtruder to the Makerbot. However, things were not quite perfect: things were not sticking to the platform, and I kept getting occasional jams in the nozzle. I could tell things were not quite moving, because I could see the filament “snaking” in the extruder body.

The first problem was solved easily: ordering a roll of 4″ wide thin Kapton tape from here. It just about matches the width of the build platform, adheres easily, and most importantly, hot ABS sticks to it like there’s no tomorrow, with no need to sand it or otherwise prepare it.

For the second issue, I turned to the increasingly vibrant 3rd party Makerbot parts market, and ordered a Makergear plastruder. This is a replacement for the Makerbot nozzle, which makes a number of important changes to the design, including a stronger PEEK insulator instead of the existing teflon, a ceramic heating element instead of wrapped nichrome, and a much heavier nozzle head.

New Kapton and Makergear nozzle

New Kapton and Makergear nozzle

The Makergear nozzle comes with a clever mounting bracket, but unfortunately it doesn’t fit my Paxtruder, so I salvaged the big retainer washer from another nozzle, and mounted it the 0ld-school way. Nice how you can get two upgrades from completely different sources to work together.

These two elements have led to really reliable printing – don’t need a raft, and no filament jams. I printed one half of the Blender monkey, and was pleased with the results. I had been printing slightly hotter than necessary to try to prevent jams, and now I think I can dial the temperature down a bit.

Suzanne the Blender Monkey

Suzanne the Blender Monkey

I’ll print the other half of the monkey later. I accept it will come out better, less floppy ears…

Making a Makerbot (part 4) – Paxtruder

An area that causes problems in the Makerbot is the filament drive mechanism. It has to be adjusted just so, or the filament will get jammed or strip.  The system that keeps the filament engaged with the drive wheel is an acrylic idler wheel, which is sometimes uneven or wobbles. Also, the adjustment for idler wheel clearance is finicky, requires two tools (hex key and wrench) and can’t be made while the Makerbot is operating.

Fortunately, there is a lot of great innovation on this front: a fellow called Charles Pax has created the Paxtruder, which uses a Delrin piston and a screw mechanism for the filament drive. Another member of the Thingiverse community, inspired by this, has created a version of the Paxtruder that is a drop-in replacement for the original extruder body, and uses many of the same parts.

A friend of mine very kindly offered to laser-cut the acrylic parts, and I machined a scrap of Delrin to make the pusher, and now I have my very own Paxtruder:

Drop-in Paxtruder in place

Drop-in Paxtruder in place

It looks great, and works great. It is trivial to get the filament driver pressure exactly right. In addition, the design of the Paxtruder makes it super easy to remove the motor (to clean the gear), and to remove the nozzle assembly. I highly recommend it as an upgrade to the Makerbot.

Assembled Paxtruder

Assembled Paxtruder

This whole process reflects the power of Open Source hardware: many of the enhancements I’ve made to the Makerbot come from the community, which is empowered to innovate and share. Some of the enhancements can even be made using the Makerbot itself, in a virtuous cycle of machine evolution. Eventually these improvements get rolled into the current production model of the Makerbot. I suspect something like the Paxtruder will be the basis of the upcoming Mk. 5 extruder.

Things I have learned (part 2)

Here’s another batch:

  1. When someone asks if you know something, a simple “yes” is rarely the best answer. Stating what you know and confirming it is better.
  2. Constraints increase creativity
  3. Doing things, however imperfectly, has an effect. Just thinking about things does not.
  4. Dessert recipes in English almost always benefit from halving the amount of sugar in them. (This is not always true for recipes in other languages.)
  5. You are not aware of the effect alcohol has on your mind, body and personality until you give it up for a month – and it’s greater than you think.
  6. Travelling to do something or meet someone is more memorable than travelling to see something
  7. When working with someone skilled in another domain, try to learn enough of what they do to be able to have an informed conversation.
  8. Children are not little adults, their lives have an internal logic of their own which should be acknowledged.
  9. Fatigue is often a symptom of dehydration – drinking water is sometimes more effective than coffee, or a nap.
  10. Paying attention to a safety briefing is always a good idea: the downside might be a few minutes wasted, the upside might be saving your life.