Help with syringe pump project

Post content lost due to vandalism by author

The Adafruit motor shield is a poor choice for driving a stepper motor. Have a look at Stepper Motor Basics

You need to identify how many different I/O pins are required. Some of the LCD displays need a lot of pins. If an Uno does not have enough I/O pins a Mega should have plenty.

How fast to you want to update the LCD and what is the maximum step rate required for your motor. There may be a risk that a 16MHz Arduino is not fast enough.

...R

The Mega has extra pins but it runs at the same speed as the Uno.

"pretty quickly" is meaningless. Put numbers on it - how many updates per second? Also, how many stepper steps per second. Updating an LCD can be slow and may interfere with the Arduino's ability to produce steps at the required interval. Either on its own would be no problem.

...R

Hi,
Welcome to the forum.

The steps per second will vary because the stepper will need to power a syringe pump, which needs a variable pulse rate. It won't be a constant. That's where the sinusoidal waveform will come from.

Obviously either on its own would be no problem, but it needs to do all simultaneously. If it's an insurmountable limitation then I wonder if I could have the LCD update a couple of times per second.

I think we need a FULL explanation of the application and how you want to implement it.
Can you tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom... :slight_smile:

Hi,
Fine, what sort of expansion are you looking to measure, is it the amount of expansion, or just the fact that expansion has taken place.

If you want to display the expansion as a wave form, then I assume you need to measure the amount of expansion.

A pulse detector will not give you an output, only HIGH or LOW.
You need a displacement sensor to measure distance.

Tom.... :slight_smile:

SomewhatCompetent:
I would like to create a syringe pump almost exactly like this

Doesn't the video answer the question in your Title?

SomewhatCompetent:
I would have put numbers on it if I could. We don't all start out as experts.

The physical requirements of your system are something YOU have to figure out. When you know that we can help with the programming.

I think a better title for your Thread might have been "Please help me make a machine like the one in this video"

and the answer to that is to break the project into small parts.

  • Learn how to control a stepper motor - see this Simple Stepper Code
  • Learn how to display stuff on the LCD
  • Learn how to read your sensor - you have not yet told us exactly what it is
    When you can do all the parts separately you can start joining them together.

Also have a look at Planning and Implementing a Program

...R

SomewhatCompetent:
Robin. 1) No, or I wouldn't have asked.

I'm struggling to understand why it does not?

If it works for the guy who made the video - why not for you?

...R

SomewhatCompetent:
I mentioned in my original post that I wanted to connect quite a few extra components. And LCD screen

The demo in the video has an LCD and that and the stepper driver) are the most complex parts.

If you want to do something different with your LCD (different from the video) then you need to explain and quantify the difference. The video does not seem to require a high step rate for the motor.

Probably the practical solution to your question is to get an Arduino and the appropriate peripherals and do some testing.

...R

SomewhatCompetent:
The LCD I would like is a much larger one. Maybe 4'' and full colour since I'd like it to display a splash screen when the system turns on.

I wish you had said that up front.

My guess is that an Arduino would NOT be suitable for a 4" colour LCD - but it is only a guess. Maybe you could use an Arduino to drive the stepper motor and a RaspberryPi to run the display.

You could do a lot of testing with just the Arduino and the LCD and stepper driver and motor without incurring the other hardware costs.

...R

Arduino with AVR chip (Uno, Mega) will take a while to load an image like your splash screen.
If you don't mind then it's no problem.

What Arduino to use depends on how much RAM, flash, pins, ports, and special features you need.
There are ways around much of that but most require money spent.

You don't seem to want too much for an Uno but one unstated or misstated requirement can change that. How you write the code can really affect that.

You might check out Budvar10's 1284P Pro board. I bought one with 24MHz clock, it works great!
He is in Europe, IIRC in Slovakia (Budvar?) and the big part of the cost to me was shipping but I WANTED the board!

It has an AVR with 16K RAM. It has more pins than Uno and 2 serial ports. A Mega2560 has more of everything except for the RAM... but Budvar makes a 24MHz version of his Pro board that outruns the 16MHz Arduinos.

Beyond that, look into the Due or a Teensy 3.2 as examples of 32-bit ARM chip Frankenduino's that clock 48MHz to 96MHz. They have 96K and 64K RAM respectively and true audio quality analog out (Due has 2 channels, Teensy 3.2 has 1) and 12-bit capable ADC.

SomewhatCompetent:
Okay. I have a RaspberryPi that I'm not using. I'm not sure how to feed data from the expansion sensor connected to the Arduino over to the Raspberry Pi so it can be converted to a waveform and displayed.

That makes it all much simpler. The Uno only has to drive a stepper and sensor.

This Python - Arduino demo may give you some ideas for communication between the RPi and the Arduino.

...R

Your Arduino normally looks like a comm channel to a PC.

There is a forum section titled Interfacing w/ Software on the Computer that simply browsing should give answers and directions.

SomewhatCompetent:
And I should be able to have the Pi boot to a splash screen and immediately in to whatever program is displaying the reading from the expansion sensor?

I expect it is possible to do that but I don't have a Pi and that sounds like a question for a Pi Forum.

...R

What OS will the Pi be running is all you should need to know. Pi is just the hardware.

You should be able set Linux up to boot up then load and run your app.
Same with Winblows and likely Android and OS2.

The Pi is running Linux or other OS?

Look in terms of the OS in this case. The board hardware serves the OS, communications will be by what the OS can do.

If you only need the simplest of G codes there is no way the Uno should not keep up.

Best way would be to have the Pi process the G code script and queue simple coordinate sets to the Arduino with a buffer 3x big enough to cover the tiny to humans, big to Arduino pauses in the Pi.

I did a lot of G code work between 79 and 83 for punch press, mill and lathe. The codes I put on the tapes had no decimal points. All numbers used leading zeros, the decimal point implied in fixed-point notation. That was industry standard which I doubt has changed. I see the display screen pics of that software showing floating point numbers and ask myself if that's just for human reading?

@GoForSmoke

You might check out Budvar10's 1284P Pro board. I bought one with 24MHz clock, it works great!
He is in Europe, IIRC in Slovakia (Budvar?) and the big part of the cost to me was shipping but I WANTED the board!

Hey, thank you sir. Nice to hear you benefit from boards. :slight_smile:

It's my Precious!

But really the extra speed is significant as are the extra RAM and pins.

I achieved loop() at over 120KHz for my blink 3 multiple random leds out of 9 while only drawing current on one at a time demo. It was for someone who wanted a battery powered display.

What exactly do you want to simulate? Why do you want to measure some stretch/stress, which you generate with the pump?

For the stepper motor, the driver must support the voltage and current required for your motor. The same for the power supply, stepper motors require much power. I'm not sure, though, whether a stepper motor will be fast enough to simulate a heartbeat in approximate real time. At least the (simulated blood) volume may become very small.

If you want to use a RasPi for display, the display must fit the Pi output (HDMI monitor?). A simpler OLED, LCD or TFT display can be controlled also by an Arduino. If you expect timing problems, two Arduinos, for the hardware and display, may be a good choice as well.