Automatic Pill Dispenser

I'm look for 3D printed and arduino files for Automatic Pill Dispenser that can Dispenser up 10 or 20 different pills at a time. I have a 3D printer.
Your would help be appreciated.

Hello
Do you have a budget to do this job?

A stepping motor turning a disc (with a hole for the pill) could be used.

A photo sensor would be used to count the number of pills deposited.

The disc stops moving when the count reaches what’s needed.

I have budget of 50.00 to do it all.

like this one Smart Desktop Medicine Organizer | Hackaday.io or SmartPill Dispenser by makersupv - Thingiverse. butt can not print them. they need to be split up in to individual file. I lack the skills to split the stl file into Printable files.

In what currency? This is an international forum.

usa

ask question in serial monitor question?
2 is not asking more then 1 question.

void setup()                
{
  Serial.begin(9600);           // set up Serial library at 9600 bps

  //Serial.clear(); //clear the screen
  Serial.println("1. Medication List");
  delay(1000);
  //Serial.println("------------------------------------------------------");
  delay(1000);
  Serial.println("2. Enter Name of Medication");
  delay(1000);
  Serial.println("------------------------------------------------------");
  delay(1000);
  Serial.println("");
}

void loop()                      
{
 if (Serial.available()) 
 {
  char set = Serial.read();
  Serial.println("");
  delay(2000);
  
  if(set == '2')
    {
      //Serial.clear(); //clear the screen
      Serial.println();
      //Serial.clear
      Serial.println("Enter Name of Medication");
      char var = Serial.read();
      Serial.println("Enter strength");
      //char var = Serial.read();
      Serial.println("Enter dosage");
      //char var = Serial.read();
      
    }
  }
}

You're guessing at what serial functions do, instead of looking up the documentation in the reference section on this site. The odds of that succeeding that way are very low.

Did you check Serial.available() before doing any Serial.read()?

Do all your Medication names consist of a single letter? The strength and dosage a single digit? Serial.read() only fetches one character.

no dosage single digit. no Medication names do not consist a single letter.

I need to for all of the Medication and all of the dosage and times to dispensed the Medication and pill count. Then can I store the data in xls?

Then I would like to get it working with a touch screen.
I will to I web front end for it all to work.

Now I some new code.

#include <String.h>

void setup()                
{
  Serial.begin(9600);           // set up Serial library at 9600 bps

  //Serial.clear(); //clear the screen
  Serial.println("1. Medication List");
  delay(1000);
  //Serial.println("------------------------------------------------------");
  delay(1000);
  Serial.println("2. Enter Name of Medication");
  delay(1000);
  Serial.println("------------------------------------------------------");
  delay(1000);
  Serial.println("");
}

void loop()                      
{
 if (Serial.available()) 
 {
  char set = Serial.read();
  Serial.println("");
  delay(2000);
  
  if(set == '2')
    {
      //Serial.clear(); //clear the screen
      Serial.println("Enter Name of Medication");
      String read_string = Serial.readString();
      Serial.print("You entered: ");
      Serial.println(read_string);
      Serial.println();
      delay(2000);
      Serial.println("Enter dosage");
      char var = Serial.read();
      //Serial.println("Enter dosage");
      //char var = Serial.read();
      
    }
  }
}

When the project is finished, will you need the Serial interface? Or, is that just for testing? Is the idea that you will convert to screen code, like:

      lcd.print("You entered: ");
      lcd.println(read_string);

?
In such a case, where would the input be coming from?

Serial interface for testing I do have arduino 7" touch screen yet.
Web front end and touch screen keyboard.
How do I get it to ask the next question. it is not println Medication Name.

Would it be easier to do it in html then have the arduino dispensed the pill at the right time?

Well, on that one point, I would not suggest depending on an internet connection to dispense medication. Some sort of reliable time like an RTC or such seems necessary. You seem to make progress with the code you wrote, so why not just continue to work on it and do more testing?

A serial to XLS communication depends on the CSV format which allows column input in ASCII.

Some of your questions seem to dwell on how the user interaction should work. You should consider it as a "user session" that goes through a series of simple steps to collect data. By defining the steps, they become easier to code.

I will not depending on an internet connection.
web interface. I will 192.168.x.x:xxxx to use it or wail up to it and will dispensed the pill. web interface will be for input.

HIPAA is your worst nightmare you have no idea the nasty alligators in that dirty water.

For fun and demo, look into projects published on colored candy: MM's, Skittles, etc. Then think hard on how you would do this if you could not rely upon color.

Could you trust a human to load the machine? How would human error be prevented?

What about controlled drugs? How to secure and dispense? How to move dispensed "packaged" drugs to patients ... Federal, State, local laws may have implications.

it is for me. not for resale.

Then copy, enhance, research along this template:

https://create.arduino.cc/projecthub/makersupv/smart-pill-dispenser-07a43f

Then how will you keep time?

clock bored.

I think the choice of LCD screen or Web interface for configuration, is more of a product design decision, than a technical one.