Hello, forgive me I'm very new to this and have a lot of research to do. I was just hoping that someone could outline what i need to do and point me in the right direction.
the knowledge i have so far is limited. i have a 3d printer and are familiar with the stepper motors, i know there are stepper motor drivers that plug into the arduino and know the arduino connects to the power supply and i suppose to the LCD. And i have flashed the arduino with newer firmware, but did not write that firmware at all other than changing a single value. I do not have any experience writing software for programming the arduino but i think this is something i would be able to learn
basically what i want to build is a device to pump out precise measurements of liquids in grams with a peristalic pump. Ideally there would be an LCD with a simpler numeric control to set the desired weight in grams needed, press "go" and the stepper motor would run and pump out the correct amount by rotating a peristalic pump. Another option would be a feedback from a scale that could connect to the arduino i suppose.
I'm guessing that I will have to manually run the pump to see how much the pump outputs per revolution, and then use that calculation for the arduino to figure out how many revolutions are needed for the desired weight when inputted.
I suspect this is not really all that hard in it design, however doing something like this is completely new to me. I guess I need to know how to setup a numeric pad to input weight, and tell the arduino how long to run the stepper to get that weight and any pieces of hardware that would be needed.
I know this may be a lot for a first post, and trust me i will be reading plenty in this forum, I feel im opening a new door. I just want some guidance on where to find the info i need and some suggestions on what I need to do to accomplish this task, thank you in advance!
My suggestion is to leave the LCD stuff until last as the LCD code can clutter up the program. Just use the Arduino Serial Monitor for input and output until you have an otherwise working system.
Many 3D printers use A4988 or DRV8825 stepper motor drivers which are physically interchangeable. The DRV8825 can handle a bit more current - up about 1.7 amps per motor coil. An A4988 can only provide about 1.4 or 1.5 amps.
These drivers cannot be plugged into an Arduino such as an Uno or Mega because the design of their pin layout is not intended for that. You can get an CNC shield for an Uno or a RAMPS shield for a Mega that will take those drivers. Or you can just hook the driver up to the Arduino with suitable wires. For a low current motor (say 300mA or so) you could probably use a soldeless breadboard - at least for testing.
Start with a program from this Simple Stepper Code. When it is working I suggest you connect the motor to your pump and do some tests by changing the number of steps to determing how many steps are needed for different quantities of liquid.
The Pololu website has lots of detailed info about both the A4988 and the DRV8825.
Robin2:
My suggestion is to leave the LCD stuff until last as the LCD code can clutter up the program. Just use the Arduino Serial Monitor for input and output until you have an otherwise working system.
I used to do it that way, then found a few times it was even more tricky to retro-fit the lcd code. So what I do if I anticipate needing an lcd is copy the lcd parts (library, begin etc) from a known-good lcd-enabled sketch into my new one, and at least get a welcome screen sorted in setup(). Then yes, still using Serial for quick debugs, I try to keep the lcd code more or less in synch with the main development. I find that better than trying to get all the lcd stuff done at the end. Works for me, anyway.
Just to respond to @meltdowns proposal, your LCD code shouldn’t be /interleaved/ with the program logic.
If well written - your use of functions() should handle the core capabilities - and the addition of LCD or other bolt-on functionality.
The primary object of the project is to drive a stepper reliably & precisely, then bolting on the i/o and other gloss is extra to the game.
Just to be clear, I didn't suggest that the display logic be interleaved with the key program logic. That the functionalities can be developed in parallel doesn't mean the functionalities are interleaved in the code.