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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Arduino
  • Products
  • More
Arduino
Arduino Forum My first Arduino prosject.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 6 replies
  • Subscribers 402 subscribers
  • Views 576 views
  • Users 0 members are here
Related

My first Arduino prosject.

Former Member
Former Member over 13 years ago

My Projekt is to automate a Dillon 650 reloading machine.

image

In stead of operating the machine manualy by hand i vant it to be driven by a air sylinder.

So i need to controll a 24V air valve by sensors to make the sylinder go up and down.

So when the sylinder is in Pos 1, it triggers sensor 1 and gives 24V to the sylinder valve and the sylinder goes out to Pos2.

When the sylinder reaches Pos 2, it cuts of the 24V to the valve and the sylinder goes back ti pos 1.

This shall countinue on only interupted by 2 microswithes that controlls supply of parts to the machine.

When there is no supply of parts to one of the parts the machine stops at Pos1.

The sensors that is yoused is FESTO SME-8-K5-LED-24.

http://www.festo.com/cat/de_de/DKI3PortSearch.asp?qry=SME-8-K5-LED-24

I have not desiced the power situation yet, 2 suppkys?

9 Volt and 24 or..?

Later on i probably want to conect it with my computer and mabye have something grafical showing if its possible.

Sometime later on i also want to conect some kind of conter so i can deside how many operations before stop.

Have orderd me Arduino Starter kit Spark Fun.

The mecanical is finniched this afternoon so im on the rigth way here.

 

Thanks for all the help you can give.

 

 

John

  • Sign in to reply
  • Cancel
