Btw joy of audrino etal… Cheeeeeep..cheep micro ( surface mounted chips and board for less than the through hole chips)…cheep shiveld. ..just bought ultra sonic range findedr shield module for less than the transducers…and for some. .solder less construction using chips not available in though hole…
For me ..1 to 10 units..audrino. ..100 upMicro controller AMTEL or arizona microchip PIC or ASIC….. Just a matter of scale really. ..
As for the original posts – yeah, Arduino can do that (though I doubt FFT can be done if the chip is on a par with PIC's). The problem you may have with using an Arduino is one of spec creep – will you be just satisfied with what you say in your post? Or will the inner geek in you start to show a bit and make you think "Wouldn't it be good if it could…?" in which case, I doubt it would be long before an Arduino isn't good enough! C'mon, who doesn't do this???
Iain
No Iain i don't believe that spec creep would be an issue, i only want the thing to work and that would do. What happened was i was given an old industrial warehouse door opening mechanism about 5 or 6 years back. A forklift truck would approach the large rubber door and when near would break an infrared beam, when the beam was broken the door would open (open sesame) and be held open by the mech until the forklift had gone through or stayed open if something continued to break the beam.
The mechanism itself was a great bit of kit , containing a small but very torquey motor, and an electronics board. With various pot's and things on the board i was able to get the motor shaft to turn 90 degrees, and i encorporated the door opener into the turning target you see in the picture below. I connected the shaft of the motor to one of the target uprights (near the can of paint) and connected the other three targets to the powered one via tie-rods.
The thing worked great, an electrician in the club replaced the infrared beam sender with a simple switch. There the happy story ends, the club had a bit of a civil war with the usual politics and other rubbish and the target was never allowed onto the range, but was chucked outside in the elements. When we did manage to get it out on the range after about three years, the thing wouldn't work well. What happened next really annoyed me, everyone and his wife decided to dismantle it and have a mess around with things they didn't understand (now i know what soldier proof, idiot proof etc means). People with zero technical or any sort of engineering experience suddenly become experts ….until the time comes to put it back together and all the parts are in a heap and then they suddenly aren't.
Anyway the thing has finally been dropped back in my lap with the task of getting it going, hence my idea of a stepper motor and an arduino.
Hi Ronan,
I assume the above picture shows the mechanical arrangement. If so do the 3 targets sit on the 3 vertical pairs of wooden supports and does it only stop in 2 positions, face on and edge on ? In your original post you say that you need to control how long the motor runs for. Does this mean that you need to control the time taken to move between the two positions ?
Hi Ronan,
I assume the above picture shows the mechanical arrangement. If so do the 3 targets sit on the 3 vertical pairs of wooden supports and does it only stop in 2 positions, face on and edge on ? In your original post you say that you need to control how long the motor runs for. Does this mean that you need to control the time taken to move between the two positions ?
Les.
Thanks les, there are four pairs of uprights if you look closely, hard to see in the photo i know. Yes the motor stops in two positions as you say, edge on , and then rotates 90 degrees to be face on. Its not the speed i want to control (but i want them to turn as fast as possible) but how long the target is face on. I don't actually know the times, but i think its 10 sec's , 20 sec's and 5 mins.
I'd be tempted to resort to a 555, a relay, a handful of switches and a set of trimmer pots for setting the delays (and I'm a big AVR fan).
Neil
(Confession, I'm planning an AVR box to show whether each dogs or cat has been fed or needs feeding, I did wander off into thinking it could have an LCD display with a colour picture of each animal and a touch screen)
I'd be tempted to forget all about messing with home brew and get 3 el-cheapo timer relays, screw 'em to a small box and not worry about people getting electrocuted, beaten or shot for messing about in the box as there would be nothing in there to mess with! Added bonus, relays have built in ready to use power output stage and all nicely CE approved….
Neil – I KNEW I wasn't the only one trying to resist spec creep urges! Liking the LCD idea!
Assuming the targets are not fairly heavy, and assuming ease of putting it together is more important than cash, you can get stepper drivers pre-built and tested from Ebay for Arduinos (or anything else for that matter) for a few quid each. L298N based drivers are popular. Get an Arduino board as well and simply connect them together – Arduino to driver to motor (OK, there's a bit more to it than that, but not much more). There is bound to be some tutorial for the Arduino to control the motors, similarly for adding buttons and doing some timing. And then off you go.
If you have a search on Google for "arduino with 3 stepper motors" there's plenty to look at. Adafruit and SparkFun are two sites with plenty about Arduino and stepper motor drives. In fact, this page **LINK** is a good starting point. Sparkfun are based in the US, but there's a UK equivalent called Cool Components and both will sell you the bits, too.
Hi Ronan,
I think using a stepper motor is just adding complication to the project. I would suggest just using a permanent magnet DC geared motor with limit micro switches. Just reversing the polarity would drive it to the opposite position The 2 micro switches would be wired in series with the motor and each micro switch would have a diode in parallel with it so it would only stop the travel in one direction. You could use a micro controller but Neil's suggestion would work just as well. I use a similar idea to this to open and close curtains but instead of using micro switches I have an over current sensor that gives an output when the motor stalls at the end of travel. This is actually controlled by a PIC micro controller. As well as removing the power to the motors when over current is detected it also limits the time the motors are driven as a backup. The unit is powered from a plug in timer which comes on for 2 minutes at night an 2 minutes in the morning. The unit remembers which direction it last moved using the EEPROM memory.
I 'played' with PICs, The Arduino environment is just much easier and quicker to develop in. If you already know PICs and assembler, have favourite libraries of code etc then maybe stick with them. If you are coming new and want to dabble then Arduino is much more accessible than PIC.
It all just works. You can get the whole thing running and blitz through 10 tutorials in a morning. If you don't know any programming, C is easier to tweak than assembler. Lots of shields have serial interfaces and C makes processing serial data much more simple than assembler. I would guess that after a day or less of tutorials you could feel confident you could get a 16×2 LCD shield displaying selected output from a GPS shield (e.g. to create a super accurate clock) as an easy project completed within an hour (and you would probably feel confident you could tweak the clock to trigger an annual event with micro-second precision).
You don't get code bloat on the board – the whole running program is refreshed with every download. (You may get bloat on your computer… but so far my experience is that libraries available on the web tend to follow library management best practice which leaves your computer in an easy to manage condition).
If you just want to coordinate control of multiple real-world things without a lot of manual input then Arduino is a great place to start looking.
If you think you need a keyboard and/or a sophisticated graphical display then start with the Pi.
It you want to have input, display, and all sorts of sensors in the smallest packaging… then it is difficult to beat a 'smartphone' with Android.
But for the original poster's requirement… I'd vote off the shelf timer relays and limit switches.
These arduino and raspberry pi devices seem to be ideal for all sorts of control uses around workshops and the home. As few things now are solely either mechanical or electronic, surely there might be a place here on this forum for a specific section for them and projects related to them ?
> These arduino and raspberry pi devices seem to be ideal for all sorts of control uses around workshops and the home. As few things now are solely either mechanical or electronic, surely there might be a place here on this forum for a specific section for them and projects related to them ?
That's why we set up an 'electronics in the workshop' topic! I'm not going to split it given the relatively low traffic in it.
I 'played' with PICs, The Arduino environment is just much easier and quicker to develop in. If you already know PICs and assembler, have favourite libraries of code etc then maybe stick with them. If you are coming new and want to dabble then Arduino is much more accessible than PIC.
It all just works. You can get the whole thing running and blitz through 10 tutorials in a morning. If you don't know any programming, C is easier to tweak than assembler…
Jack,
I know and I completely agree. If you read the rest of what I wrote, you'll see that I did say I've been using PICs for years and have enough knowledge and kit for them that I can't justify using Arduinos, hence "But I can do that with a PIC…". You'll also see I did say they were great for people who were just starting out and didn't have knowledge of things like PICs, AVR's, Stamps, etc.
As for software bloat, I'm not talking about the PC but on the chip itself. To be so easy to use and accessible, there must be a level of auto code generation used by Arduino dev system, right? Auto code generation is never the most efficient of things. And if you need a cross assembler as well (writing in C needs one, which Arduino provides) then it can get worse. Cross assemblers are notorious for adding extra steps in the chip's code that are not really needed. This all takes up memory and processing time. Not an issue for the OP's application, but may be a problem for more complicated projects.
Jack, I think you've taken my post and assumed I'm anti-Arduino. I'm not. Far from it, I like them a lot. They are extremely useful and they are perfect for people starting out. I know many electronics engineers who use them for prototyping because of the ease of development and I would look at using them myself, if I didn't have the kit for something else already – hence my second post in this thread ( I was pricing up while finding links for this thread… well, I am a geek, and geeks can never have TOO much dev kit! )
Iain
*Cross assembler: translator between high level languages like C/BASIC/ADA, etc., and assembly/machine code.
Arduino is best as a building block, and a relatively painless introduction to microcontrollers
If you use PIC (spit!) or AVR (swoon!) the advantage is that you can choose the best chip for the job in hand, they also make more sense if you are already making custom PCBs for your projects.
If you don't like assembler, you can use WinAVR/GCC to program AVRs in C.
AVR Studio 6.2 is a free (massive) download and very good. Studio 4 is also good and a bit simpler to find your way around, but avoid 5. Both available from Atmel's website.
It's not a prelude to a debtate on the pros and cons between them – they often turn heated if you look at electronics forums! They seem comparable in terms of offerings, performance, price, etc., and as I've never used AVR's, I'm genuinely interested in your thoughts.
I got into AVRs because a bunch of professional electronic engineers threatened me with extreme violence if I went down the PIC route.
Consensus seemed to be (at that time) that AVR were much more code efficient and logical (therefore easier) to use, and also AVR are built to be optimised for code written in C, whilst Microchip offered far better support to non-professional users and much better (and reliable) datasheets, which meant there was an awful lot of beginner stuff 'out there'. In short AVR was best if you were had access to some experienced users, PIc if you were a beginner on your own.
Clincher for me was that it was very, very easy to move from 6502 assembler to AVR assembler.
I think the PIC architecture is less unfriendly now, but I'm just totally hooked on AVR.
I guess I came from the other direction, albeit enforced. I got into PICs because the small company I worked for at the time had a project in need of a micro but couldn't justify the expense of what I had been using previously (Siemens C505's, 8051's etc). Dev kits for them, especially software environments, were very expensive at the time (late 90's) and the project couldn't bear the cost of a £5 or £6 micro for the quantities we would be building.
Then I remembered an article in a model R/C aircraft mag about using PIC's for servo mixing and I had a look at them. Our distributors were a bit snobbish about PIC's ("you're a company, not a hobbyist!!" ) but the financial constraints of a small business meant a hobbyist outlook was definitely the best way to go – cheap dev kits, free software development system, cheap parts that were easy to get, and as you say, a lot of beginner stuff out there that made my learning curve very steep, but very short (and yes, it was just me doing the work). I went from knowing very little about PIC's to building and programming relatively advanced things within a week, pleasing my boss no end (an accountant, not an engineer). I guess that experience means that, like you with AVR's, I'm forever hooked on PIC's.
Had that servo mixer article used AVR's instead of PIC's, though, I'd have probably used them instead. Flip of a coin, eh?
Jack, I think you've taken my post and assumed I'm anti-Arduino. .
A misunderstanding. I can't remember feeling disagreement with any of your writings.
I guess my motivation was to encourage people to try Arduino, even if they tried and gave up on PICs. I'm talking purely for a dabbling beginner doing one off projects.
Well basically bigger motors cost more..have more costly drives..and power supplies. ..the toy like motors are controlled ( arduino end of things) in just the same way…so a project developed for a tiny motor is scaled to a “full” size motor by adding a heavier drive.. The exercises in these starter kit might seem toy like but demonstrate the “full” size requirements.. Apart from mass inertia and cost.
To learn with, just a basic Arduino 'Uno' R3 will be quite satisfactory. Mine came with a micro-USB cable. This is all you need to get started but once underway a breadboard and a few LEDs and other components will help you play around in the real world.
As there is little difference in price, it pays to buy the real thing (and not a clone) in my view – if only for the build quality. A number of people distribute them in UK, such as these people;
**LINK**
It cost's £18.65 (inc VAT) here, which is about the right price (you may find it slightly cheaper but I haven't checked). Assuming the USB cable comes with it, then that's all you need to get started. Just download the free development software and start programming it. The boxed unit is smaller than a pack of cards and is powered off the PC – so I take mine on holiday (something to do when away from the workshop) – Much better than Sudoku!
I work with Siemens S7 controllers and Siemens Micromaster 420 inverters but only have the basic requirements to operate them and was wondering if the Arduino kits can help me learn a bit more about the internal workings of these devices particularly programming, the UNO R3 looks a good start, do I need another board to mount LED's switches etc to the R3, I also noticed a board for driving motors/steppers, will the motor board accept and use feed back from sensors, encoders etc.
It is a clone, so contrary to IanT's good advice. To buy something like this from Maplin seemed to cost £80+ and I just felt like taking a punt… which seems to have paid off. Everything seems to work. The stepper is a bit stiff in one direction. There is no documentation delivered with the kit but you should find that you can complete many of the on-line tutorials with the components available in this kit. It seems to be supplied and supported in the UK and the contact is very quick to respond.
If you can afford to spend more and want to maximise the chance of having the easiest introduction then take IanT's advice. Get a starter kit from Maplin which comes with documentation and bits for the tutorials.
If going down the route of steppers, then I chose to start with a dedicated shield. There are lots so which one? I bought an Adafruit v1 compatible board http://www.amazon.co.uk/SainSmart-L293D-Shield-Arduino-Duemilanove/dp/B0081JPBA6/ref=pd_sim_sbs_ce_2?ie=UTF8&refRID=0AM9F9JCQ8NHHRVV20ZB BUT I intended to get the v2 which seem to be much better. So my advice, not based on experience, would be to start with Adafruit v2 stepper shield – I'm not sure where to get it from as the original AdaFruit requires you to get out your soldering iron.
Never worry about the toy appearance about some of these things. There is not a single electronics engineer I know, myself included, who does not feel a certain child-like glee from making a microcontroller turn an LED on or off. It's the hardware equivalent of software's "Hello World!". They're useful for debugging things, too, not just software, but hardware and the link between the micro and a PC.
And as Jason points out, controlling the toys is usually little different to controlling the big stuff – it might be an LED now, but add a relay and it's power to the motor of a CNC Miller tomorrow, you know?
Give **LINK** a try as a source for things. They do a lot of Arduino.
Jack
Misunderstanding understood… er… you know what I mean! He he! And again, I completely agree about beginners and dabblers. They sometimes get the bug and turn into experts which encourages others to dabble – and that's no bad thing, at all.