LabEmbryoCam

An opensource platform for automated measurement of developing animals

The LabEmbryoCam is a project originating with the EmbryoPhenomics research group at the University of Plymouth, UK. It has been made possible by support from UKRI, NERC, BBSRC and Plymouth Science Park

_images/labec_instrument.png
The LabEmbryoCam provides:
  • Automated movement of a camera and lighting in the X, Y and Z direction, over prolonged periods making it well suited to recording the process of embryonic development in aquatic animals

  • A custom user interface for easy setup of experiments, within a multiwell plate format, but also has sufficient flexibility for other culture formats - petri dishes, or even custom culture solutions

  • Incorporates an optional humifidification chamber to significantly reduce evaportation thereby solving one of the key challenges of long term timelapse imaging of aquatic animals

  • Vibration dampening addressing vibration, the enemy of timelapse imaging. LabEmbryoCam incorporates sorbothene feet, 3D printed leafsprings and cable dampeners to minimise its effects on your imaging

  • A low cost, modular and versatile phenotyping platform taking advantage of 3D printed parts, single board computers, microcontrollers, stepper motors and lower cost cameras and lenses

  • Hackability this is an active project - if in doubt about any aspect of this instrument and its suitability to your activities, just ask

The LabEmbryoCam consists of both hardware and software, and the process of building both is described in the following series of pages.

HARDWARE

The LabEmbryoCam instrument is built using 3D printed parts, consumer maker hardware and electronics. It is designed for imaging an area equivalent to the size of a multiwell plate, but could be scaled both up and down. Before attempting to build the LabEmbryoCam you will need to source everything from the Bill of Materials.

Throughout the Build Guide, we provide embedded windows showing the CAD design for the LabEmbryoCam at various stages of the build. We use Autodesk Fusion360 for modelling the LabEmbryoCam, and providing these windows.

Note

The interactive CAD windows allow you to move the model around, zoom in and out, and also strip parts of the model away to see specific details. Try clicking on the full LabEmbryoCam CAD model below and moving it around.

During the build process, this should enable you to see precisely where everything goes - all the way down to individual nuts and bolts. Models may take time to load, so be patient.

3D printing

STL files are provided for the 3D printed parts, and we recommend that these are printed using PETG, or even PETG with chopped carbon fibre (PETG-CF), with a minimum of 3 wall thickness and no less than 30 % infill. Some parts require support from the build plate, for overhangs and screw recesses. Where this is necessary it is specified. You should first make sure your printer is calibrated i.e. a 20mm cube is very close to being 20mm.

Filamentive is an excellent manufacturer of recycled PETG and CF-PETG filament - www.filamentive.com

LabEmbryoCam CAD Model

To build the instrument you will require some basic tools. As a minimum we suggest:
  • Hack saw

  • M2.5, M3,M4 and M5 allen keys

  • Long nose pliers

  • Tape measure

  • Wire strippers

  • Small flat head screwdriver

  • Small philips screwdriver

  • Soldering iron

HARDWARE ASSEMBLY STEPS:

Bill of materials

  • The LabEmbryoCam is built using commonly available and low-cost consumer electronics, mechanical parts and 3D printed parts. Links and prices are provided as a guide, but prices vary and there is also significant scope for changing components, or suppliers due to availability, price, or user requirements.

  • A significant assortment of screws, nuts and washers are required to build a LabEmbryoCam. To simplify the process of sourcing these parts, a kit of the required fixings can be bought here: https://www.modelfixings.co.uk/embryophenomics.htm

  • To reduce the number of orders required to source these parts, parts are grouped to a few key suppliers and these are indicated in the bill of materials. Most parts are, however, available from a range of suppliers. There is also considerable scope for changing parts to suit your use case, or budget.

The bill of materials is detailed here:

Category

Description

Number

Supplier

Indv Price

Total Price

Link

Mechanical

2040 extrusion x 420mm (uprights)

4

Aluminium-profile

£6.64

£26.56

https://www.aluminium-profile.co.uk/20x40-aluminium-profile-kjn992891

Mechanical

2020 extrusion x 336mm (front-back laterals)

8

Aluminium-profile

£5.54

£44.32

https://www.aluminium-profile.co.uk/20x20-aluminium-profile-kjn992888#

Mechanical

2040 extrusion x 356mm (cross-beams)

6

Aluminium-profile

£5.80

£34.80

https://www.aluminium-profile.co.uk/20x40-aluminium-profile-kjn992891

Mechanical

2020 extrusion x 340mm (sample holders & x-axis)

3

Aluminium-profile

£3.84

£11.52

https://www.aluminium-profile.co.uk/20x20-aluminium-profile-kjn992888#

Mechanical

X, Y, Z Linear rails

3

Amazon

£15.99

£47.97

https://www.amazon.co.uk/Miniature-Sliding-Bearing-Carriage-Accessories/dp/B0B4K37V1G

Mechanical

Sorbothane isolators - set of 4

1

Thorlabs

£23.59

£23.59

https://www.thorlabs.com/thorproduct.cfm?partnumber=AV4/M

Mechanical

Timing belt

1

PiHut

£3.50

£3.50

https://thepihut.com/products/gt2-6mm-timing-belt-5m-reel?variant=41899086053571

Motion

XY stepper motors

2

RepRap World

£14.00

£28.00

https://reprapworld.co.uk/electronics/3d-printer-modules/stepper-motors/nema17/nema17-stepper-motor-1-8-step-connector-flat-shaft-5-0-kg-cm/

Motion

Z stepper motor - 21 oz

