help with my sketch anyone please....

const int TxPin = 6;       //lcd pin const int buttonPin1 = 2;  //pins that are for const int buttonPin2 = 3;  //buttons to open valves const int buttonPin3  =  4;                       // and pumps const int buttonPin4 = 5;    const int pumpPin = 9;        //pin that turns on the pump    const int valvePin1 = 13;        //pins that run valves const int valvePin2 = 12;       const int valvePin3 = 11; const int valvePin4 = 10; int buttonState1 = LOW;           //setting the button state to low int buttonState2 = LOW; int buttonState3 = LOW; int buttonState4 = LOW; const int PROBE1=A0, PROBE2=A1, PROBE3=A2, PROBE4=A3; int MOISTURE_LEVEL = 250;                              //the value after the valves and pump goes ON #include SoftwareSerial mySerial = SoftwareSerial(255, TxPin); void setup() {        pinMode(pumpPin,OUTPUT);    // sets pumpPin to output    pinMode(valvePin1,OUTPUT);    // sets valvePins to output    pinMode(valvePin2,OUTPUT);    pinMode(valvePin3,OUTPUT);    pinMode(valvePin4,OUTPUT);    pinMode(TxPin, OUTPUT);          //lcd pin to output    digitalWrite(TxPin, HIGH);            digitalWrite(pumpPin, LOW);         digitalWrite  (valvePin1,LOW);    digitalWrite(valvePin2,LOW);    digitalWrite(valvePin3,LOW);    digitalWrite(valvePin4,LOW);    mySerial.begin(9600);    mySerial.write(22);                // turns display on    mySerial.write(17);                // turn on lcd back light      mySerial.write(12);                 // Clear  LCD    delay(5);                          //required delay after clear Lcd                                    } void loop(){    mySerial.write(128);        // sets sets lcd cursor to line 0 space 0   mySerial.print("S1-");      mySerial.write(148);           // sets lcd cursor to line 1 space 0   mySerial.print( "S2-");      mySerial.write(168);              //sets lcd cursor to line 2 space 0   mySerial.print("S3-");      mySerial.write(188);              //sets lcd cursor to line3 space 0   mySerial.print( "S4-");      mySerial.write(132);               //sets lcd cursor to line 0 space 4   mySerial.print (analogRead(A0));    mySerial.write(152);               //sets lcd cursor to line 1 space 4   mySerial.print (analogRead(A1));    mySerial.write(172);                //sets lcd cursor to line 2 space 4   mySerial.print (analogRead(A2));     mySerial.write(192);               //sets lcd cursor to line 3 space 4   mySerial.print (analogRead(A3));                if (analogRead(A3) < MOISTURE_LEVEL) {     digitalWrite(pumpPin, HIGH);     digitalWrite(valvePin1, HIGH); }    else   {     digitalWrite(pumpPin, LOW);     digitalWrite(valvePin4, LOW); }   if (analogRead(A1) < MOISTURE_LEVEL)   {     digitalWrite(pumpPin, HIGH);     digitalWrite(valvePin2, HIGH); }   else   {     digitalWrite(pumpPin, LOW);     digitalWrite(valvePin2, LOW); }       if (analogRead(A2) < MOISTURE_LEVEL)   {     digitalWrite(pumpPin, HIGH);     digitalWrite(valvePin3, HIGH); }   else   {     digitalWrite(pumpPin, LOW);     digitalWrite(valvePin3, LOW); }    if (analogRead(A0) < MOISTURE_LEVEL)   {     digitalWrite(pumpPin,HIGH );     digitalWrite(valvePin1, HIGH); }   else {     digitalWrite(pumpPin, LOW);     digitalWrite(valvePin1, LOW); }

Topic by s1im   |  last reply


Convert airgun/Paintball gun to be fired by a computer (12v solenoid valve)

Hi!I have a project this summer where I need to convert a paintball marker and a co2 Airpistol to be fired by the use of a solenoid valve powered by 12v.The project goal is high-speed photography, more or less photographing object being hit by a projectile.What i need is a way to fire these guns precisely by the use of my computer and software, and since I already have plenty of 12 solenoid valves that work with this system I thought my easiest way is to adapt these valve to trigger the guns one way or another.I just purchased a Valken V-TAC SW-1http://www.valken.com/Marker-V-TAC-BLACKHAWK which I plan to use as base (for parts) My reason for getting this particular one was that it was on sale for 50% and seems to be fairly popular as it's based on the Tippmann 98 design.I attached an image of the valve I used with my controller and software (Cognisys Stop shot) now I can probably use any 12v solenoid valve (with the same spec ?) as the one I use now so it doesn't need to be these exact valves. As long as they can be operated by turning on-off power with the same powersource i use to control my current solenoid valves.From my understanding, most airguns use a pin valve, which is hit by a trigger mechanism that is then rearmed by the blowback.What would be the best way to modify an airgun for my needs? Replace the pin valve with a suitable solenoid i can control instead? Or go for a design that uses maybe use a piston and 2-way valve to hit that pin?The gun does not need to be mobile or ergonomic, it will be placed in a rig regardless, however keeping the barrel and keep the Picatinny is preferred to be able to mount marking aids etc. and mount the gun to a tripod.Any tips or suggestions are highly appreciated!Thank you!