Parents
  • DAB
    DAB over 13 years ago

    I would keep the voltages low and make double sure you insulate all connections.  Gun powder is not something to play with.

    I used to load shotgun shells for my father back in the 1960's.  Back then it took a good amount of effort to pull the lever to run the load activation.  I have no doubt that the modern version is probably easier to use, but you should do some testing to find out the energy needed to run the device.  That information should give you some data for selecting your components.

    Next I would use a lot of sensors to make sure that everything is set before you make the shell.

    A friend of mine had a neighbor help reload his dad's shells and at the next trap shoot each shell went boom boom, but would not break the clay pigeon.  Once we opened a shell, we found that it had been loaded twice with powder, but no pellets.  They made great prank rounds, but they were useless for hunting or competitive shooting.

     

    Good luck,

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • DAB
    DAB over 13 years ago

    I would keep the voltages low and make double sure you insulate all connections.  Gun powder is not something to play with.

    I used to load shotgun shells for my father back in the 1960's.  Back then it took a good amount of effort to pull the lever to run the load activation.  I have no doubt that the modern version is probably easier to use, but you should do some testing to find out the energy needed to run the device.  That information should give you some data for selecting your components.

    Next I would use a lot of sensors to make sure that everything is set before you make the shell.

    A friend of mine had a neighbor help reload his dad's shells and at the next trap shoot each shell went boom boom, but would not break the clay pigeon.  Once we opened a shell, we found that it had been loaded twice with powder, but no pellets.  They made great prank rounds, but they were useless for hunting or competitive shooting.

     

    Good luck,

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 13 years ago in reply to DAB

    Having now worked on a part of this project, and ist a bit on the way.

    Have replaced the sensors with the NC micro switches as it was easier to get to work.

    My program looks like this so far:

    /*

    ** Automatic Reloading.

    */

     

    #define SOLENOID_1 4

    #define SOLENOID_2 5

    #define ENDEBRYTER_BOTN 6

    #define ENDEBRYTER_TOPP 7

    #define KULE 8

    #define HYLSE 9

    #define KRUTT 10

    #define STARTSTOPP 11

    #define MANUELL 12

    #define MANUELL_LED 13 //  LED on 13

     

    #define av false

    #define paa true

     

    #define TIMEOUT 5000 // Timeout , if the sylinder uses more than destenated tilme from buttom to top it shuts off.

     

    bool status = av, manuell = av, stempel_stoppa = false;

    long siste_start;

     

    void setup(void)

    {

      pinMode(SOLENOID_1, OUTPUT);

      digitalWrite(SOLENOID_1, LOW); // So the sylinder does not start when you turn on the power button..

      pinMode(SOLENOID_2, OUTPUT);

      digitalWrite(SOLENOID_2, LOW);

     

      pinMode(MANUELL_LED, OUTPUT);

      digitalWrite(MANUELL_LED, LOW);

     

      bryterpinne(ENDEBRYTER_BOTN);

      bryterpinne(ENDEBRYTER_TOPP);

      bryterpinne(KULE);

      bryterpinne(HYLSE);

      bryterpinne(KRUTT);

      bryterpinne(STARTSTOPP);

      bryterpinne(MANUELL);

     

      // Here it shoud be set to some kond of start position.

      nullstill_presse(); 

    }

     

    void loop(void)

    {

      if (status == paa) // So that it does not start by pressing or activating the swithes...

      {

        if (bryter(STARTSTOPP)) // Turn off

        {

          stempel_stopp();

          nullstill_presse();

          status = av;

          while (bryter(STARTSTOPP)); // Vent til ein slepp knappen før ein går vidare.

        }

     

        if (bryter(ENDEBRYTER_BOTN)) // Stempelet er heilt nede og pressa er i utgangsposisjon.

        {

          if (stempel_stoppa) // Stempelet er allereie stoppa

          {

            // Skal alle ting vere på plass når pressa er i utgangsposisjon? Dvs. skal kule,

            // krutt, hylse og hette vere tilstades slik at det berre er å køyre ein runde?

            // Og er ein runde alltid stempel opp + stempel ned?

     

            if (manuell) // Er vi i manuell-modus?

            {

              // Ja, vent på eit trykk på start/stopp-knappen

              while (bryter(STARTSTOPP) == false);

              while (bryter(STARTSTOPP) == true);

            }

            else // Nei, "auto"-modus. Då ventar vi 500ms før vi snur stempelet.

            {

              delay(500); // Vent 500ms

            }

     

            if (bryter(KULE) && bryter(KRUTT) & bryter(HYLSE))

            {

              stempel_opp();

              delay(300); // Her må vi vente lenge nok til at stempelet har begynt å

              // bevege seg og endebryteren er slått ut! Elles vil løkka sørge

              // for å stoppe stempelet igjen før det eigentleg har starta...

            }

            else

            {

              // Her burde ein gi melding om kva som er gale. Enten med nokre

              // indikatorlamper eller eit LCD-display.

            }

          }

          else // Endestoppbryteren er trigga og stempelet går framleis

          {

            stempel_stopp();

          }

        }

     

        if (bryter(ENDEBRYTER_TOPP)) // Stempelet er i øvre posisjon.

        {

          if (stempel_stoppa)

          {

            if (manuell) // Er vi i manuell-modus?

            {

              // Ja, vent på eit trykk på start/stopp-knappen

              while (bryter(STARTSTOPP) == false);

              while (bryter(STARTSTOPP) == true);

            }

     

            // Må ein her sjekke noko? Kule, krutt etc? Eller kan vi berre

            // snu stempelet? Eg går ut frå det siste.

            stempel_ned();

            delay(300); // Som over, vent til stempelet har begynt å bevege seg.

          }

          else

          {

            stempel_stopp();

          }

        }

     

        // Timeout. Dette fungerer slik at kvar gong ein snur stempelet så noterer ein seg

        // eit tidspunkt (i millisekund). Så sjekkar vi her om det har gått meir enn X ms

        // utan at ein av endebrytarane er aktivert. I så fall kuttar vi lufttilførselen.

        if (timeout())

        {

          stempel_stopp();

        }

      }

     

      if (status == av)

      {

        stempel_stopp(); // Berre for sikkerheits skuld

     

        if (bryter(STARTSTOPP)) // Slå på pressa

        {

          nullstill_presse();

          status = paa;

          while (bryter(STARTSTOPP)); // Vent til ein slepp knappen før ein går vidare.

        }

      }

     

      if (bryter(MANUELL))

      {

        delay(50);

        while (bryter(MANUELL));

        manuell = !manuell; // Sette manuell-status til det motsatte av det den var

        digitalWrite(MANUELL_LED, manuell ? HIGH:LOW); // LED-en på pinne MANUELL_LED indikerer manuell-status av/på

      }

    }

     

     

    // Sette ein pinne til INPUT og aktivere intern pull-up

    void bryterpinne(int pinne)

    {

      pinMode(pinne, INPUT);

      digitalWrite(pinne, HIGH);

    }

     

    // Sjekke status på ein bryter. Forutset pull-up og bryter kobla mellom pinne og jord.

    bool bryter(int pinne)

    {

      return digitalRead(pinne) ? false:true;

    }

     

    // Nullstille pressa.

    // Eg veit ærleg talt ikkje kva som trengs her, eller *om* det trengs.

    // Men eg ser for meg at ein berre køyrer stempelet til utgangsposisjonen.

    void nullstill_presse(void)

    {

      if (bryter(ENDEBRYTER_BOTN))

        return;

     

      stempel_ned();

      while ((bryter(ENDEBRYTER_BOTN) == false) && !timeout());

      stempel_stopp();

    }

     

    // Stoppe stempel

    void stempel_stopp(void)

    {

      digitalWrite(SOLENOID_1, LOW);

      digitalWrite(SOLENOID_2, LOW);

      stempel_stoppa = true;

    }

     

    // Køyr stempel opp

    void stempel_opp(void)

    {

      digitalWrite(SOLENOID_1, HIGH);

      digitalWrite(SOLENOID_2, LOW);

      siste_start = millis();

      stempel_stoppa = false;

    }

     

    // Køyr stempel ned

    void stempel_ned(void)

    {

      digitalWrite(SOLENOID_1, LOW);

      digitalWrite(SOLENOID_2, HIGH);

      siste_start = millis();

      stempel_stoppa = false;

    }

     

    // Sjekke om stempelet har tima ut

    bool timeout(void)

    {

      if (millis() - siste_start > TIMEOUT)

        return true;

     

      return false;

    }

     

     

    I will transelate this as son as i get the time.

    #define SOLENOID_1 4                    Relay for making the sylinder go one way

    #define SOLENOID_2 5                    Relay for making the sylinder go the other way

    #define ENDEBRYTER_BOTN 6       Microswitch bottom position

    #define ENDEBRYTER_TOPP 7       Microswitch top position

    #define KULE 8                               Microswitch bullets

    #define HYLSE 9                             Microswitch shells

    #define KRUTT 10                            Microswitch powder 

    #define STARTSTOPP 11                 Start/stopp button

    #define MANUELL 12                       Button for manuell mode 

    #define MANUELL_LED 13 //           Led for showing manuell/auto mode

     

    Can you see some obvious misstakes in this program, i cant get it working.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • MDeGrauw
    MDeGrauw over 13 years ago in reply to Former Member

    Hi,

     

    I would never use regular switches(sparks), use fully sealed reed switches. They use a magnet for switching and the contact(spark) is inside the sealed area.

    So when sparks occur I am not the one tell my neighbor I blew up my shed.

    Also don't use any plastics without investigation of electrostatic build up and discharge. Electrostatic discharge can setoff the gunpowder.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • MDeGrauw
    MDeGrauw over 13 years ago in reply to MDeGrauw

    Ok sorry forgot to mention when you want to be safe checkout the ATEX requirements. These tells you about voltage and current maximum values for controlling, handling and monitoring explosive materials with electronic equipment.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to MDeGrauw

    Thank you for your concern and consideration but I have thought of this and sealed the powder so that the sparks from switches shall not have the ability and egnite the gunpowder.

    Am also considering the finished product for safety's sake.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to Former Member

    Have updated a bit transelating.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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