sparks-baird / self-driving-lab-demo

Software and instructions for setting up and running a self-driving lab (autonomous experimentation) demo using dimmable RGB LEDs, an 8-channel spectrophotometer, a microcontroller, and an adaptive design algorithm, as well as extensions to liquid- and solid-based color matching demos.
https://self-driving-lab-demo.readthedocs.io/
MIT License
71 stars 8 forks source link

Which microcontroller/computer to use? RPi, Arduino, which model #8

Closed sgbaird closed 2 years ago

sgbaird commented 2 years ago

Re: Hardware: Why not just run it off a Raspberry Pi Pico (you can also get them with Stemma connectors, no supply shortage, only $4) and do the algorithmic stuff on a laptop? Send commands to set the LEDs and read the current spectrometer reading by USB serial

https://twitter.com/JoshuaSchrier/status/1543374043230904321

Joshua Schrier suggested Pico, offload the decision-making to a computer. I was thinking it would be nice to be able to run the module standalone, with it connected to WiFi. Probably not bad to have a USB connection for the demo, but I wonder if it might be better to have it connected to WiFi for the scale-up/transition to a "real" task. Especially if there are going to be interactions/submissions via Google Colab. In this case, a free Colab session would probably time out by the time the real experiment has completed the optimization.

sgbaird commented 2 years ago

Someone suggested that I reconsider using RPi 4B and suggested that the situation has no signs of getting better in the near future.

sgbaird commented 2 years ago

The discussion with Helen Leigh from Crowd Supply:

Additionally, you may wish to reconsider building your device around the RPi 4, since they are currently very difficult to find right now, with no signs of the situation getting better in the near future. Unless you have a really great connection at RPi, it is very unlikely that you will be able to get enough RPi 4s to fulfill a campaign.

That's a good point about the RPi 4. I think I'll try to build the system around a Pico W with ML training/decision-making happening externally. Though, there is definitely the appeal of having some reasonable compute power to run more expensive ML algorithms on the RPi 4 for decision-making (i.e. make it a truly standalone system). Open to suggestions for other single-board computers than the RPi 4 if you have any (still with "reasonable" compute power). Of course, I can look at articles like https://www.zdnet.com/article/best-raspberry-pi-alternative/, but it's tough to know what might be a better alternative for this specific project where ease-of-use is a high priority. ... Do you think redesigning for the Pi Zero 2 W (or Pi Zero W) would be a suitable replacement for the RPi 4 or do you think I'll need to design for a different ecosystem altogether (e.g. Arduino)? Any recommendations for what I should look into?

The Pi Zero is also out of stock everywhere due to the chip shortage. You can find them for sale on ebay and amazon for $90+. I don't think it would have enough computing power for your project anyhow. The only RPi products reliably in stock are based on the RP2040, which you can still buy (this is why there are a million RP2040 projects right now!).

Take a look at the BeagleBoard range for an alternative SBC ecosystem https://www.mouser.com/c/?q=beagleboard They are open source hardware too.

sgbaird commented 2 years ago

Getting Blinkt! to work with the Pico seems like a pain. See this discussion. There's a guide for controlling an LED strip with a Pico.

For the Pico, I could use a terminal block breakout module, or maybe even better the Maker Pi Pico Base since it has a single NeoPixel LED and the Grove ports can connect to QT sensors via a Grove->Stemma-QT adapter.

There are a couple of outstanding issues with switching to a Pico design:

I looked into Banana Pi M2 Zero, and it seems a lot less fluid getting it set up. See for example the NeoPixel RGB guide.

I also emailed RPi asking about fulfilling a Crowd Supply campaign. Crowd Supply requires a final(ish) fully-functional prototype, and so I'll probably need to get my hands on whatever RPi I want to be the final design for the campaign. Subscribing to rpilocator Twitter feed to see if I can get a Pi Zero 2 W or Pi Zero W.