Topic by PaulL320   |  last reply


Using a small solenoid to trigger a co2 hammer valve

Hello, I have a question that is integral to the design of a project i'm making. I am trying to make an airsoft gun. For a power source, I am using a 12 gram co2 powerlet. My main problem is the trigger mechanism. Since I want the design to be semiautomatic with no blowback, I decided on an electric trigger to avoid the long trigger pull associated with mechanical triggers. My valve is taken from an airsoft pistol magazine and is pretty small. It is operated by having the rear "button" of the valve hit with a simple hammer, which moves the valve pin and releases gas into the barrel. I want to use a small solenoid in place of the mechanical hammer. When activated, the solenoid's push end would snap forward and hit the valves "button." I was wondering if this is possible on any kind of smaller power supply? It doesn't seem like the valve button needs much more than a tap to dump a good amount of gas. All the projects i have seen like this are fairly large scale, for larger airguns, and they had to use large unreliable power supplies. I would like to keep this whole thing as lightweight as possible.  I was thinking that i could use a simple switch or circuit that would just dump some voltage into the solenoid for just a fraction of a second, to fire one shot for each trigger pull. Would this solenoid work? http://www.adafruit.com/products/413 Also, the valve I am using is tiny, about an inch long. The "button" that needs to be tapped to release gas is about 6 mm in diameter.  Is there any way to calculate the exact amount of force needed to trigger the valve?  Does anyone have any advice for me? 

Topic by ilpug   |  last reply


Remote control pool heat pump

I want to interface a esp8266 to my pool heat pump, the heat pumps all show 3 and 2 wire access. But it's not clear if i just put 12vac via a relay on the pins or not? Also the 2 wire connect appears to be digital?Any advice would be appreciated.Ps.. I have already had success controlling the valve actuators with 24vac and of course the pump with 120v relay. Just need advice on the heater.

Question by JimO44   |  last reply


home made car heater control help needed

I have a heater control panel from a 2010 dodge journey that I want to use in a custom made kit car. The control knobs are all based upon resistance, no IC's are used in the panel. The fan speed knob has 4 positions, off/low/med/high (only uses two pins on the board connector) The temp knob has 13 positions from hot to cold in which the AC is automatically triggered from the middle position to full cold, and the heat from warm to full hot (only uses three pins, one common and one for each side of the knobs range) The 3 position selector switch (face/bi-level/floor) also uses only two pins. This board is designed for a max of 5 volts, which I already have that instructable for that. But what I need help on is how to make 3 sets of controls for the various knobs. One for fan speed one for the heat/ cold and one for the position selector switch. Im trying to find a way to create a switching action created by various voltages as they are running through the control board, that will trigger 12 volt effects for the fan speed, and a servo for the heater duct changer. The heater knob will need to turn on or off the AC, and control a shut off valve for the coolant heater control valve. But like a RC servo it would turn in relation to the voltage applied. Would transitors work in this case? Any ideas? Id like to get past this and move into the fabrication of the system. But this is stopping me cold right now.

Topic by ydeardorff   |  last reply


Is this a good paintball gun?

I am thinking of getting the syndicate misfit paintball gun. Does anyone have one or experience with one. here are the specs: The Misfit is the ONLY marker in its class to operate at low pressure using CO2. Its precision performance and engineering detail make this marker the most powerful at its level on the market today. +2 piece 14" barrel +multi mode electronic grip frame +adjustable rate of fire up to 16 balls per second (BPS) +3 firing modes (semi auto, 3 round burst & full auto) +LED light Display +enhanced volumizer +3/4" gauge +vertical Feed +leak proof valve (US patent 3.553.983) +adjustable double trigger +push button safety +deluxe field strip pin +spring loaded ball detent +vertical adapter +external battery charging port +top & rear cocking +Gloss anodized finish (also available in green to black fade finish) +milled body +standard bottom line adapter +velocity adjuster with lock +adjustable in line regulator +all metal gun no plastic exterior parts!

Question by Thelonelysandwitch   |  last reply


Pressure system leak alert