1

RepRap World

£12.50

£12.50

https://reprapworld.co.uk/electronics/3d-printer-modules/stepper-motors/nema17/nema17-stepper-motor-slim-1-8-step-1-33-kg-cm/

Motion

Minitronics CNC board

1

RepRap World

£44.00

£44.00

https://reprapworld.co.uk/electronics/controller-boards/minitronics/minitronics-v2-0-32-bit-all-in-one-controller-board/

Motion

Limit switches

3

RepRap World

£2.20

£6.60

https://reprapworld.co.uk/electronics/3d-printer-modules/endstops/miniature-microswitch/

Motion

Limit switch cables

3

RepRap World

£1.50

£4.50

https://reprapworld.co.uk/cables-and-wiring/wires/pre-crimped/2-wire-24awg-cable-red-black-1m/?lnk=rel

Motion

Stepper motor cables

3

RepRap World

£2.50

£7.50

https://reprapworld.co.uk/cables-and-wiring/wires/motor-wiring/connector-cable-for-stepper-motor-100cm-4-leads/

Motion

Limit switch mounts

1

RepRap World

£4.10

£4.10

https://reprapworld.co.uk/electronics/3d-printer-modules/endstops/endstop-mount-for-20x20-aluminum-extrusions-set-of-three-black/

Motion

Flexible motor coupling for Z axis

1

Ooznest

£3.60

£3.60

https://ooznest.co.uk/product/flexible-motor-shaft-coupler/

Motion

Bearing mount for Z-axis smooth rod

1

RepRap World

£7.30

£7.30

https://reprapworld.co.uk/mechanical/bearings/mountable/kfl8-bearing-axis-mount-for-8mm-smooth-rod-2-pieces/

Motion

Timing pulley

2

RepRap World

£5.40

£5.40

https://reprapworld.co.uk/mechanical/pulleys/gt2-pulley-15mm-height-16-teeth-6-mm-belt-5-mm-id/

Motion

Leadscrew(8mm) for Z-axis (85 mm needed)

1

RepRap World

£14.99

£14.99

https://ratrig.com/acme-8mm-lead-screw-custom-size.html

Motion

Leadscrew(8mm) nut for carriage

1

RepRap World

£5.30

£5.30

https://reprapworld.co.uk/mechanical/linear-motion/tr8x8-leadscrew-nut-8mm/

Motion

Smooth steel rod (2 x 128, 2 x 106) mm needed)

1

RepRap World

£6.50

£6.50

https://reprapworld.co.uk/mechanical/frames-and-bars/smooth-rods/mild-steel-smooth-rod-8-mm-100-cm/

Motion

3mm Cable ties

1

Amazon

£4.99

£4.99

https://www.amazon.co.uk/100-Pack-Black-Cable-Ties/dp/B08H7Z6BV9

Motion

F623ZZ (10pcs)

2

RepRap World

£4.40

£8.80

https://reprapworld.co.uk/mechanical/bearings/roller-bearings/f623zz-shielded-ball-bearing-flanged-10-pieces/?ds=true

Motion

Linear bearing (2pcs)

2

RepRap World

£2.20

£4.40

https://reprapworld.co.uk/mechanical/bearings/linear-bearings/lm8uu-linear-ball-bearing-slide-bush-bushing-2pcs/

Compute

Raspberry Pi 4 8GB

1

Robotshop

£106.24

£106.24

https://www.robotshop.com/uk/raspberry-pi-4-b-8gb-computer-board.html

Compute

250 TB SSD

1

PiHut

£29.90

£29.90

https://thepihut.com/products/wd-green-240gb-2-5-ssd

Electrical

Arduino Wingshield HAT

2

PiHut

£14.70

£29.40

https://shop.pimoroni.com/products/proto-screwshield-wingshield-kit?variant=382366184

Electrical

Arduino UNO for CNC, light and joystick

3

RS Components

£24.24

£72.72

https://uk.rs-online.com/web/p/arduino/7154081

Electrical

USB A cables (0.5m) for Arduino to Pi connection

3

Amazon

£3.99

£11.97

https://www.amazon.co.uk/rhinocables-Speed-Printer-Connectors-Male/dp/B08DCGYQ53/

Electrical

SSD to USB 3.0 cable

1

PiHut

£6.00

£6.00

https://thepihut.com/products/ssd-to-usb-3-0-cable-for-raspberry-pi

Electrical

ATX power supply splitter

1

Robotshop

£20.35

£20.35

https://www.robotshop.com/uk/sparkfun-atx-power-connector-breakout-kit-12v-5v-4-pin.html

Electrical

USB-C cables for connecting to ATX 5V output

1

Robotshop

£2.78

£2.78

https://www.robotshop.com/uk/usb-c-to-type-a-cable-1m.html

Electrical

Raspberry Pi HQ camera

1

PiHut

£57.00

£57.00

https://thepihut.com/products/raspberry-pi-high-quality-camera-module

Electrical

XY axes joystick

1

PuHut

£20.30

£20.30

https://thepihut.com/products/mini-analog-joystick-10k-potentiometers

Electrical

Z-axis buttons

1

PiHut

£4.00

£4.00

https://thepihut.com/products/12mm-domed-push-button-6-pack

Electrical

Industrial grade USB hub

1

PiHut

£18.50

£18.50

https://thepihut.com/products/industrial-grade-dual-host-usb-hub-4x-usb-2-0?

Optics

Pimorini microscope lens

1

Pimorini

£22.50

£22.50

