Archives

Building a microscope

vlcsnap-2016-10-14-15h48m11s828

I recently bought on aliexpress a powerful (and cheap) microscope. For 15 bucks however, the feature set is quite limited and it has no autofocus, meaning the body needs to be moved to put things in focus. As the official support has 2 ball joints, it’s almost impossible to be accurate : when moving focus, you end up moving the sample and must restart. On top of this, it’s almost impossible to do any kind of fine tuning and the microscope has very low depth of field, requiring displacement in 10th of mm for focus.

I decided that building a body where I can accurately change focus would be my October monthly hack. It was completed in October and was super late for posting… Let’s call it a Novctober hack.

Concept

As usual, I’ll be using a share laser-cutter and 3mm thick mdf. The laser cutter is free for use at work and mdf is the cheapest material you can find for hacking around.

My idea is to lock the body of the microscope into 2 rings and use a carriage that can slide on vertical rails. Actual movement will be done using a threaded rod. Looking at my stash of junk, I’ve seen that I have a 1m long M6 rod. I also happen to have a set of M6 nut from a previous project that I can easily embed. To avoid putting too many constraint on carriage, a single nut will be used to do the translation, from the bottom.

For reference, this means that:

  • the hole must be 6mm diameter
  • the equivalent nut is an hexagon, 10mm flat to flat
  • the thread is 1mm per rotation

Open questions:

  • The amount of space needed for the carriage to properly slide is quite unknown to me. As the mdf is actually slighrly thinner than 3mm, I’m going for 3mm and no margin, and will sand/grind the relevant pieces if required.
  • not sure the amount of force (torque) required on thread to move the carriage and device. Assuming I won’t need additional torque and can directly turn the raw rod with finger. Some lubrification might be needed at some point

First prototype

The first prototype proved it was a viable concept, it however showed some limitations.For reference, it’s based on v10 of the fusion 360 file

  • the amount the carriage can travel is too small, the body needs to be much bigger
  • the lack of back plate means the body was not sturdy enough and could shake / shift (parallelogram disortion)
  • the holding ring are not compelled to stay horizontal, need to add orthogonal pieces
  • Having a removable support for sample would be nice
  • One of the component was badly extruded and lacked a hole

What confirmed worked well:

  • the carriage slides without issue
  • the hole is the correct size
  • the overall concept works

Second prototype

Rework is implemented in v14 of fusion 360 model, the actual printing can be found in this commit on the usual bitbucket repository, in this file. The print uses roughly an A4-sized sheet of mdf, all included.

img_20161014_140214 img_20161014_140325 img_20161011_145901

After building, quick summary:

  • despite having longer range of motion, still unable to focus at lower zoom, would need several more centimeters
  • the back plate has 2 holes which are not the same side, forgot a constraint in the design (just an aesthetic issue)
  • the carriage works fine with the redesigned model, the nut needs to be glued though because it’s not heavy enough to go down with gravity
  • while glueing the sliding bar, I pressed them too much and the carriage could not slide any more. had to sand quite a bit of material to make it work
  • the holding tray worked well

Reference for assembling

I decided to sand all pieces, to give a smoother feeling. I sued Grit 600 for starting then finished with Grit 1000.

Pay attention to the following tricks for glueing / assembling:

  • sliding bar needs to stay parallel, don’t over-constraint while glueing
  • to help aligning the 2 bottom plates, use the vertical sliders
  • Don’t glue the full body before inserting the sliding part
  • I used 2 nuts locked against each other to prevent the threaded rod from moving

Some more

After a few minutes of usage, the lighting of the microscope failed probably linked to a deficient solder. Wiggling the cable helped for a while, but I have limited hopes. However, worst case, it’s still possible to use external lighting so it’s still usable.

The device itself exposes as a video device, I could use it from Linux (/dev/video) and Windows (as a directX  input device). The pictures below have been taken using VLC (open capture device in the file menu) then use video/snapshot to get pictures.

Some pictures for reference, overview of a feather from my bird.

 View of the feather, for scale.
This is a standard post-it and a standard sd card
img_20161014_155509
 Minimal zoom, I didn’t have enough distance for focus, so I used the empty bottom of the microscope to actually make it higher  vlcsnap-2016-10-14-15h50m57s657
Some more zoom on the top of the feather vlcsnap-2016-10-14-15h53m00s405
Maximal zoom on the tip of feather, using the removal tray.

The background is wood fiber from mdf, field of depth is super short.

 vlcsnap-2016-10-14-15h48m11s828

Lessons learnt

  • despite having a full 3D model, 2 iterations were required and it’s not perfect, dynamic mechanics is (unsurprisingly) much hard than static
  • the reliability of a component sourced from China for 15$ is on-par with expectations