Hi, from a brand new poster. I have a farm water pressure system in a shed, mostly watering troughs for stock. When there is a slow or fast leak, I waste water, at expense.  They could be broken valves to pin holes in pipes. The pressure is system is run by 240V mains, (Australia) via a plug into a socket, as normal. There is a smart meter in the shed. Stock generally don't drink much from midnight to 5am. If there is a constant leak, the pressure system will cycle during the night. What I want to know is, is there a way to trigger an indicator that shows the pressure system is cycling overnight between set hours (12 - 5am)?  Eg, a few cycles may be acceptable, 5-10 are not.  When noticed, I can go to the shed, further investigate, and reset the trigger. I also have capacity to read water pressure at my house, on the same system, which will fluctuate as the pressure system cycles.  If I could easily track and record the pressure fluctuations, I would also know if there is a leak. Apparently I could install a flow meter with a wifi or sms system, but that sounds expensive and complicated.  I don't use a flow meter as it is not needed. So we have power usage, pressure switch triggering, water flow, water pressure , noise, and pump heat as indicators, at the pump shed. I have line of sight to the shed from my house, about 500m away.  I could see any alert lights daily, both at dark in the evening, and in morning daylight.  They could be 240V or battery powered.  I am currently tapping into the pressure switch to run a light.  The problem is 1. I have to be awake then to check a light. 2. it takes time for long cycles to occur. For all I know there may be something available already, which I have not yet found. I don't have need, yet, to be alerted as an absentee manager (eg sms alert). I know there are fancy systems available for sale for that. Any technical ideas would be most welcome, thanks, including combinations of the engineers parameters - cheap, strong, quick.

Topic by farmfencer   |  last reply


My lawnmower left me saying "WTF" this morning...

Well, here's the deal.. Last night I took the mower deck off my rider, sharpened the blades, re-attached them, made sure it ran fine, which it did, worked like it has been for the past 3 months, parked it in the tarp shed and went inside. Well this is what really really made me snap. I was happy with it because I just fixed the tire and thought "Thank fuckin god it's back and working again" as it had sat up on cinder blocks for the past 2 weeks due to flat tires. Morning comes, beautiful day out, grass to mow. I go to start it, takes a few times (I thought it was odd, but didn't think much of it) and get it started. Well some past history first, this machine was fixed at a mennonite repair shop a year ago or so because apparently there was a peice of dirt stuck in the hole that a supposed pin drops into when the machine shuts off to stop the gas flow from going into the engine when it's off. They put a valve on the gas line aswell, well after that, it never went down all the way on the throttle or it would just stall. Well this morning, it seemed to be completely the opposite, it idled fine at the lowest throttle setting (I had a really confused look at the time) and at full open, it ran horrible and the whole frame was shaking because it was going up and down (the reving I mean). I tried to cut grass with it, and it goes for about 5 meters and then nearly stalls (still hasn't for some reason, but just barely) and then starts running again and spews out a shitload of smoke for a few seconds. I tried to "run" it off and it didn't even drained the gas and put new gas in, that was a wasted $10 trip to the gas station.As of now, it's sitting out in my yard, I don't want to touch it because it's pissed me off enough. Also, I took the air filter off and it seems that at one point it was spewing gas up out of the air inlet. Can someone please help me?!? I need this machine running as I cut grass for people. I vowed to myself I would permantly park this thing if one more thing broke, but it's getting it's last chance.** Forgot to add, it's a 12hp brigs and straton (type H I think?), and manufactured by murry (I know..sad).Second update:Uhhh...it appears to be fine?? It ran ok today, a bit touchy, but it seems ok, can someone care to explain how the hell this happened????!?, scrap that, it's fuxxored again. Arg, I need it for my lawn cutting needs!

Topic by Punkguyta   |  last reply


unfinished,5 DOF Robotic Mechanical ARM