https://shop.pimoroni.com/products/microscope-lens-0-12-1-8x?variant=31885093371987

Optics

LED 2 inch light

1

CoolComponents

£18.66

£18.66

https://coolcomponents.co.uk/products/lumini-led-ring-2-inch-40-x-apa102-2020?_pos=2&_sid=4457cd377&_ss=r

Optics

CSI to HDMI Adapter for Pi HQ Camera

1

PiHut

£15.00

£15.00

https://thepihut.com/products/csi-to-hdmi-adapter-board-raspberry-pi-hq-camera

Lid

Acrylic sheet(5mm - 357 x 362 & 357 x 120, polished edges)

1

PlasticPeople

£14.00

£14.00

https://www.theplasticpeople.co.uk/clear-as-glass-acrylic-perspex/

Lid

Hinges

2

PiHut

£1.00

£2.00

https://thepihut.com/products/plastic-hinge-for-20x20-aluminum-extrusion

Lid

Hose barb

1

Amazon

£7.99

£7.99

https://www.amazon.co.uk/gp/product/B09134SBMK/

Humificiation chamber

Glass lid (4mm float glass - 128 x 85 mm)

1

Local supplier

£5.00

£5.00

Humidification chamber

Dreschel gas washing bottle 100ml

1

RapidOnline

£21.80

£21.80

https://www.rapidonline.com/simax-drechsel-gas-washing-bottle-100ml-52-0982

Fixings

From Fixings sheet

1

ModelFixings

£62.34

£69.12

https://www.modelfixings.co.uk/embryophenomics.htm

Filament

Carbon PETG Filament

3

Filamentive

£32.39

£97.17

https://www.filamentive.com/product-category/carbon-fibre-3d-printer-filament/

Panels

3mm plastic panels

1

SimplyPlastics

£40.00

£40.00

https://www.simplyplastics.com

Electrical

Raspberry Pi Heatsink and Fan

1

PiHut

£9.50

£9.50

https://thepihut.com/products/raspberry-pi-4-extreme-cooling-heat-sink-fan-kit

Electrical

Figure of eight power cable for ATX adapter

1

Amazon

£3.38

£3.38

https://www.amazon.co.uk/pro-elec-Figure-Mains-Charger-Black/dp/B074QS4V1H/

TOTAL

£1,066.02

The fixings required to assemble a LabEmbryoCam are detailed below. The full list of fixings can be purchased as a kit from: https://www.modelfixings.co.uk/embryophenomics.htm

Component description

Number

M2.5 x 12 Stainless Steel Button Head Screws

2

M3 x 16 Stainless Steel Button Head Screws

6

M3 x 18 Stainless Steel Button Head Screws

4

M5 x 10 Stainless Steel Button Head Screws

262

M5 x 12 Stainless Steel Button Head Screws

52

M5 x 20 Stainless Steel Button Head Screws

2

M6 x 10 Stainless Steel Button Head Screws

4

M6 x 35 Stainless Steel Button Head Screws

4

M2.5x5 Stainless Steel Cap Screws

2

M2.5x10 Stainless Steel Cap Screws

2

M2.5x12 Stainless Steel Cap Screws

4

M3 x 10 Stainless Steel Cap Screws

8

M3 x 12 Stainless Steel Cap Screws

15

M3 x 16 Stainless Steel Cap Screws

14

M3 x 35 Stainless Steel Cap Screws

8

M3 x 40 Stainless Steel Cap Screws

2

M3 x 50 Stainless Steel Cap Screws

2

M5 x 8 Stainless Steel Cap Screws

8

M5 x 10 Stainless Steel Cap Screws

46

M5 x 12 Stainless Steel Cap Screws

2

M5 x 16 Stainless Steel Cap Screws

4

M3x8 Stainless Countersunk Screws

62

M4 x 40 Stainless Hexagon Head Screw

2

M3 Stainless Steel Square Nuts

36

M3 Stainless Steel Hexagon Nuts

18

M4 Stainless Steel Hexagon Nuts

2

M5 Stainless Steel Hexagon Nuts

2

M3 Stainless Steel Hexagon Nyloc Nuts

3

M3 Stainless Steel Flat Washers

36

FIXINGS COST

£69.12

Design files

  • STLs are the 3D model files, provided for producing the 3D printed parts. There are > 70 3D printed parts, with many requiring multiple copies. The (n) in the name of some parts indicates the number of that part that needs printing. For each section in this build guide, the required parts are listed. See the build guide for further information on 3D printing these parts.

  • A .STEP CAD file for the LabEmbryoCam is also provided. Within this online build guide, the design file is shown with particular focus on the relevant aspect of the instrument to help with understanding the assembly process. The CAD file enables manipulation of the model to identify particular features and to clearly see the location of parts during the build process.

Continue to: LabEmbryoCam Frame

LabEmbryoCam Frame

The LabEmbryoCam frame is constructed using aluminium extrusion of different thicknesses and lengths. 2020 extrusion is 20 mm x 20 mm in cross section and 2040 extrusion is 20 mm x 40 mm in cross section. There are many ways of building frames with aluminium extrusion, including the mechanism of attaching pieces of extrusion together. The modularity and versatility of aluminium extrusion is central to its popularity.

Parts Required



N

Location

Parts

2040 extrusion x 420mm (uprights)

4

Uprights

2020 extrusion x 336mm (front-back laterals)

8

Front-back laterals

2040 extrusion x 356mm (cross-beams)

6

Cross beams

3D prints

back_corner_knob(2).stl

2

Back corners

