arduino uses ?

Advert

arduino uses ?

Home Forums Electronics in the Workshop arduino uses ?

Viewing 25 posts - 1 through 25 (of 145 total)
  • Author
    Posts
  • #31761
    ronan walsh
    Participant
      @ronanwalsh98054
      Advert
      #167610
      ronan walsh
      Participant
        @ronanwalsh98054

        I have a bit of expertise with plc's and ladder logic, not a huge amount but enough. Looking on youtube and various electronic forums the arduino seems to be a simplified or baby plc. Am i correct ? Can it be programmed to control outputs from various inputs like a plc can ?

        Could i use one for instance to control a stepper motor with three separate on buttons to control how long the motor was on for, say 20 sec's , 30 sec's and 1min ?

        #167611
        Michael Gilligan
        Participant
          @michaelgilligan61133

          Ronan,

          I am just about to plunge headlong into Aduino … with a view to driving my 5-Phase Stepper Motor [as discussed in another thread].

          One of the most convenient reference documents I have found so far, is this from RS Components. … It contains many useful hyperlinks to material on the main Arduino site.

          Note: Driving regular 2-Phase Steppers is much simpler.

          MichaelG.

          .

          P.S. Thanks to Jason Udall for his encouragement and support.

          Edited By Michael Gilligan on 24/10/2014 22:20:32

          #167612
          Mark C
          Participant
            @markc

            Ronan,

            This post was perfect timing for me! I am putting a PLC system together that runs a couple of inverter drives and other stuff including HMI screen controls with modbus serial network linking it all up!

            I also need to do some FFT on the input sensors to get a particular set of frequency magnitudes out for control loop return and the PLC ladder logic just can't cut it….. so I am using an Arduino to do signal processing in real time and dump the conditioned response on the stupid PLC – and you think an Arduino is a cut down PLC, that makes me chuckle! The Arduino is much more capable and is close to the PIC microcontrollers that I am used to as far as I can see but with less development work needed as the hardware probably already exists

            Mark

            #167613
            Michael Gilligan
            Participant
              @michaelgilligan61133
              Posted by Michael Gilligan on 24/10/2014 22:18:18:

              Note: Driving regular 2-Phase Steppers is much simpler.

              .

              These boards are available from many ebay sellers.

              I've ordered mine from that seller because he's selling in fives … Fingers crossed, they are likely to be five from the same batch.

              Note that the complete board, from China, is about half the price of buying just the chip from a UK supplier.

              … Funny Old World.

              MichaelG.

              #167614
              Mark C
              Participant
                @markc

                Michael,

                You might have been better off with the genuine article, I got the Arduino mega 256 development board and a couple of motor drive boards – £30 ish for the Arduine and £15 ish for the motor boards and they have two drivers on each I think. Also, as they are all Arduino make (if such a thing exists) they all plug together in a stack – they appear to be called "shields" probably due to them shielding the main board?

                Mark

                #167615
                Les Jones 1
                Participant
                  @lesjones1

                  Hi Ronan,
                  The Aduino is not just one device. It is a family of boards that use different members of the ATMega family of Atmel microcontrollers. The Arduino develpment environment is aimed at programming them in "C". They could also be programmed in assembler using Atmel studio and programming them using an external programmer. The Atmel range of 8 bit chips have some advantages over the PIC 8 bit family. The Atmel devices clock the processor at the crystal frequency where the PIC processor is clocked at 1/5 of the crystal frequency. The Atmel chips also have vectored interrupts where on the PICs you have to identify which type of interrupt has caused the interrupt in software. You could also consider Texas MSP430 launchpad but I have found the development environment for this much more difficult to use then the PIC or Atmel development environments.

                  Les.

                  #167617
                  Michael Gilligan
                  Participant
                    @michaelgilligan61133
                    Posted by Mark C on 24/10/2014 22:49:42:

                    Michael,

                    You might have been better off with the genuine article, I got the Arduino mega 256 development board and a couple of motor drive boards – £30 ish for the Arduine and £15 ish for the motor boards and they have two drivers on each I think. Also, as they are all Arduino make (if such a thing exists) they all plug together in a stack – they appear to be called "shields" probably due to them shielding the main board?

                    Mark

                    .

                    Mark,

                    You may be right [I don't know enough to know] … but I want to drive the five-phase motor in its vintage mode, which involves five bi-polar connections instead of the new-fangled Pentagon wiring.

                    £8 has bought me five Boards, each with two Full H-Bridges, [so I have 100% spare, in case the magic smoke appears]; which I shall probably arrange in a nice Pentagonal pattern, with some LED indicators; so that I can easily monitor what's going on.

                    So far as I am aware, none of the standard sheilds would offer any real improvement in convenience, and I would need a minimum of three [=£45 at your pricing] to drive five phases.

                    MichaelG.

                    .

                    Note: If driving in Pentagon-wired Mode, you need half-H, not Full-H … which narrows the choice of chip, I believe.

                    Edit: Here is the "official" Motor Shield

                    Edited By Michael Gilligan on 24/10/2014 23:28:53

                    Edited By Michael Gilligan on 24/10/2014 23:29:42

                    #167618
                    Mark C
                    Participant
                      @markc

                      Michael,

                      My mistake, the driver I have is only capable of driving a single stepper, but it can drive two brushed motors at 2A. When you see what is on it 2A sounds and looks ambitious but RS tend to be reliable with their specifications so it must be right….

                      Mark

                      #167619
                      Another JohnS
                      Participant
                        @anotherjohns
                        Could i use one for instance to control a stepper motor with three separate on buttons to control how long the motor was on for, say 20 sec's , 30 sec's and 1min ?

                        Ronan – Yes. I've been programming Arduinos for a while – one bit was designed for a conference in Italy in early 2007, and some other designs have been used by others in the intervening years.

                        Purchase one – they are cheap – it's the best way of figuring them out.

                        Most of the "RepRap" and equivalent printers use the Amtel processors, but without the Arduino overhead, so, yes, you can drive steppers.

                        One of my favourite uses is in creating model railway controllers (Lenz DCC compatible) for small, easy to use controllers.

                        It's all fun stuff – and learning is always a good thing.

                        #167620
                        ronan walsh
                        Participant
                          @ronanwalsh98054

                          Thanks for the replies. The jargon is a little off putting , so can i ask any abbreviations are explained for the first bit of this thread please ? Otherwise its like reading a russian phonebook.

                          The motor i want to power is for a system for a local target shooting club, they shoot a turning target at intervals of (i think) 10 secs, 20 secs and 1 (possibly 2) mins. What i want to do is have three momentary buttons , one for each time interval. So when each button is pressed the motor down range is activated and rotates 90 degrees and holds its position for the time alloted by the button. Can wireless be used ? Eg. a control box with the buttons and arduino in it connecting wirelessly to the stepper motor and its controls downrange (25 meters approx) ? Also do stepper motors (relatively large ones) have any issues with overheating if powered for a long (1-2 mins) period of time ?

                          From my plc days i know its relatively simple (via plc control), i just have zero experience of these arduino's and am a complete novice with them.

                          What about controlling a rotary table/dividing head using a stepper and arduino ? Sounds do-able.

                           

                          Edited By ronan walsh on 25/10/2014 00:41:38

                          #167622
                          Mark C
                          Participant
                            @markc

                            Ronan,

                            You mean me?

                            Sorry, it's been a long day and I have spent most of it talking acronym. Anyway:

                            HMI = Human Machine Interface (used to be MMI or Man Machine Interface before political stupidity took over) or the little touch screen you might find working machines.

                            PLC = programmable Logic Controller or industrial computer running the machine.

                            FFT = Fast Fourier Transform which is a way of getting the magnitude of individual (or small groups) frequency in a complex analogue signal (more or less but you need to dig a little if you have never come across them).

                            PIC is part of the name given to Microchips RISC integrated circuits, try searching for PIC 16F84 and you should find one of their offerings.

                            Mark

                            PS, I would have edited the original post but don't seem to have that ability anymore?

                            Edited By Mark C on 25/10/2014 01:15:54

                            #167623
                            ronan walsh
                            Participant
                              @ronanwalsh98054

                              No Mark C , not picking anyone out , just in general. Thanks for taking the time to reply wink.

                              #167629
                              Michael Gilligan
                              Participant
                                @michaelgilligan61133
                                Posted by ronan walsh on 25/10/2014 00:08:58:

                                Thanks for the replies. The jargon is a little off putting , so can i ask any abbreviations are explained for the first bit of this thread please ? Otherwise its like reading a russian phonebook.

                                .

                                Ronan,

                                That was my initial experience, too … which is why I was so pleased to find, and share, the document from RS Components … Have you read it? and have you followed the hyperlinks?

                                • One of the most convenient reference documents I have found so far, is this from RS Components. … It contains many useful hyperlinks to material on the main Arduino site.

                                ​Now: On a practical level; I suspect that [for your shooting target] you might need a bigger motor than the typical small two-phase bi-polar that the L298 chip can drive … but you should be able to build a scaled-down "proof of concept" using readily available components. Let's call that one "Model Engineering", and thus avoid the wrath of those who might not approve of this topic

                                devil

                                MichaelG.

                                #167630
                                Michael Gilligan
                                Participant
                                  @michaelgilligan61133

                                  Ronan,

                                  You may find this short document of interest.

                                  I doubt if you will need to know about the Pentagon Drive, but the document does usefully illustrate how the H-Bridge and half-H are used. [note that the very popular L298N chip incorporates two full H-Brige circuits, which are controlled independently]

                                  There is much, much, more information "out there".

                                  MichaelG.

                                  #167633
                                  Les Jones 1
                                  Participant
                                    @lesjones1

                                    Hi Ronan,
                                    If you are familiar with programming PLCs I think I remember seeing a design that created a PLC using a PIC or Atmel micro. You may be able to find the design using Google. A wireless link should be possible using various wireless modules that are on the market. Some types would just in effect provide extended wires to the push buttons. There are other types that would provide a serial link. (As used to connect VDUs to computers years ago.) Although Bluetooth can provide this type of serial link it would not have the range. I would rule out using WiFi communications because of the complexity. To rotate a target by 90 Deg. each time could be done using just a geared motor with a disk mounted on its shaft. the disk would have four notches cut in its edge. A micro switch would be positioned so it rubbed on the edge of the disk. When the notch came round to the micro switch the switch would open. This switch would be in series with the motor so the motor would stop when the switch opened. To cause the motor to rotate by 90 Deg. all you need to do is to short out the micro switch for a short time (Just enough for the notch to pas by the micro switch.)

                                    Les.

                                    #167636
                                    Douglas Johnston
                                    Participant
                                      @douglasjohnston98463

                                      Posted by ronan walsh on 25/10/2014 00:08:58:

                                      Thanks for the replies. The jargon is a little off putting , so can i ask any abbreviations are explained for the first bit of this thread please ? Otherwise its like reading a russian phonebook.

                                      A very good point, I am sure some of the complicated electronic stuff can only be understood by very few people on this forum. I have played about for years with basic electronic circuits and have started to use the picaxe system for some simple ideas, but my mind goes numb when I read some of the posts that are filled with electronic jargon. I would love to know more but I feel my brain is in terminal decline, so please take pity on some of us who can't keep up with the jargon.

                                      Doug

                                      #167638
                                      Gordon W
                                      Participant
                                        @gordonw

                                        I don't want to put anyone off learning about modern electronics, but I have found I have had to learn a a new language. And I am finding it hard going, hopefully it will be easier for the younger people! Probably most of it is already known.

                                        #167639
                                        Mark C
                                        Participant
                                          @markc

                                          Gordon,

                                          The problem I find is that I can understand the language that was current when I learnt this stuff but the youngsters invent their own names and these become the default – end result is that you have top learn it all again or try and keep up. If you don't keep up learning again is like trying to learn another language as you then start remembering the conventions you learnt but trying to associate them with the new names!

                                          Mark

                                          #167640
                                          Michael Gilligan
                                          Participant
                                            @michaelgilligan61133

                                            Just to get one apparently daft piece of nomenclture out of the way:

                                            "Shield" appears to be the jargon generic term for any add-on circuit that is configured to be electrically and mechanically compatible with [at least some of] the Arduino boards.

                                            MichaelG.

                                            #167641
                                            Michael Gilligan
                                            Participant
                                              @michaelgilligan61133
                                              Posted by ronan walsh on 25/10/2014 00:08:58:

                                              What about controlling a rotary table/dividing head using a stepper and arduino ? Sounds do-able.

                                              .

                                              Ronan,

                                              I don't wish to be rude, but:

                                              Why not try putting three relevant words into a Google search ?

                                              like this.

                                              MichaelG.

                                              .

                                              Edit: just noticed that my link includes superfluous reference to the Browser, so here is a truncated version.

                                               

                                              Edited By Michael Gilligan on 25/10/2014 10:42:52

                                              Edited By Michael Gilligan on 25/10/2014 10:43:21

                                              Edited By Michael Gilligan on 25/10/2014 11:05:35

                                              #167647
                                              Anonymous

                                                I am afraid that the definition of the Fast Fourier Transform (FFT) given above is not strictly correct. The FFT is simply an algorithm for calculating the Discrete Fourier Transform with far fewer multiply-accumulates (MACs) than the direct approach.

                                                To start at the beginning, the Fourier Transform is an integral transform that transforms from the time domain to the frequency domain, and vice versa. The transform is inherently complex (in that it uses complex numbers) even if the time domain signal consists only of real numbers. To describe a given sinusoid in the frequency domain one needs to specify amplitude and phase; which inherently leads to a complex number. Many modern systems, like your mobile 'phone, use complex time signals as well.

                                                The Discrete Fourier Transform is simply a sampled version of the Fourier integral, where the integral is replaced by a summation sign. The output is a series of discrete frequencies, but complex as before. The DFT can also be represented as a matrix multiplication. For a input sequence of N points the DFT requires on the order of N² operations. Each operation is complex, so it requires four real multiplications and two real additions. This can get out of hand pretty quickly! Let's say we want to do a FFT of 1024 samples every 1ms for real time control. That's not particularly fast, but it will involve 1024*1024 = 1048576 operations in 1ms. That's one operation roughly every 1ns, and remember each operation is four multiplies and two additions. You ain't going to be doing that on a PIC, not even one of their mini-DSPs!

                                                The original Fast Fourier Transform was described by Cooley and Tukey in 1965. In essence it takes the matrix form of the DFT and splits the matrix into a series of matrices, each one of which is calculated in turn. At first sight this doesn't seem to be a sensible thing to do. But it turns out that the coefficients in each of the matrices are far simpler than those in the original DFT matrix. In fact the first matrix in the FFT only involves 0, 1 and -1. The upshot is that the FFT can be used to calculate the DFT using on the order of N*log2(N) operations. So for our 1024 point DFT that is 1024 times the log base 2 of 1024, which is 2 to the power 10, so 1024 x 10 = 10240. Quite a reduction in MACs! One issue with the basic FFT is that the results come out in bit reversed order. Some DSP chips have special instructions for re-ordering bit reversed data.

                                                There endth the lesson, as I need to get my rear in gear and tackle the jungle that is masquerading as my garden.

                                                If anybody is interested in the mathematics I can write some of it down and post it in an album. It is not really amenable to trying to write it within a post.

                                                Regards,

                                                Andrew

                                                Note: DSP = Digital Signal Processor – a processor optimised to calculation MACs and used for high end real time signal processing

                                                #167661
                                                Cornish Jack
                                                Participant
                                                  @cornishjack

                                                  …." What did Horace say, Winnie?"

                                                  … for those of a certain age!!

                                                  Rgds

                                                  Bill

                                                  #167664
                                                  JES
                                                  Participant
                                                    @jes

                                                    There are not many of us left

                                                    JES

                                                    #167667
                                                    jason udall
                                                    Participant
                                                      @jasonudall57142

                                                      Re. Target rotator..

                                                      Unless you want some sort of speed control ..I would go with a simple dc motor (perhaps a wiper motor from a car)..you get a hi ratio gear box an right angle drive for “free”..and as suggested some sort of encoder disk for the target..
                                                      If you don’t need to rotate /reverse..and can rotate. Pause..rotate.. allclockwise say..the whole thing becomes ssimpler. .

                                                      Even if using an arduino .would advise the notched disc..so you can tell the arduino the target is in play or parked..
                                                      If you need to do wireless “shields” and software ( firmware?) Libraries exist..
                                                      Blue tooth is maybe a bit short range ( and vulnerable if paranoid)
                                                      I would if more than a few metres use a serial link..with an arduino each end and rs485 serial drivers..( serial communication and rs485 is a hardware protocol good for about 15 km)..
                                                      Or failing that just use twelve volt power and optocouplers at arduino ..
                                                      What I am suggesting is arduino under target near motor..micro switch sensing the “park” notch on disc..
                                                      Wiper motor turns target one way..motor relay driven directly from arduino ( 5V 200ohm coil switching whatever load and voltage of the motor..)..diode across relay coil to protect arduino.
                                                      Opto couple inputs for your switches…one wire each out to remote box along with +12V….
                                                      Add one extra button since you have arduino at motor end…”RANDOM”…
                                                      After a random number of seconds the target turns for say a random duration. ..

                                                    Viewing 25 posts - 1 through 25 (of 145 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up