5 DOF Robotic Mechanical ARM Required Material of project:- 1. Basic Servo Tower pro 9g*4 2. Header pins Male female*2 3. Arduino Nano*1 4.10kΩ Resistor resistance*2 5. Trimmer Potentiometer track Linear; maximum resistance 10kΩ*4 6. Tactile push button*2 7. Blank circuit board*1 8. Acrylic strips for Robot & potentiometer body*2 9. Wires, Button, Switch 10.Balsa wood, Metal, Plastic Procedure:- Arrange all necessary items.. Please go through the attached images  for better understanding.. I divide whole project in two parts 1) Servo Motor assembly 2) Potentiometer assembly 1) Servo motor assembly: – Servo motor as J1, J2, J3, J4 fix the servo motors as shown in image use 3M tape to glue servo, use thin flexible plastic strip to make griper, make hole in center of each finger tie thread in that hole pass this thread from center hole and tie knot at the other end of thread with 4th servo motor’s knob, as you stretch thread finger get close vise versa. Fix whole arrangement on strong rigid base. 2) Potentiometer assembly: – Fix potentiometer as shown in figure name potentiometer as do previous R3, R4, R5, R6 this time place R6 separately for easy access this potentiometer control gripper to pick and place. Potentiometer arrangement symmetry must be same as servo arm. Fix whole arrangement on strong rigid base. Moving a little bolt from one side to the other side:- 1. Actuators / output devices: 4 micro servos 2. Control method: controlled by a PIC16F690       assembler firmware 3. CPU: PIC16f690 micro controller 4. Operating system: self made assembler code 5. Power source: 4.8V to 6V from 4 battery cells 6. Programming language: PIC Assembler 7. Sensors / input devices: teach in system with                         4 potentiometers       Making Processer:- The Potis are standard types and are screwed to the white plastic parts with their nuts. The axles are pressed into the transparent plastic part. The handle to move the teach-in-arm is a M3-Spacer and the socket is a plastic part with is normally used to fix balloons on a stick to hold it.                     move the motor itself by hand a little force is needed due to its permanent magnets, which create a small holding force. But inside the servo a lot of gears increase the force which you have to apply. If you move the servo by hand, you have to apply a much higher force. If you overcome the motors holding force, it starts to rotate an acts as a flywheel. So moving a servo by hand needs a high torque and its not easy to turn it to the position where you want it. ( Fan control modules for engine cooling of real cars have some extra parts to clamp the voltage which is generated, when you drive at higher speeds. In that case the fan works like a windmill and creates higher voltages than normal inside the power stage of the module.) And there were also a lot of other "problems" which had to be solved using my PIC Controllers. i.e. self made electronics for a RC-Excavator which works similar to the digital system used in slot cars. To replace a lot of wires between the rotating part of the excavator and the track unit, a small PIC 12F629 reads the pulses from up to 5 channels of a RC-Receiver and leads their information via a 2 wire connection to a second PIC12F629. At the second board the power is separated from the data. The PIC is reading the data, and generates the PWM output for the 5 Servo output connector. the 2 wire connection is made with a cheap 6,3mm mono microphone plug which is also used as the axle for the rotating part. The arm of the excavator is also powered by standard servos and so it was necessary to change the control behavior from proportional to integral so that the servos move like real hydraulic cylinders which are controlled by valves. I used the same 12F629 type for that job and added some features like adjustable limit positions and starting point programmable by one jumper, and automatic return to park position when missing the pulses for some seconds. The Software is simple:- Its working like a servotester for four axis. That means, every poti is connected to an analog in of the controller and all servos are connected to GPIOs. The controller reads each poti, does some scaling, so that the angle of the poti equals to the angle of the axis and finally he creates the PWM output 1-2ms pulse every 20ms for all servos. Teach mode:- After a reset the robot arm follows the teach in arm while simple mapping the analog inputs every 25ms to the servo motors. Pressing the button stores each servo position in a array. Play mode: The sketch reads the array step by step and moves the robot arm. For cool looking movements I added a routine calculates different micro steps for each servo to have moving start and end sync on all axis. Also added a ramp for soft increase/decrease velocity. Shorter travel distances the robot does slow, longer distances with faster speed.           The program moves the servos at full speed to the next position and a short delay time after each command allows all of the servos to reach their final position. That means that it is possible to increase the speed a little bit more by doing some fine tuning of the delay times after each command. The final thing which is still not implemented is the routine which saves the "Teach In" data 5 or 10 times per second, so that the controller is able to replay it in a loop with the original speed or with a lower or higher speed. Electrical Connection:- Provide separate power supply (5V DC 1amps) to the Servo motors . Don’t forget to short ground of both power source ( arduino + servo) 5 DOF Robotic Mechanical ARM :- 1. Use of Fiber on upper side 2. wooden spoon is a part of side body 3. cable tie *12 pieces use the robotic. 4. Some pices of wires 5. use scraw*4 6. Glue 7. some small clips Because to attached body 8. small size of plastic box 9. One pieces of  square fiber stand and one pieces small & medium  circular fiber  10.  L293D Motor Driver IC+IC Base KG143 11. Generic Elementz High Quality Nickel Plated 24*18 Points Bread Board*(2 pieces) and one plastic 12. Push Button Switch. Play Mode version 1.1 The gripper input is used to set the delay (0,1,3,15,60,300 seconds) after a loop is done. The switch (it was left from the project start) pauses the robot.        Thanks you:

Topic by aarif1234