back_motion_corner_left_smallbody.stl

1

Back corners

back_motion_corner_mainbody_left.stl

1

Back corners

back_motion_corner_mainbody_right.stl

1

Back corners

back_motion_corner_right_smallbody.stl

1

Back corners

bottom_corner_bracket_mirror(2).stl

2

Bottom corners

bottom_corner_bracket(2).stl

2

Bottom corners

Back motion brackets

Insert the M5 screws and slide nuts into each of the main back corner 3D printed parts - back_corner_left_mainbody and back_corner_right_mainbody. Slide these back corner parts onto each of the two 420 mm 204 uprights - leave them loose at this stage. Subsequently, slide the 356 mm 2040 back lateral into place between the back corner 3D printed parts. Lay this ‘H’ shape of parts flat and loosely tighten.

Note

Don’t worry about the height of the cross bar at this stage - this will be adjusted in the next steps.

Bottom corners

Add nuts and slide bolts to the four corner brackets. Position the four bottom corner brackets flat - taking note of their asymmetry and slide in the side-to-side and front-to-back pieces of 2040 extrusion. The front to back extrusion parts should sit flat on its 40mm side, whereas the side-to-side extrusion sits on its smaller 20mm side. Once the four bottom pices are inserted the frame should be somewhat stable and square. At this stage, insert the upright pieces of 2040 extrusion. These should reach down to the corner brackets i.e. the square bottom pieces of extrusion sit against the uprights. Ensure the parts are fully inserted and square and then begin tightening up the bolts attached to the slide nuts.

Continue to: Z-axis

Z-axis

Parts Required



N

Location

Parts

Z stepper motor - 21 oz

1

z-carriage

Flexible motor coupling for Z axis

1

z-carriage

Bearing mount for Z-axis smooth rod

1

z-carriage

Leadscrew(8mm) for Z-axis (85 mm needed)

1

z-carriage

Leadscrew(8mm) nut for carriage

1

z-carriage

Smooth steel rod (2 x 128, 2 x 106) mm needed)

1

z-carriage

3mm Cable ties

4

z-carriage

F623ZZ

8

Y-axis

Linear bearing

4

Z-axis

Raspberry Pi HQ camera

1

camera carriage

Pimorini microscope lens

1

camera carriage

LED 2 inch light

1

camera carriage

3D prints

y_mount_big_l.stl

y_mount_big_r.stl

y_mount_small_l.stl

y_mount_small_r.stl

z_carriage_assembly_camera_mount.stl

z_carriage_assembly_camera_tripod_adapter.stl

z_carriage_assembly_light_bolt_0.97.stl

z_carriage_assembly_light_insert.stl

z_carriage_assembly_limit_trigger.stl

z_carriage_assembly_optics_insert.stl

z_carriage_assembly_rod_screw(4).stl

z_carriage_assembly.stl

z_carriage_light_carrier.stl

z_carriage_light_screw.stl

z_carriage_light_slider.stl

z_carriage_optics_screw.stl

z_carriage_rail_mount_insert.stl

z_carriage_rail_mount.stl

X-axis

The x-axis assembly consists of attaching the piece of 2020 extrusion that carries the carriage containing the optics etc.

