Showing posts with label servo. Show all posts
Showing posts with label servo. Show all posts

Thursday, 16 February 2017

Weighing for Stall Torque

So a while back, Alastair and I, made a watering system for the greenhouse. It was fantastic. For the three days we used it.

It was in fact, the end of Mine and Louise's greenhouse cycle as we'd got the allotment late and had nothing left to grow, however in the last two weeks we've started planting out cauliflower, red onions and parsnips in the spare bedroom so will shortly need to use the system again.

So I called back the technical support of Alastair, and alas during testing (We're well disciplined technicians) the closing of the tap by the servo was failing. It appeared that the servo was struggling on its return either because the tap was stiff or there wasn't enough power.

Alastair - being the Einstein he is - suggested we tested the force the servo would need in order to turn the tap. So our first test was to thread string around the handle roughly 1cm from the pivot point. We then hung a plastic cup from this and slowly added water.

Test 1: Cup on a string and add water
********************
Lesson 1: If you use a knife to put holes in your cup and then add water. The water will eventually reach the holes and pour all over your counter.
********************
The water wasn't heavy enough to move the tap at all, and in fact didn't make turning it any easier.
Let's move on. 

The next thing to try was a random ball of lead that weighed roughly 600g. This still was unable to turn the tap on its own. However once we added a hammer to the top it quickly turned. Great? Not quite. So we now weren't seeing the effective weight power we needed to turn the tap because it was imprecise between the weight of the lead, and the weight of the lead and the hammer. 


********************
Lesson 2: Do not put lead on the scales you use to weigh your food. Lead poisoning is a thing.
********************

Additional to our problems, attaching string to a tap in the way shown below, has added a cm to the distance from pivot making the maths more difficult and the whole thing a bit wild.

Knots are tricky

Eventually we managed to find some scales to make it all easier, some old style cooking scales.

We removed the top, held the tap steady and pushed down on the metal point of the scale until the tap slowly began to turn. We then measured the constant weight shown as the tap was turned. To add accuracy we repeated the test until we had some averages.

We found we needed around 820g of weight to turn the tap. We had been using the Tower Pro SG90 Mini Servo, 37-1330 which has: Stall torque - 1.8kg/cm (4.8V). Specs.

What's that I hear you ask? What is stall torque? It's a good question. At this point I had to ask Alastair what stall torque was and more importantly. Why we cared.

 ********************
Lesson 3: Find out why you are doing things before you do them.
********************
So, "Stall torque is the torque produced by a mechanical device whose output rotational speed is zero. It may also mean the torque load that causes the output rotational speed of a device to become zero, i.e., to cause stalling." Thanks Google!

So we were finding out how much stall torque power we needed for a 5v servo (4.8v) in order to make the tap turn. The answer was 820g to make it go down/open. However in reverse, we had to push it up with other factors such as going against gravity, water flowing etc. we would need additional power and force. Evidently, since the current servo was struggling to do this, it needed more than 1.8kg of stall torque to close the tap.

So we decided to just up the ante and use a more powerful servo. Which we had planned to do when we first saw it wasn't working.

To conclude, it was an interesting and exciting waste of time which I thoroughly enjoyed.

Monday, 22 August 2016

An Arduino Powered Watering System

So it's finally been made.
In preparation for our trip to Italy, Louise's housemate Alastair and I have made an Arduino Powered Watering System.

The idea we formulated was to have a large water butt which lets water flow into a secondary container at set times. Once in the morning and once at night outside of the intense sun hours.
This secondary container will have water taps that are always on so water flows through. This was designed so we only have to power one servo to let all the water supply needed out in one go.

The list of things we needed and our estimate prices were;
----
rechargeable 12v battery lead acid - £8 - £20
Solar Charge Controller Panel Battery Regulator Safe 10A 12V/24V - £5 - £10
Tower Pro SG-90 SG90 9g Micro Servos  £2 -£4
Arduino Uno R3 - £5
25L - 45L tub - £7 - £25
long plant plot with flat sides - £3 - £10
air tight water taps - £3 - £4 each most retailers (5)
hose pipe - £5
Solar panel charger 10W 12V £15 - £40
2 Channel 5V High Level Trigger Relay Module - £1.50 - £5
Car wire Fuse - 15p
Dc Dc Step Down Converter Voltage Regulator 24v 12v To 5v Usb Charger Voltmeter - £1 - £3
------------------------------------------
In the end the total cost was: £80 (including broken parts) + £10 for a wooden frame
------------------------------------------
First we created a wooden stand to hold the 35L tub we had, hastily constructing it on the allotment using tools from the shed we'd inherited with the plot. We made sure there was just enough room for the secondary containers shelf so that the water was as high as possible. The higher the secondary container the easier water would flow into the pots using gravity alone.
The stand with two shelves


We then fitted the solar panel, a 12v 10w device that we connected to the roof of the greenhouse using bolts and a bit of wood. Making sure the solar panel faced south so as to get sun from morning to night. The solar panel hooked to the solar regulator which we attached to the left front stand so we could easily see the battery levels.
The regulator has three connection points; + and - for the solar panel, + and - for the battery and + and - for the thing being powered. In our case the Arduino. 


********************
Lesson 1: Just because an Arduino can take 12v input... it does't mean it should. 
hint - smoke and fire
********************
The servo - chosen after the terrible instrument called the solenoid, read more HERE - was attached to a water butt tap which it turns 75 degrees to an open position for x amount of seconds before closing. It then repeats the process having left enough time for some of the water to have got into the soil.


********************
Lesson 2: If you can't find the right resistor, do NOT connect a 12v power source to a 5v servo
********************

To make sure the servo isn't always on and therefore draining battery. The servo needed to have power to it stopped when not needed. To make this happen, the arduino was connected to the relays IN1 so that control of whether to power the servo could be decided by us. We then wired the servo to the IN1 relay output so it could be powered in these time.


Now. Lesson 1 taught us what havoc charging 12v to 5v device could cause, so we decided to obtain a 12v to 5v step down convertor, this would allow us to regulate the incoming power to the arduino and the servo whilst also reducing power usage.

 ********************
Lesson 3: Powering a step down convertor in reverse - 5v in the 12v ports and vice versa - results in ringing ears

********************

The next thing we added, to reduce the possibility of blowing everything up too often was the fuse, which meant the fuse would take the fall. Its actually had some value and we've only blown one up so far!

In all these fires and explosions, the only thing we haven't destroyed yet is the 12v car battery which has thus far served us well. This also connects to the solar regulator -  a very simple device that controls how much energy the Arduino receives, how much the battery takes and when to fill up the battery. 


The final pieces to discuss is the secondary tub. This is only suppose to fill up with just enough water to release into the taps connected to its sides. It does't need to be large as it should be dispensing water at the same rate it is receiving it. If it isn't then you are releasing too much water, either from the primary store or the taps aren't open enough.

**********************************

Below is a picture of the system drawn out:


**********************************

In Action:




If you would like to see the arduino source code, feel free to email me on aiden.g@live.co.uk