Some more pictures

The following pictures are, in this order:

  • a 1 dolalr us bill, zoom on washington’s head
  • the backplate of my phone
  • a mechanical watch
  • the atmega328 on an arduino mini
  • a SMC resistor from an ESP8266

References

Legal

This post and the related original works and pictures are covered by the creative common licence, CC-BY-SA.

Box for GoPro batteries

 

IMG_2200I recently bought a GoPro and wanted to make a box to store the batteries. To be clear, my model is Hero 4 Silver and is using these (AHDBT-401) batteries. It’s easy to find the electrical properties (3.8V DC, 1160mAh, 4.4Wh), not so easy to find the physical size. Here is a quick overview of the key dimensions I noted:

side size top

Out of this unreadable post-it, the important to remember is

  • the full battery measures 36 x 10.9 x 32.5 (in mm)
  • the bottom part of the battery, where GoPro is written measures 30 x 10.9 x 30 (in mm)

The design will be symmetric, to allow to store the battery facing the lid or the opposite side, to distinguish between full and empty ones. I also decided that 4 spare batteries is a good number.

I usually draw my laser-cut design with inkscape but I decided to follow a different path this time. I recently discovered fusion 360, which is free (as in free beer, not free speech) to use for hobbyist. So, for the first time, I did a full 3D model, that can be found here. You can play with the model online and explode it to see the various components.

This is one of my first parametric 3d design, I learnt quite a lot. It’s then definitely time for a pro vs contra using Fusion360 vs inkscape.

Pro fusion 360 / against inkscape:

  • design is fully parametric, changing thickness of material or size of the battery does not involve to restart the design from scratch. I typically had to move from using an m2.5 to a M3 screw (to match what I had in my inventory)
  • you can use standard parts in your design (I used a M3x12 bolt and nut)
  • You got full mechanical constraints, so you can play with your various pieces and check. I discovered an issue that way (there was not enough place for the nut) and avoided a prototyping iteration
  • There is friendly support on forums and a lot of very well made explaining videos (tutorials) on a youtube channel.
  • There is a CAM module, to do machining with a CNC (not tried yet)
  • the web viewer has support nice features. You can explode the components, select specific components (using design button, top left). Time to check the model again 😉

Pro inkscape / against fusion 360

  • inkscape is open-source, uses a standard format, stores locally. This allows to use version control and have lots of freedom (and is future safe)
  • fusion 360 has a 1-year long license that you can renew, courtesy of autodesk and is storing its data in autodesk cloud. It might stop at any time, locking you out of your own designs or forcing you to pay an (expensive) license
  • inkscape’s use of splines is more common for computer users (rather than bezier)
  • Doing a full 3D model currently takes me ~3x more times than drawing in inkscape. I think on complex design, the reduction in the number of iterations evens this out.

Overall, I’m super glad I tried Fusion 360, it’s quite easy to use and has super nice results. side

About the design itself, I wanted to have a design with a lid and it’s the first time I really have moving components. the trick I used was to deport the axis of rotation on the top-left to make the rotation work.

I used 2 bolts and nuts for the rotation (M3x12). Tightening them is enough to have a lid not opening.As usual, the box is also posted on thingiverse.

For bragging rights, some more pictures:

IMG_2171 IMG_2151 IMG_2206 IMG_2203

 

 

Screen/laptop holder

IMG_20151123_191542

Until recently, main screen was resting on thick book to be slightly higher and end up in front of my eyes. As part of a revamp of my setup, I decided it was time for an upgrade.

I had some specific needs:

  • my screen needed to be roughly 10cm higher than desk
  • I have a 5.1 sound system and a gaming keyboard, I wanted to be able to hide cable aas much as possible.
  • I sometime use my desk for home office and wanted to have a convenient place to plug my corp laptop (mac book air), which includes power supply, USB to a hub and screen connector (for some reason, I have a KVM that doesn’t want to work with my setup, the probable culprit being my keyboard and its >500mA requirement…)

Having the requirements, I headed to inkscape and here is the result, while assembling:

IMG_20151123_182804IMG_20151123_182811

and once installed:

IMG_20151123_191551

As usual, the design files can be found on bitbucket (I was lazy to put it on thingiverse as it requires lots of material). Design document with all my gory details and cutting document. The numbers identify how many time each piece must be cut, F means Front and B means Back (to help with assembly). As usual, licence is CC-by-SA.

I had to slightly file the edges wto help with assembly, glue everything together and that’s all, no major trap. It needs to be cut out of 3mm thick material (I used plywood but acrylic could work). The laptop holder is 2cm thick, which is ok for a mac book air or a mac book pro.