Begin, by attaching the y_mount_big_l and y_mount_big_r 3D printed parts to the linear rail carriages (these should be hanging from the linear rails underneath the 2040 extrusion running backwards and forwards on the instrument. Once these parts are attached, the xx mm pieces of 2020 extrusion should sit comfortably on these pieces, and can be attached using bolts and slide nuts, as seen in the CAD window below.

X-axis

Each x-axis end piece (y_mount_big_l and y_mount_big_r) incorporates four pulleys, as used in the front corners. Check the CAD model to see the location of these and insert the appropriately sized screws. Once the pulleys are in place, attach the top pieces of the x-axis ends (y_mount_small_l and y_mount_small_r) and complete the assembly of this section by attaching the appropriate fixings.

Z-axis

The z-axis allows a stepper motor to move the camera, lens and lighting up and down. Investigate this CAD model to see how the z-axis will look once fully assembled. Tighten the leadscrew nut onto the carriage assembly and the coupling onto the light assembly.

The z-axis assembly consists of a carriage holding a z-axis assembly that moves the camera and light up and down.

Z-axis assembly

Begin assembly of the z-carriage by attaching the z-carriage as seen below, to the linear rail carriage.

Z-axis carriage

Before attaching the z-axis carriage to the linear rail carriage put cable ties for holding the linear bearings through the carriage part. This is harder to do once the linear rail and carriage are attached.

Z-axis carriage fixings

Now, begin assembling the x-axis assembly. The sequence of assembly is important.

  1. Slide the 126 mm smooth rods to the front of the z-assembly and insert the linear bearings onto each rod (Fig. 1. below)

  2. Attach the z-axis slimmer stepper motor to the back of the z-axis assembly (Fig. 2. below).

  3. Attach the optics rail to the front of the z-axis assembly (Fig. 3 below).

  4. The two 108 mm rods can now be inserted into the back of the carriage, with a linear bearing on each, but this must be done with the assembly attached to the linear rail (Fig. 4 below).

_images/front-rods.png

1.Front rods

static/z-stepper.png

2.Z-stepper motor

_images/optics-slider.png

3.Optics slider

_images/z-axis.png

4.Rear rods and z-limit switch

To get the carriage assembly square - with the rods fully inserted into the top of the carriage assembly, pressure is required. Here, a clamp is helpful.

Once the four rails are inserted into the four linear bearings, add the flexible coupling to the stepper motor shaft. Note: that the coupler should have a thick and thin end. Put the thin end onto the stepper motor shaft, and then thread the leadscrew down from above through the two leadscrew nut and coupler (in the light assemblies and z-carriage) - see CAD window at top of page if unsure.

5. Finally, attach the LED ring light to the light assembly. Before doing so, four wires will need to be soldered onto the LED ring, and should be long enough to reach the microcontroller at the back of the instrument (approx. 60 cm).

Continue to Frame Spacers, Linear Rails and Front corners

Frame Spacers, Linear Rails and Front corners

Parts required

LabEmbryoCam frame

Before proceeding with assembling the instrument, it is easiest to loosely attach the two y-axis linear rails with 8 mm countersunk bolts and slide nuts. Tighten just enough to stop them falling off when you turn the extrusion upside down. These rails are what will enable the ‘carriage’ to slide back and forth. Attach one linear rail to each of 356 mm 2040 pieces of aluminium extrusion.

Now, insert M5 bolts and slide nuts through the holes of all of the 3D printed spacer parts before attempting to fit them. Make sure to push the bolts all the way through the 3D printed part and ensure it turns freely before proceeding. Screw the slide nut onto the bolt, but only one turn. Note that the spacers should have the smooth part facing outwards, and that there are different sizes for different positions on the instrument.

Ensure the two pieces of extrusion with linear rails attached to them, are attached front-to back on the layer above the bottom-most layer. If in doubt, check the CAD model. When installing these pieces of extrusion, the linear rail should be on the side of the extrusion closest to the centre of the instrument.

Continue assembling the infrom the bottom-up. First insert the spacers that will sit on the previously assembled bottom rectangle of extrusion. Line up the slide nuts in these 3D printed parts with the groove of the extrusion and insert them, before tightening. Note when tightening that the part should be pulled towards the extrusion - i.e. the two are bound together. If this does not happen, try untightening the slide nut and repeating the process.

Installing spacers and building the frame

Front motion corners

Note

The front corners have multiple types of screw, and different 3D printed parts, and the left and right sides are not symmetrical. You are encouraged to consult the CAD model and images for clarity.

Begin by inserting the M5 bolts through the front_corner_left_bottom and front_corner_right_bottom 3D printed parts, ensuring that the screws rotate freely, before then loosely attaching the slidenuts.

Attach the front corners as shown below - noting that the extrusion here has been coloured transparent to aid clarity. You should be attaching the appropriate parts to each of the inner front corners of the instrument.

_images/front_corners_annotated.png

Front corner bottom parts

Note

Once attached, both of the lower front corner parts should be flush with the top of the extrusions to which they are attached.

The LabEmbryoCam makes use of some ‘home-made’ pulleys, using 3 x M3 washers interleaved between 2 x F623ZZ flanged bearings, as shown below. The belts run over the flanged bearings - so ensure the flanges are on the outer edge to guide the belt (as seen below).

_images/pulley.png

F623ZZ pulley assemblies

Each front corner, will incorporate three of these pulleys, and they are critical to the XY motion of the instrument. At this stage, begin to attach the screws (note the lengths and types from the CAD model below) to the front corners responsible for mounting the stepper motors and pulleys.

See below for an interactive CAD window to view the locations of components in the front corners, including the long bolts for the stepper motions. Note that the mounting orientation for the stepper motor does not really matter, but having the cable attachments facing towards the front of the instrument makes routing cables tidier.

Front corners

The top and bottom 3D printed pieces for each corner fit together, but should be very snug so will require pressure to fit together. Consult the CAD above if unsure about how these parts fit together.

Continue to: Manual controls and vibration insulation

Manual controls and vibration insulation

Parts Required



N

Location

Part

XY axes joystick

1

front panels

Z-axis buttons

2

front panels

3D prints

feet_leafspring(4).stl

4

joystick_panel_left_XY_arrows.stl

1

joystick_panel_left.stl

1

joystick_panel_right_Z_arrows.stl

1

joystick_panel_right.stl

1

Manual controls

Solder cables to each of the pins on the joystick (2 x 3 cables per axis), and two buttons (2 x 2 cables) and then attach the buttons and joystick to the 3D printed front panels. Ensure the cables are labelled to ensure they can be connected appropriately to the microcontroller.

Note

Although not essential, joystick and button labels are provided as seperate STLs and can be printed in different colour filaments i.e. begin the print with the label colour, before switching to the colour used for the main body of the part.

Once the joystick and buttons are attached to the front panels, the front panels can then be attached to the LabEmbryoCam.

_images/manual_controls.png

Manual control panel

Vibration insulation

Attach the sorbothene feet to each of the four leaf spring printed parts, before then attaching to the inner corner of each bottom corner of the instrument.

Foot attachment

Fixings for attaching the parts of the foot can be seen in the following figure.

_images/feet_fixings.png

Feet fixings

Attaching panels

While not essential, attaching plastic panels to the LabEmbryoCam is encouraged as for little cost, they help to keep the instrument clean, protect moving parts and cables and they keep it looking tidy. Note the size of the panels required in the bill of materials and their locations above. Before installing the panels, insert M3 square nuts into the holes at the top and bottom of each spacer. The square nuts should slide as far as they can be pushed, using a small allen key or similar, so that the hole in the nut aligns with the hole in the 3D printed spacer.

Continue to Belts

Belts

Parts Required

Part

Number

Detail

40 mm hexagonal screws

2

40mm hexagonal head screws

GT2 Timing belts

1

z_carriage_assembly_camera_mount.stl

Pi HQ camera mount

Cable ties

8

It is now time to fit a few remaining pieces before routing the belts.

Insert an 40 mm hexagonal screw into the belt tensioners and insert these into the rear of the back corners of the instrument to make routing the belts easier.

The paths of the two belts is rather complex, but each belt both starts and stops at the carriage, where they loop behind the carriage pass through the hole and are secured with cable ties (see below).

Begin by attaching one end of the belt (blue and red in Figure 1 indicate different belts) to the carriage (as seen below). The route for the belts can be seen below. Note that the teeth of the belt must engage with the timing pulleys attached to the stepper motors, but also be rotated by 180 degree at the front of the instrument, to ensure the smooth side is running over the pulleys, rather than the teeth. The location of where both belts should be rotated are indicated in the belts routing figure below.

_images/belt_routing.png

Routing belts

Note that each belt, loops through the belt tensioners at the back of the instrument. Once the belt has followed the path, loop around the carriage in the same way as for the other end. At this stage, make sure that the belt tensioner is inserted into the rear of the instrument, and the tensioner knob is screwed on loosely. This is important, to ensure sufficient belt before cutting. Pull the belt tight with a pair of pliers along its route and then secure with a cable tie. Now you can cut the belt.

Repeat this process of attaching the belt, on the other side of the carriage.

The belt should then be tightened, by using the tensioner knobs at the back of the instrument, pulling the belts backwards.

Continue to.. Electronics

Electronics

Parts Required



n

Location

Parts

Minitronics

1

minitronics mounting

Stepper driver heatsinks

3

minitronics step drivers

Limit switches

3

X, Y, Z switch mounts

Limit switch cables

3

electronics

Stepper motor cables

3

electronics

Raspberry Pi 4 8GB

1

raspberry_pi_mount

250 TB SSD

1

SSD mount

Arduino Wingshield HAT

2

electronics

Arduino UNO for CNC, light and joystick

3

electronics

USB A cables (0.5m) for Arduino to Pi connection

3

electronics

SSD to USB 3.0 cable

1

electronic panel

ATX power supply splitter

1

atx_power_mount

USB-C cables for connecting to ATX 5V output

1

Raspberry Pi

Waterproof DC power cable set

1

ATX -> Minitronics

Industrial grade USB hub

1

electronic panel

CSI to HDMI Adapter for Pi HQ Camera

1

Top of the Raspberry Pi

Limit switch mounts

1

X and Y axes

3D prints

electronics_raspberry_pi_mount.stl

1

electronics_dual_arduino_mount_extended.stl

1

electronics_minitronics_fan support(2).stl

2

electronics_minitronics_fan fan_support(mirror)(2).stl

2

cable vibration dampener bottom.stl

2

cable vibration_dampener top.stl

2

electronics_atx_power_mount.stl

1

electronics_minitronics_mounting_bracket.stl

1

electronics_ssd_mount.stl

1

Electronics are mounted onto the rear of the LabEmbryoCam - onto specifically designed 3D printed mounting parts. All cabling to the LabEmbryoCam should run through the two vibration insulation brackets on the back and bottom of the instrument - to prevent environemntal vibration from impacting image acquisition.

_images/electronics_CAD.png

1.Electronics CAD render

_images/electronics_schematic.png

2.Electronics connections

Lighting, joystick/buttons, and motor control are provided using microcontrollers, all running their own scripts which must be uploaded. See this guide for help on uploading the lighting, joystick and xyz motion scripts to microontrollers, using the freely available Arduino IDE: https://support.arduino.cc/hc/en-us/articles/4733418441116-Upload-a-sketch-in-Arduino-IDE

Lighting controller Lighting is controlled via an Arduino UNO microcontroller, with a relatively simple script. The LuMini LED range provide a high and fairly uniform lighting pattern, at a low cost. However, there is significant scope for other lighting solution s.

The script for uploading to the LED microcontroller is accessible in the LED_microcontroller folder in the LabEmbryoCam software

Manual input controller Input from both the XY joystick and Z buttons is read by the manual input microntroller, also an Arduino UNO. Both joystick and buttons connect directly to the manual input microcontroller.

The script to run on the manual input microcontroller is accessible within the LabEmbryoCam software in the joystick_microcontroller folder.

The wiring between the microcontroller, joystick and Z buttons are detailed in the joystick_microcontroller script.

XYZ motion controller The LabEmbryoCam makes use of a CoreXY (https://en.wikipedia.org/wiki/CoreXY) style of motion control and this can be achieved using a range of different microncontroller boards from both CNC and 3D printing suppliers. The Minitronics V2 board is used here because of a low cost and having integrated drivers (reducing setup complexity). More sophisticated boards would enable higher resolution (via microstepping) and quieter operation, but come at a higher cost.

Firmware and configuration files for the Minitronics board are accessible in the XYZ_microcontroller folder of the LabEmbryoCam software. The XYZ microcontroller is more sophisticated than the Arduino UNOs used for the lighting and manual input control, and requires some different settings when uploading the scripts using the Arduino IDE. Further information can be found here, in the ‘Configuring Arduino’ section: https://reprap.org/wiki/Minitronics_20

Raspberry Pi A Raspberry Pi (RPi) 4 8GB can run the LabEmbryoCam smoothly, but it should also be possible to run on any other computer on which the Raspberry Pi camera is detected and Dash is supported. A heatsink and fan are suggested for optimal performance, and a powered USB hub to prevent excessive power draw from the USB ports leading to unreliable hardware connections. The camera should be connected to the RPi using an HDMI-CSI adapter - to enable sufficient distance from the camera to the RPi, mounted on the rear of the instrument. Follow enclosed instructions for mounting both the heatsink and CSI-HDMI adapter to the Raspberry Pi.

The RPi can be flashed with the operating system image found here, containing all dependancies installed. This can then be loaded onto a microSD card using the Rasperry Pi Imager - https://www.raspberrypi.com/software/.

The lighting, manual input, and XYZ microcontrollers should all be attached to the RPi, via the USB hub, which is itself then connected to a USB port of the RPi. All that is left, is to connect a mouse, keyboard and a monitor. Note that the RPi uses a microHDMI, so an adapter (included in the bill of materials is attached).

The Raspberry Pi is powered by the 5 V power supply from the ATX splitter, connected to a USB-C cable. This can be made by simply cutting a USB-C cable, stripping the 5V and earth cables and connecting these to the ATX 5V outputs.

_images/electronics_schematic.png

Continue to Humidification chamber

Humidification chamber

Parts Required



n

Location

Parts

Hose barb

humidification chamber

Glass lid (4mm float glass - 128 x 85 mm)

humidification chamber

Dreschel gas washing bottle 100ml

humidification chamber

3D prints

humidification_chamber_lid.stl

humidification chamber

humidification_chamber_main.stl

humidification chamber

humidification_chamber_mount.stl

humidification chamber

_images/humidification_assembly.png

Evaporation and condensation are key challenges in the maintenance and visualisation of developing aquatic embryos.

A cheap, yet effective, solution to this challenge, is a 3D printed humidifiction chamber. This humidification module is succesful in achieving > 90 % humidity, thereby reducing evaporation to negligible levels. It is not, however, essential to the succesful operation of the LabEmbryoCam, for which multiwell plate and petri dish mounts are avaialable.

Continue to Lid

Lid

_images/manual_controls.png

Manual control panel

Attach the L shaped lid stops to the front of the instrument to offer support to the lid.

Now move to the software section of the build guide to get this setup and running.

SOFTWARE

The LabEmbryoCam app is built using Dash, a Python based framework from Plotly. The app enables control of the LabEmbryoCam instrument - including camera, XYZ position and lighting, and it enables the automated control of these during the course of an acquisition.

Additional analytical scripts are provided for integrating the acquired video for each XYZ position, and running various analyses including automated heartrate measurement and embryo size measurement.

Software installation

LabEmbryoCam software is a Dash based webserver. It is tested on Raspberry Pi4 8GB single board computers, but could run on other Raspberry Pi models, or other systems with appropriate camera drivers and support for dependencies. The Jetson single board computers with appropriate Raspberry Pi HQ cameras is capable of running the LabEmbryoCam effectively.

A disk image containing the Raspbian OS with all necessary prerequisites and the LabEmbryoCam preinstalled. The disk image can be written to a microSD card using Rasberry Pi Imager - https://www.raspberrypi.com/software/. LabEmbryoCam is an active project and users are encouraged to download the most recent version of the software from https://github.com/EmbryoPhenomics/LabEmbryoCam.

Within the LabEmbryoCam software there is a ‘requirements.txt’ file and this lists all of the dependencies required. If starting with a new Raspian OS (rather than using the disk image from above), these dependencies will need to be installed.

You can install the required dependency packages for the LabEmbryoCam using pip:

$ pip install -r requirements.txt

The requirements.txt file for the LabEmbryoCam webserver is located in the same folder as the LabEmbryoCam folder

Camera settings

The LabEmbryoCam is built to work with the Raspberry Pi HQ camera, but can support other cameras, with appropriate drivers and linking functions in the LabEmbryoCam app. The camera connects automatically when starting the app. Select the desired Resolution and Exposure, and click ‘Update settings’ to update the camera.

Clicking Snap will capture a still image, or Start/Stop Stream will initiate a live video from the camera. This live stream can then be used to configure other aspects of the instrument, such as setting X, Y and Z positions.

_images/camera_settings_ui.png

Once the camera is live, you can then focus the camera - large changes to focus are acheived by manually sliding the camera carriage up, or down, but focus can also be adjusted using the z-axis buttons. The lens included in the bill of materials is a low cost lens, with a broad range of magnification. Note that at higher magnification, the lens must be closer to the sampler. The working distance (distance between the sample and lens) will vary depending on the lens being used.

Note

The XYZ movement must first be calibrated, via setting the origin, before you can move the instrument using either the joystick or z-buttons. This means that the stage should always work from (0,0,0) and positions should be repeatable between acquisitions i.e. if you save a set of positions, you can revisit the same positions if you reload them.

Light brightness

The light brightness can be set with a slider until your desired brightness is achieved. Note that if you would like to achieve higher frame-rate in image capture, you can turn the LED brightness up whilst also reducing the exposure time to keep the illumination of the sample the same. The light turns off when the camera is not acquiring.

Camera options

  • Exposure time

    The shutter speed at which the camera operates in milliseconds

  • Contrast

    Contrast of the images acquired

  • Frame-rate

    The frame-rate at which videos are captured. Note that for high resolutions, such as 2048x2048, you will need to reduce exposure time below 10ms if you would like to achieve a frame-rate higher than 15-20fps. This is due to hard limit set by the raspividyuv software on raspberry pi.

  • Resolution

    Presets for resolution at which images will be captured.

Note

Any time you wish to change settings, you need to make sure that the camera is inactive (i.e. not capturing for a live stream or acquisition) and to press the Update Settings button. The drivers for the Raspberry Pi HQ camera are quite stable, but in the event of the camera, or any other part of the system becoming unresponsive, please restart the computer.

Stage settings

_images/xy_stage_settings_ui1.png
  • A - Set Origin

    Press this button to home the stage at startup of the user interface

  • B - Manual Controls

    Click this switch to enable or disable the joystick and Z-axis buttons on the system

  • C - Generate XY

    Options and parameters for generating multi-well positions based on the coordinates at position ‘A1’.

  • D - Position list buttons
    • Current: Press this button to retrieve the coordinates of the current position where the stage is at. A new entry will be added into the position list below where it can be edited further

    • Replace: Press this button to replace the coordinates of the selected position with those at the current position of the stage. This can be used to update a position if an animal has moved or gone out of focus. Note that you must select a position in the position list via clicking on the circle icon in the second column of the position list for the position you’d like to replace.

  • E - Position list table

    Position list where coordinates are recorded. The first column is for removing position entries from the list, simply click the x icon for the position you’d like to remove. The second column is to permit selection of specific position entries for updating their coordinates. Finally, columns X, Y, Z and Label are all editable similar to an excel spreadsheet.

  • E - Activate graph

    Enabling this switch will allow you to click on positions on the graph and then the stage will move to the select position. This can be an easy way to double-check all you positions are correct whilst you have a live stream open.

  • F - 2D/3D graph view

    Enabling this switch can switch between 2D (as shown above) or 3D view, 3D view can be useful for checking the z axis positions.

Setting up an experiment

Step-by-step overview

  1. Connect camera

  2. Home stage

  3. Adjust parameters on camera and start live stream

  4. Use manual controls to find and record desired positions

  5. Exit live stream and save config for future reproducibility

  6. Set acquisition parameters and progress updates, if desired

  7. Start acquisition!

Guided walkthrough

Once you have started the LabEmbryoCam user interface, either by the terminal or an appimage, you will be given an address to open in your browser. Once opened you should see the user interface in browser like so:

_images/ui_initial.png

We can now proceed with getting the hardware set up for running an experiment.

The first thing we will do is to home the xyz stage. This is essential to ensure that the correct origin is used when finding and creating positions. To do this, click the following button in the xyz tab of the UI:

_images/xyz_home.png

Note

Before homing the stage, make sure there are no objects that could obstruct the movement of the stage. Also, make sure not to use the app whilst the stage is homing as this could interfere with the process.

Once the stage is homed, we can now make use of the manual controls to move the stage to desired positions. To enable the joystick and Z buttons, toggle the following switch in the xyz tab of the UI:

_images/xyz_manual_controls.png

In order to record positions for an experiment, we need to first start a camera live stream to ensure our positions are correct. This can be done via clicking the following button in the camera tab:

_images/camera_live_stream_button.png

The live stream will open in a separate window and should look like this:

_static/camera_live_stream_feed.png

Now that we have a live stream from the camera we can position the stage over a desired position by using the manual controls and the live stream as feedback.

Note

If you would like to change the camera settings you must exit the live stream before doing this so that your changes can take effect. Then when you have finished choosing your desired setttings, press the Update Settings button before starting the live stream again.

Once you have a position that you want, click the following button in the xyz tab to record the current position:

_static/xyz_record_current_1.png

This will add a position entry into the position list:

_static/xyz_record_current_2.png

Note that all columns of this table are editable.

You can repeat this step until you have recorded all the positions you want. Once you have completed recording positions, the next step is to enter the parameters for the acquisition before starting the experiment.

The parameters can be found in the Acquisition area in the camera tab. There area the following parameters:

_images/acquisition_parameters.png
  • Number of positions - Whether you would like to capture footage for only the current position (‘Single’) or all the positions you have recorded (‘Multiple’).

  • Number of timepoints - How many acquisition iterations you would like the system to complete. An iteration consists of capturing footage for the specified positions. Setting the acquisition interval allows us to set this process to complete every X minutes, where X would be the acquisition interval.

  • Acquisition interval - How long to wait between each timepoint in minutes.

  • Acquisition length - How long to capture video for each position, at each timepoint.

  • Save folder - The full file path to the directory where you would like to save video.

  • Progress updates - Username and password for gmail specific to your unit. Click the login button to send progress updates to this email account after every timepoint.

After entering the parameters for your experiment, the last step is to press the Start Acquisition button to begin the experiment. Note that you can cancel an acquisition in progress if you would like to make adjustments to the parameters used by the software.

Note

You cannot change parameters whilst the acquisition is running because the software is effectively paused whilst it is running this process.

Analysis Scripts

Note

You can install the required dependency packages for these scripts using pip:

$ pip install -r requirements.txt

The requirements.txt file is located in the same folder as the scripts.

Each of these bullet points needs to link to the scripts when its put on github.

  • Compiling Video
    • A parallel python script for compiling individual timepoint videos for each position captured during the acquisition into one large concatenated video file.

  • Timepoint Viewer
    • A python script that launches a simple GUI for scrolling through frames in an individual timepoint video.

  • Multi-timepoint Viewer
    • A python script that launches a GUI for scrolling through the first frame from each timepoint video for a single position that was recorded.

  • Embryo Segmentation
    • A python script that makes use of EmbryoCV for displaying embryo segmentation through a GUI. Note the segmentation is optimised for gastropod embryos.

  • Heart rate Estimation
    • A python script that makes use of HeartCV for detecting a cardiac signal and consequently, the timings of individual heart beats.