Make no mistake, the Raspberry Pi is an excellent piece of equipment.
Like any device, it has its limitations, and like any device, there are ways to expand those limitations with clever use of hardware and software.
One of the limitations is the number of communication pins available to the user without using an GPIO expander.
I want to perform a large number of sensor readings and position actuator operations using the Pi. I want to simplify the software that runs those actuators and sensors. Essentially, I want a much more powerful system controlling my microscope.
I can do this in two ways - one is to scrap the idea of using the Raspberry Pi, and to install a big, custom-made control system. The other is to farm out part of the computational load to other, small computers.
The first option sounds expensive, and will require everything to be written as a monolithic system - one that will require a lot of re-writing every time I want to make a change.
The second option, however ...
Enter the Arduino nano. This is a "single chip" solution - it is actually a tiny PCB populated with an AT Mega microcontroller, ancillary circuitry and a set of pins that turns the surface mounted device into a DIP package with a couple of connectors on top.
Programmed in a dedicated version of C, the device is all about sensors and control actuation. It is fast, it is cheap and, above all, can keep track of several stepper-motors, travel limit switches and indicator lamps (LEDs).
Thus, each cluster of stepper motors in this project will be overseen by an Arduino, keeping the workload of the Pi neatly centred on the task of running the microscope.
Of course, this means learning yet another programming language, but at least it is based on one that I have used before, if briefly.
No comments:
Post a Comment
Comments and suggestions are warmly welcomed.