Freshly assembled upright microscope v7.0.0-beta1

Hi, I have finished my build today. While building, I ran in two problems: the sangaboard.ino is incompatible with a Arduino Nano board - killled it. The Nano tried to use the wrong pins to control the motors. Solution was to make all pins within the sourcecode compatible with the Nano. Second problem was, that the z-motor could not work properly, because the gear got stuck with the surface of the seperate z-actuator. As a solution I used 2 nuts between motor and z-actuator (see picture).
Now my microscope is working fine - so far.

Hi @ignaz. That is a nice build and a great example of yeast imaging. Have you run the camera calibration routine? That would get rid of the pink background around the edges of your full size image.

I am sorry you had those problems in the build, thank you for persevering. The sangaboard firmware ought to work with a nano, can you post a link for where you got the version that you have used so that I can check it? I have used it several times, but not recently. I am particularly surprised that the z-actuator was binding on the motor - it should be exactly the same as the x and y actuators. In your build the large red gear seems to sit below the yellow motor mounting lugs, so that is correct. The motor bodies are flat, and therefore should not bind. Are the motor lugs a little bent so that it is not sitting flat maybe?

Hi @WilliamW. I have run the camera calibration routine with another sample (cropped image below).

As these motors - like other parts - are manufactured at different places, the problems could result through different dimensions, tolerances, etc. The other image shows better details of the motor.

Parts I used:
13mm Lens:
Motors: 28BYJ-48 Schrittmotor 5V DC +... kaufen bei BerryBase
LED: OptoSupply LED, ultrahell, 5mm,... kaufen bei BerryBase
Arduino: kompatibler Arduino Nano mit... kaufen bei BerryBase
Raspberry 4 8GB: Raspberry Pi 4 Modell B Premium Bundle RPi4 mit 8GB RAM SanDisk Micro
Camera: Raspberry Pi Camera Module 8MP v2 kaufen bei BerryBase
PLA: PLA Filament Reinrot RAL 3028 | Material4Print
O-Ring: HUG Technik Shop | Präzisions O-Ring 30x2 mm NBR 70 - online kaufen ✓ (tried viton, but they broke…)

Sangaboard firmware: Bootloader · master · Bath Open Instrumentation Group / Sangaboard · GitLab
Arduino-Code: arduino_code · master · Bath Open Instrumentation Group / Sangaboard · GitLab
I did not use a sangaboard firmware, because it is incompatible with the nano as it is for the mega. ( in the boards_add.txt).
However, the code can be used, but I had to patch it first.

Patch (sorry for the picture - but I don’t know how to “quote” text within this editor):

So you have hard coded it as a sangaboard v0.2, which is the correct version for using an Arduino Nano. I wonder why the automatic board selection did not work. In the Arduino IDE what does the board show up as when you have selected it?

The second change seems to test the same condition twice (adding the line before the snippet given in the diff.)

 #if defined(SANGABOARDv2)
    motors[0] = new Stepper(8, 13, 12, 11, 10);
    motors[1] = new Stepper(8, 9, 8, 7, 6);
    motors[2] = new Stepper(8, 5, 4, 3, 2);
  #elif defined(SANGABOARDv2)
    motors[0] = new Stepper(8, 13, 12, 11, 10);
    motors[1] = new Stepper(8, 9, 8, 7, 6);
    motors[2] = new Stepper(8, 5, 4, 3, 2);

Second and first are the same pin ports - my patch is really quick&dirty. :wink: I only looked at the parts defining the pins, changed all to a nano compatible layout, compiled and uploaded it and it worked.
A far more elegant solution would have been to get rid of the if-elif-statement.

The arduino IDE shows the board as:

BN: Unknown Board
VID: 0403
PID: 6001
SN: Upload any sketch to obtain it

Processor: ATmega328P (Old Bootloader)

If I try to upload the sangaboard hex-file bootloader - via AVRISP mkII - it says:

avrdude: Expected signature for ATmega32U4 is 1E 95 87
Double check chip, or use -F to override this check.

I recalibrated the white balancing and reduced the exposure time to get more contrast.
2 pictures of “SafAle™ WB‑06” freshly propagated and put onto a Neubauer counting chamber

For yeast cont the upright microscope with basic optics is good enough.

1 Like

For the z-axis motor the new image is very clear indeed. Was the binding of the motor body to the red gear, or was it the flange of the small yellow gear binding on the large red gear? There does seem to be a little more of the brass shaft showing below the gear than there might usually be.

I also see that you have the released version 7.0.0-Beta1 of the upright illumination. You will probably have had trouble getting the mounting nut in. There is an improved version in development, noted on Openflexure Microscope V7.0.0-beta1 released - Announcements - OpenFlexure Forum

You do not need to upload the bootloader, and it will not work properly if you do. It is designed for a custom designed board that is similar to the Arduino Leonardo. That may have been part of your problem, because if the board started identifying itself as a leonardo, it would then choose the wrong pins.

The images are good enough for cell counting, but I would expect the auto camera calibration to get it to be a lot better than that, more like the image posted in Edges of field of view out of focus - Request Help - OpenFlexure Forum. It is not just white balance but a lens shading correction as well.

@WilliamW thanks for your help so far.
The nut didn’t make trouble, but it was a very tight fit… which needed some force.
Auto-calibration is working good so far and I could have gotten a brighter image. But than it would be difficult to distinguish the lines of the counting chamber.

1 Like

Hi @ignaz
Nice work! A few questions about the yeast counting. I had some issues too when using a Neubauer chamber to see the lines
Have you tried methylene blue to count live cell?
If yes, does your bigger contrast difficult to see change un color?

Hi @nanocastro

So far I have not used mythylene blue and the pictures are more a proof of concept for myself and to show here that one can count yeast with the basic optics. In my first post it was rehydrated dried bakers yeast in clear water, in the fourth post it was yeast propagated in 1.032 SG wort.

1 Like

That’s my guess - the readme in the repository you linked to (with the bootloader) does start by saying that this bootloader is only for Sangaboard v3 and v4, but perhaps I should make that part clearer. You are right that it’s incompatible with the Nano (which uses a different microprocessor) and force-uploading that hex file will definitely stop it working.

The regular Nano-based motor driver should not require a programmer - provided you have an Arduino set up with the regular bootloader, you should be able to uploade the sketch as usual over the USB port. Perhaps I should re-check the instructions for the electronics - they have had less checking than the assembly of the rest of the hardware, so it may not be quite as clear as it could be how to put together a version based on a Nano.

Test Pictures with another counting chamber:
Total view (resized):

Partial View (original size):

Conclusion: I am happy with my build, as I can count now the yeast to get consistant ptch rates for my homebrews.