The things to potentially improve:

  • the vertical layers are a bit weak and bend, adding additional constraints or thicker wood my help
  • holes at the bottom to help routing cables would definitely help (on the horizontal tray)

So far, pretty happy with the result, ready to use it!

Designing gears with inkscape

For a hush hush project, I need to use gears and I plan on designing and laser printing them.

Theory

I found this old article which explains a lot on how to make gears with (older) inkscape. It relies on the following technical reference. With new version 0.91, things have been a bit simpler.

Unit can now be express in human readable values (i.e. mm). To make gears compatible, you need to use the same circular pitch – let’s use 5mm.

I want to have a 2x transmission ratio : let’s build a 12 teeth gear and a 24 one. I’ll use a turnion as axis, 8mm central hole is then fine.

Gear Teeth Pitch Diameter
Gear 1 12 teeth*p/pi=12*5/3.1415=19.09
Gear 2 24 teeth*p/pi=24*5/3.1415=38.19
Gear 3 18 teeth*p/pi=18*5/3.1415=28.65

Distance between gears is (Di+Dj)/2

Gear 1 Gear 2 Gear 3
Gear 1 19.09 28.65 23.87
Gear 2 28.65 38.19 33.42
Gear 3 23.87 33.42 28.65

 

Inkscape

Render the 3 gears using the extension: Gear_plugin

Prepare guides to hold support. Motor gear will be Gear 2, offset 100mm. Keeping some space for security (0.3 mm), secondary gears will be Gear 1, offset 100-28.65-0.3=71 and Gear 3, offset 100+33.42+0.3=133.8. Using an horizontal line and snap on center on bounding box, you should end with something like that.Gear_Create_guide Gear_virtual_assembly

Move the gear parts to a dedicated layer, hide it and start with a fresh one. Use my plugin to create the holding box. You’ll want a holding box whose internals are roughly: 95*46*16 (we’ll be using 3mm thick plywood, 16= 3*5 + 1mm margin)Gear_Cut_box

Duplicate the top and bottom lid, prepare holes (9mm) fot the secondary gearsgear_bottom and front

Control will be done using a sg-90 servo (or a chinese equivalent). Mine require a rectangular hole of 23×12, axis is 6mm from top. Prepare hole and drill it.

Set drawing to 0.1mm red (cutting), 0.1mm blue (engraving, used for center of drill) and coloring to yellow pale, copy everything to a new layer and setup on page:gear_to_cut

Test

I cut the prototypes and have a first round of feedback:

  • It’s working !
  • My drilling indicators are wrongly place (for servo), need to measure better, easy to fix
  • The offset I used to allow cranking (0.3 mm) is too much, as the laser itself as a few 1/10th of mm thickness. 0.1 would have been enough (or even 0)
  • Assembly is non trivial, I need to order additional hands
  • I didn’t fully assemble it so there is no picture (just snapped the pieces together to check)
  • The real version based on this proof of concept worked 🙂

Piggy bank for kids

IMG_20150603_171909My kids are old enough to have their first coins and they were begging for a piggybank to stash their valuables. I had the idea to build them an actual treasure chest, out of plywood.

The final design is available on thingiverse, this post will focus  on how to design and build it.

Design

IMG_20150604_092549
Cutting ongoing

I used Inkscape to do all of the design from scratch. The first step was to guess dimensions on the box: I knew I wanted a “round” lid, made of multiple planks held on a structure.

I knew I wanted to use 3mm thick plywood or MDF (basically, what I had readily available). I decided to have 9mm wide “planks” (to have holes nicely in the middle). I knew I needed an odd number of planks on the top of the chest. After some tweakings in a google sheet docs, I found that 9 planks gives a nice internal radius of 26mm (rounded in mm). ratio width/length is based on the golden ratio (when in doubt, use that).

IMG_20150604_093850
Cutting done

The trick with laser cutting is that you don’t have to plan for margin in the assembly : the laser itself is wide enough to have “tight” links when building things together. as we use 9 planks, the top is a 18-gone, cut in half. I heavily rely on guides to be accurate, using snaps.

The bottom of the chest is a simple box, made with my Inkscape plugin and tuned to have “feet”.

All of the other pieces are done using guides for precise measuring, binary operations and cloning. The svg document in thingiverse has a lot of hidden layers which show most of the creation process (at least, a dump of my brain)

Assembly

A few pictures are better, a more detailed text description is available in the thingiverse document.

IMG_20150604_094225IMG_20150604_094426IMG_20150604_094810  IMG_20150604_095300IMG_20150604_100027 IMG_20150604_095605