ac-rad / digital-pipette

9 stars 3 forks source link

My experience building the digital pipette with a Pico W #2

Open sgbaird opened 7 months ago

sgbaird commented 7 months ago

Overall, it was pretty smooth. I'll first note that I was provided the 3D printed parts directly. Also, I ended up writing my own MicroPython code to use it with a Pico W, and consequently I haven't tested out the Arduino code. Here is a basic script:

from machine import Pin, PWM
import utime

# Setup PWM
pwm = PWM(Pin(0))  # Use the appropriate GPIO pin
pwm.freq(50)  # 50 Hz frequency

def set_position(pulse_ms):
    duty = int((pulse_ms / 20.0) * 65535)
    pwm.duty_u16(duty)

# Example to set the actuator to different positions
set_position(1.1)  # Almost full retraction
utime.sleep(5)
set_position(1.5)  # Halfway
utime.sleep(5)
set_position(1.9)  # Almost full extension
utime.sleep(5)
set_position(1.1)  # Almost full retraction
utime.sleep(5)
set_position(1.5)  # Halfway
utime.sleep(5)

# Add your logic to set it to the desired intermediate positions

pwm.deinit()  # Deinitialize PWM

Note the 1.0 ms is fully retracted, and 2.0 ms is fully extended. This was based on the LR16-R datasheet.

Some comments:

n-yoshikawa commented 7 months ago

Thank you for your comments.

Diagram could be updated to show the connection between power supply ground and arduino ground

Thank you for the suggestion. I omitted the connection from the diagram for simplicity, but I will think about how to show it in the diagram.

The 10 mm short screw for the plunger (step 2) seems just barely too short, but if tightened relatively well, fits through most of the nut. Could have gone with a little bit more tolerance perhaps

You can use different screws if it fits better.

Maybe best to separate the build instructions in the README with headings for each step instead of only numbering (it was easy to misinterpret the text as a caption)

I will update this.

Maybe make the walls on the thin neck a bit larger? (i.e., to get a tighter fit without needing to make the neck width smaller) Maybe there could be an access hole for the plunger, so that the plunger screw can be tightened without needing to unscrew everything else

The design is open, so you are welcome to improve the design or open a pull request.

Sometimes the README videos are kind of glitchy - maybe specific to my computer, but refreshing the window usually works. There is also a download option - not a big deal. I like that you have successive, short videos with text instructions.

I found no problem before, but it is not working well now. I guess something has changed video streaming on GitHub.

During the final step with the syringe cover, it seems a little strange that there isn't a tighter/more robust connection here. Taping around it will make it stay together better. I get that it would complicate the design though

Taping is a working solution. I also did it. I considered another design that tightens the syringe with a screw, but it requires a long screw which may not be widely available, so I didn't adopt that design.

Might be nice to show/explain how someone can power the microcontroller from the same 6V power supply (e.g., buck converter)

You can use a voltage regulator like 7805. Although it worked when I tested it last time, I recommend separating the power supply for stability. The noise from the motor may affect the power supply to the microcontroller.

Any issues with full retraction and full extension? It seemed like maybe limiting the range from 10% to 90% instead of 0% to 100% was better.

I don't have a problem with full retraction and extension, but you can limit the range if you have any problems.

sgbaird commented 7 months ago

Great, thanks Naruki!

sgbaird commented 2 months ago

An AC Training Lab summer student wanted to work on cleaning up some of the electronics and has started. We'll be documenting progress at https://accelerated-discovery.org/t/improvements-to-the-digital-pipette/236. It would be great to get some visibility on any modifications (in-progress or planned) to the Digital Pipette from the Aspuru-Guzik group.