element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Upcycle It
  • Challenges & Projects
  • Design Challenges
  • Upcycle It
  • More
  • Cancel
Upcycle It
Blog Upcycle It - Washing Machine Hydroponic Grower - #7 Drum RPM Calculation
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: nandohila
  • Date Created: 24 May 2017 2:34 AM Date Created
  • Views 987 views
  • Likes 5 likes
  • Comments 5 comments
  • hydroponics
  • upcycle_it
  • stepper motor
  • washing_machine
  • rotary_growing_system
  • intel edison
Related
Recommended

Upcycle It - Washing Machine Hydroponic Grower - #7 Drum RPM Calculation

nandohila
nandohila
24 May 2017

To start programming the stepper motor control, I did some tests having the stepper motor turning the drum at different pulse frequencies.

 

Checking some other rotary growing systems I found that it normally takes 30 to 45 minutes to give a complete turn. I found it very slow (about 0.025 RPM). The beauty of having a stepper motor is that we can virtually set it at any speed below its maximum RPM.

 

I decided to physically check the drum RPM applying different pulse frequencies to the stepper controller and measure the turn time. Doing this test I could get the constant relation in between pulse width (ms) and the actual drum RPM.

 

Below is the code for the testing. I set different pulse frequencies at different pins so I shift the pulse wire through the pins and measured the rotation time.

 

 

 

//Pulses pins 13, 9 & 8 at different frequencies

 

 

const int pulsePin13 = 13;             // pin 13 @ 1000ms (on board LED)

const long interval13 = 1000;          // interval at which to pulse pin (milliseconds)

int pinState13 = LOW;                  // set pinState to 0

unsigned long previousMillis13 = 0;    // store last time pin was updated

 

 

const int pulsePin8 = 8;              // pin 8 @ 50ms

const long interval8 = 50;            // interval at which to pulse pin (milliseconds)

int pinState8 = LOW;                  // set pinState to 0

unsigned long previousMillis8 = 0;    // store last time pin was updated

 

 

 

 

 

 

 

//Pin13

  if (currentMillis - previousMillis13 >= interval13) {

    // save the last pulse time

    previousMillis13 = currentMillis;

 

 

    // if the pin is off turn it on and vice-versa:

    if (pinState13 == LOW) {

      pinState13 = HIGH;

 

const int pulsePin9 = 9;              // pin 9 @ 100ms

const long interval9 = 100;           // interval at which to pulse pin (milliseconds)

int pinState9 = LOW;                  // set pinState to 0

unsigned long previousMillis9 = 0;    // store last time pin was updated

    } else {

      pinState13 = LOW;

    }

 

 

    // set the pin with the pinState of the variable:

    digitalWrite(pulsePin13, pinState13);

  }

 

 

//Pin9

  if (currentMillis - previousMillis9 >= interval9) {

    // save the last pulse time

    previousMillis9 = currentMillis;

 

 

    // if the pin is off turn it on and vice-versa:

    if (pinState9 == LOW) {

      pinState9 = HIGH;

    } else {

      pinState9 = LOW;

    }

 

 

    // set the pin with the pinState of the variable:

    digitalWrite(pulsePin9, pinState9);

  }

 

 

//Pin8

  if (currentMillis - previousMillis8 >= interval8) {

    // save the last pulse time

    previousMillis8 = currentMillis;

 

 

    // if the pin is off turn it on and vice-versa:

    if (pinState8 == LOW) {

      pinState8 = HIGH;

    } else {

      pinState8 = LOW;

    }

 

 

    // set the pin with the pinState of the variable:

    digitalWrite(pulsePin8, pinState8);

  }

 

 

 

 

void setup() {

 

    pinMode(pulsePin13, OUTPUT);

    pinMode(pulsePin9, OUTPUT);

    pinMode(pulsePin8, OUTPUT);

      

}

 

 

void loop() {

 

 

  unsigned long currentMillis = millis();

 

}

 

The results are the following:

Pin 8: 50ms - 1m 15s per turn = 0.8RPM = 48RPH

Pin 9: 100ms - 2m 30s per turn = 0.4RPM = 24RPH

(I didn't take the time for 1000ms, it would take ages and I was happy with the consistency of the previous results)

 

This gives us an inversely proportional relation of 40. Therefore, dividing 40 for the required RPM, we can get the interval to set the program to give the required pulses.

 

As the drum will normally be set to under 1 RPM, seeing such small RPM values might be awkward so I am using RPH "Rotation per Hour".

 

At this stage will limit the range to be set from 1 RPH to 60 RPH (1 RPM). I don't need anything faster than 1 RPM but I might want to try the balearicdynamics suggestion injecting more gravity to the plants in the future. I am not sure about the results but it sounds fun.

 

Maybe in the future, we could also have a database with the best turning speed for the different group of plants so it can be easily set once we start a new cycle.

 

Below is a table with some values relating RPM, RPH and pulse interval.

 

RPMRPHPulse Interval (ms)
0.016712400
0.033321200
0.16400
0.166710240
0.424100
0.84850
16040

 

As we are going to inform the desired RPH through MQTT. Once we get the RPH value we need to calculate the Pulse Interval as following.

 

Pulse Interval = 2400/RPH

 

After all the boring stuff you can relax having a glimpse of the drum turning at 0.8 RPM or 48 RPH

 

image

  • Sign in to reply

Top Comments

  • DAB
    DAB over 8 years ago +2
    Nice update. Now that you know the range, you can experiment with which cycle times optimizes the growth for which plants. This will be a very cool long tern project as you plant, grow and document your…
  • nandohila
    nandohila over 8 years ago in reply to DAB +2
    Don't worry @DAB will keep posting the results I get for every harvest!
  • jc2048
    jc2048 over 8 years ago +2
    I'd go for time-per-rotation myself. That seems more natural to me than trying to puzzle out what 0.0333 RPM might mean. Did you consider move-and-pause, move-and-pause, as an alternative to continuous…
  • nandohila
    nandohila over 8 years ago

    I ended up using RPH (Rotations per Hour) this way I will be dealing with numbers from 1 till 60 RPH. The first test will be running at 3 RPH that is about the rate the commercial units turn. After having the first harvest than we go wild.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • nandohila
    nandohila over 8 years ago in reply to jc2048

    Hi Jon, I am also thinking to adopt the time per rotation so will be an easy reading number.

    Regarding the fast rotation it is a very good idea stopping the plants to absorb the  nutrient and than turn it faster. But I will leave this experiment for latter.I will first have it running at a very low pace as the commercial units do and once I get it running well I can compare the output turning it at high speeds. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 8 years ago

    I'd go for time-per-rotation myself. That seems more natural to me than trying to puzzle out what 0.0333 RPM might mean.

     

    Did you consider move-and-pause, move-and-pause, as an alternative to continuous movement? At the faster rates of rotation the plants aren't going to be in the nutrient bath at the bottom for very long. There might be a case for quickly rotating the plant round to sit in the bath, leave it to sit there for a moment or two, then bring the next one round.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • nandohila
    nandohila over 8 years ago in reply to DAB

    Don't worry @DAB will keep posting the results I get for every harvest!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 8 years ago

    Nice update.

     

    Now that you know the range, you can experiment with which cycle times optimizes the growth for which plants.

     

    This will be a very cool long tern project as you plant, grow and document your results.

     

    Hopefully you will continue to blog your results.

     

    DAB

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube