I have built an OpenFlexure Delta Stage microscope with a Sangaboard V0.2.
For the Sangaboard V0.2, I ordered the PCB online and then soldered the circuit components onto the PCB myself. I did not populate the PCB with a USB receptable, nor did I populate the SERIAL_COM, the AUX, the I/O_pins, the 5V and the GROUND slots with any sockets or components.
I then managed to flash the Arduino firmware onto my Arduino nano clone using the old bootloader in the Arduino IDE.
Power supply to the Sangaboard is achieved throught an official Raspberry Pi 4 charger with 5.1V output from which I split off a branch to power the Sangaboard through a barrel jack connector. The Sangaboard is connected to my Raspberry Pi 4 through the same USB cable that I used to flash the firmware onto the Arduino nano.
My problem is, that the stage is not recognised in the Openflexure software.
I also tried to control the stage through the terminal using python.
Importing the Sangaboard library worked fine, but when I try to call âsb = Sangaboard()â the port auto-scan also doesnât find any open serial port.
Does that sould like a problem with the Sangaboard or rather with any setting in my openflexure setup?
Any help would be highly appreciated and Iâd be happy to supply any further details if necessary.
The symptoms that you have do not sound as though they are linked to anything about the physical board of the Sangaboard. You are unable to connect to the Nano, so whether the motor part is there of not should not make any difference.
I would try removing the Nano from the Sangaboard and re-flashing the firmware. Look closely to be sure that it has loaded without errors. Then try the Openflexure software. The Nano itself is powered by the USB cable from the Pi. You will beed to reboot the Pi to be sure that the Nano is available when the OpenFlexure server starts. I am assuming that you are using the server version 2?
In addition to what William said, you can check if the serial port is created at all in /dev/, it would be /dev/ttyACM* or /dev/ttyUSB*, you can check if something new appears there after plugging the Arduino in. If no port is created itâs probably a hardware issue somewhere or the arduino clone is using a weird USB-serial converter chip that the linux version on which OFM is build doesnât have a driver for (this seems unlikely). You can also try plugging something else in to the same USB port to check there isnât a problem with the port itself.
If the port appears but the board is not detected you can go back to the Arduino IDE and use the serial monitor to verify that the firmware was correctly flashed (you can send e.g. âversionâ to try to get a version string if it doesnât respond immediately when you open the monitor).
I have removed the Sangaboard and re-flashed the arduino firmware. After putting the Sangaboard back into the microscope and rebooting, unfortunately, the stage is still not recognised.
This is the output I got from the Arduino IDE while flashing the firmware:
*avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
avrdude: verifying âŚ
avrdude: 10878 bytes of flash verified
avrdude done. Thank you.*
I noticed that it overrode the baud rate to 57600. When I open the serial monitor in Arduino IDE, I first have to change baud rate to 115200 to get a readable output from the serial monitor.
I am using Version 2.11.0 of the OpenFlexure Connect.
Dear Filip, thanks a lot for the suggestion.
I did find /dev/ttyACM0 on my Raspberry Pi, when I had the Sangaboard connected and it also disappeared after disconnecting the Sangaboard. I also plugged my USB adapter for the wireless keyboard into the same port I previously used for the Sangaboard and the keyboard worked completely fine.
When I unplug my Arduino nano from the Sangaboard and connect it to my PC, I can communicate with the Arduino nano over the serial monitor, once I set the baud rate to 115200.
Unfortunately, so far the stage is still not recognised in my microscope.
Is there maybe an option to also change baude rate to 115200 in delta stage microscope?
I believe it should be using 115200 baud by default. Was there any logging output from when you tried to create the Sangaboard instance? Can you try creating the Sangaboard instance again but explicitly giving it " /dev/ttyACM0" as port (first argument) to see what the logs say?
When I open the Sangaboard instance without specifying the port, it goes into auto-scanning and then returns âWARNING:root:No firmware version string was returned.â three times before it fails and stops.
When I specify the port, I get the following output:
pi@microscope:~ $ python3
Python 3.7.3 (default, Mar 23 2024, 16:12:05)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sangaboard import Sangaboard
>>> sb = Sangaboard('/dev/ttyACM0')
WARNING:root:No firmware version string was returned.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/.local/lib/python3.7/site-packages/sangaboard/sangaboard.py", line 126, in __init__
ExtensibleSerialInstrument.__init__(self, port, **kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/sangaboard/extensible_serial_instrument.py", line 86, in __init__
self.open(port, False) # Eventually this shouldn't rely on init...
File "/home/pi/.local/lib/python3.7/site-packages/sangaboard/extensible_serial_instrument.py", line 115, in open
raise IOError("The instrument doesn't seem to be responding. Did you specify"