Such is my enormous grasp of modern technology – that when I tried (several times) to "paste" the link into my post – the (pasted) link kept shooting to the start of the post – instead of where I wanted it at the end….
the Arduino Nano looks like a useful component to incorporate into DIY projects
now I'm spoilt for choice
John
Pro mini is even smaller, and cheaper as you are not buying the serial thingy every time. Another advantage of Arduino is that there is so much help out there on the web, from help pages to complete code you can download and use, or modify to suit your own needs, although I often find it difficult to understand oher people's code (they would probably find it difficult to understand mine, totally self taught so probably doing everything against convention!). I started with PICs, even bought a fancy development board which was pretty expensive. I wouldn't go back. If using the Arduino standard commands gets cumbersome, you can still do direct port and register commands, as I did when building my stepper motor controller.
Fascinating subject AVR vs PIC but not a decision beginners need to worry about much I feel. Both processor families have advantages and disadvantages, but both are very capable. Which is better: red or blue; day or night; up or down?
Unless you have very particular needs at the outset, you might just as well flip a coin. But beware, once invested in one of these technologies, your natural reaction will be to hate the other and the idiots who foolishly support it. Nothing will change your mind, not even if God calls in person with evidence proving you wrong.
For what it's worth I've used both PIC and AVR. For historic reasons I prefer C / AVR and have used nothing but for several years now. I particularly like Arduinos because they make life easier, not because they always provide the best or cheapest solution. A very slight change of circumstances could easily have ended up with me loving PIC to bits instead.
My advice is not to be put off by apparent complications. I can recommend the Arduino Uno as a good starter and others will be able to recommend equivalent PIC boards. They're not wrong. Whatever you do don't buy and learn both types – life is too short!
Ah Silly Old Duffer…my Arduino co-conspirator. May I say how much I enjoyed reading your article about your data acquisition system. I'm doing something very similar for my rocket engine project. One of the good things about Arduino is it is supported by NI Labview and can be programmed using it. Beaglebone and RPi are also supported. I'm using the Arduino with Labview now, another reason why I favour it.
Wise words on your part regarding choice of microcontroller system. I started out with Basic Stamp, then went to PICS with PICBasic then PICS with assembly language. I also experimented with the mbed for a while.
I settled on the Arduino simply because it is so much simpler and there is so much online support. I can just get things done far quicker.
At the end of the day it is a case of horses for courses and I wouldn't rule out using a PIC (or other device) if it better suited the application.
(Hmmn – that link went where I wanted it to that time Michael – but I still don't know why)
BTW – There are quite a few Micromite 'form-factors' now available, including some very high powered versions if you really need them (e.g. Micromite 'Extreme' )
Dave, I don't disagree with what you say generally and if I do need to automate my rotary table, then I wouldn't start over from scratch with the MM, I'd just use the Arduino code on my Uno to do it – why re-invent wheels?
But there are things that probably only I will want to do (my own 'homebrew' solutions) such as on-board controls for my Gauge 3 locos (which I also scratch build). My reference to 'OAPs' wasn't therefore completely accidental – I'm only too well aware that I only have time enough for so many projects – and learning multiple platforms & languages isn't one of them.
So whilst I agree that (to the user) the choice between Atmel or PIC chips is often academic (although I thought MC had recently acquired Atmel), the PIC32 is the top of the Microchip performance range & designed for embedded use (there are also already three PIC32 families that provide a growing choice of S/W compatible products). I only really want (have time) to get into one chip architecture & language and the PIC32/Micromite combination seems to fit my needs. I intend to develop on my Explore 64 board (just testing an IR controller – it's just a couple of lines of code) but I will normally 'deploy' on 28 pin DIL MM's (a minimum configuration of which can be just the PIC32 and a 48muF cap) – two components – total cost < £5.
With regard to costs, the PIC32 is extremely powerful but does cost a pound or so more than other available chips and this would certainly be a big factor if I was designing for commercial products. However, as mentioned, I'm unlikely to ever need more than a handful of chips/controllers, so a pound or so difference in cost is not going to be an issue for me. Simplicity in use and speed to implement is important to me however. Just my personal perspective….
I'll let this thread get back to Rotary Tables now…
Ah Silly Old Duffer…my Arduino co-conspirator. May I say how much I enjoyed reading your article about your data acquisition system. I'm doing something very similar for my rocket engine project. One of the good things about Arduino is it is supported by NI Labview and can be programmed using it. Beaglebone and RPi are also supported. I'm using the Arduino with Labview now, another reason why I favour it.
Wise words on your part regarding choice of microcontroller system. I started out with Basic Stamp, then went to PICS with PICBasic then PICS with assembly language. I also experimented with the mbed for a while.
I settled on the Arduino simply because it is so much simpler and there is so much online support. I can just get things done far quicker.
At the end of the day it is a case of horses for courses and I wouldn't rule out using a PIC (or other device) if it better suited the application.
Hi Carl. Many thanks for the kind words. I enjoyed your article to the point of looking for a suitable motor this afternoon. You've got me hooked!
I hope your family were more impressed seeing you in print than mine were with me. My sister said my paragraphs are too short, mother hated the author portrait, and son remarked "This is the sort of magazine used to provide headlines on 'Have I Got News For You', isn't it!". I was privately rather put out by their complete agreement that 'Silly Old Duffer' is an appropriate pen-name. Serves me right.
This was down to it being the only one I could find with a double ended shaft that I have signally failed to make a manual operating handle for. It is very simple to wire this motor. The coils must be connected in series to ensure the motor draws 2A. In all other respects the motor will then behave as 4 wire, i.e. 12V 1.89Nm holding torque.
This diagram comes from the motor data sheet:-
So to make this 4 wire and 2A connect yellow to blue and orange to brown. Then red, black, white and green are connected to the stepper driver board.
Zapp Automation (and other vendors) also do a 4 wire 2A motor with a single shaft. I made the connections and then heat shrank them inside the protective braiding.
Well – that high level Interpreter is something called 'BASIC' (oh dear!!) and that one fact will (I suspect) be sufficient to immediately put off any "Professionals" reading this post. But to anyone else – if you want a simple route into embedded controllers – then this is an excellent way to do it. Micromite BASIC (MMB) is more than capable of writing clean, structured modern code (there are no Line Numbers, REMs or GOTOs required – unless you want them of course!). It is an updated version of Microsoft BASIC (and still largely backwards compatible if needed). It has also been designed to let you simply access the PIC32 's complex hardware peripherals, plus it supports a useful range of external devices (sensors, SD cards, LCD screens). Should you need other facilities, then the language is extensible. Suffice it to say – that MMB can deliver a very comprehensive and powerful embedded solution. Everything is all there at your fingertips (and no "include" files)
So, if you are new to this 'compute' game or returning after many years absence (as in my case) then have look at Geoff Grahams site. Highly recommended
I think Propellor boards are similar, the problem is that the basic interpreter takes up a lot of room on the chip.
I have uno's that are genuine boards and copies but they all work the same,
You're lucky in that case. Most of the Chinese copies won't work with the standard Arduino USB driver for programming. (There is a driver, that works, available but you have to know and dig it up).
I have never bought a genuine Arduino and have never had a problem with USB drivers. The only problem I've had is with "Mini" arduino clones that don't have a USB port so you have to use a USB-to-serial adaptor to program them and press the reset button at the right time to get it to work. Every Uno and Nano clone I've had has been fine though.
Well – that high level Interpreter is something called 'BASIC' (oh dear!!) and that one fact will (I suspect) be sufficient to immediately put off any "Professionals" reading this post. But to anyone else – if you want a simple route into embedded controllers – then this is an excellent way to do it. Micromite BASIC (MMB) is more than capable of writing clean, structured modern code (there are no Line Numbers, REMs or GOTOs required – unless you want them of course!). It is an updated version of Microsoft BASIC (and still largely backwards compatible if needed). It has also been designed to let you simply access the PIC32 's complex hardware peripherals, plus it supports a useful range of external devices (sensors, SD cards, LCD screens). Should you need other facilities, then the language is extensible. Suffice it to say – that MMB can deliver a very comprehensive and powerful embedded solution. Everything is all there at your fingertips (and no "include" files)
So, if you are new to this 'compute' game or returning after many years absence (as in my case) then have look at Geoff Grahams site. Highly recommended
I think Propellor boards are similar, the problem is that the basic interpreter takes up a lot of room on the chip.
Neil
I don't know too much about Propeller chips Neil, apart from the fact that some of their users are using a Micromite as a "companion" board to them – see: https://www.youtube.com/watch?v=NjTwPDpFRcM
With respect to Basic taking too much memory – on smaller/older chips that might well be true. References to "PIC" here takes in a huge range of chips from 8 & 16 bit upwards. The PIC32s are very different beasts. I'll take a quick snapshot of my E64 memory……
As you will see memory is not a problem – that's free 'Flash' and 'SRAM' being shown there – all on a "microchip" – although I'm only using a small programme (to look at an IR receiver) so I'm not pushing anything… I do have a 16Gb SD card that I can 'chain' program files from too of course
I have uno's that are genuine boards and copies but they all work the same,
You're lucky in that case. Most of the Chinese copies won't work with the standard Arduino USB driver for programming. (There is a driver, that works, available but you have to know and dig it up).
I have never bought a genuine Arduino and have never had a problem with USB drivers.
Then presumably you didn't run them with the standard (FTDI) USB driver that comes with the Arduino IDE. There's no problem if you use the correct driver for the CH340 chip on the clone board. My comment above was simply a response to "they all work the same".
With respect to Basic taking too much memory – on smaller/older chips that might well be true. References to "PIC" here takes in a huge range of chips from 8 & 16 bit upwards. The PIC32s are very different beasts. I'll take a quick snapshot of my E64 memory……
As you will see memory is not a problem – that's free 'Flash' and 'SRAM' being shown there – all on a "microchip" – although I'm only using a small programme (to look at an IR receiver) so I'm not pushing anything… I do have a 16Gb SD card that I can 'chain' program files from too of course
Strictly that's the space after deducting basic, it seems the interpreter uses about 3/4 of the memory:
"A fast 32 bit CPU with 256K of flash and 64K RAM running a powerful BASIC interpreter. 60KB of non volatile flash memory is reserved for the program. 52KB of RAM is available for BASIC variables, arrays, buffers, etc. This is sufficient for quite large BASIC programs up to 2500 lines or more and typically it will execute a program at 30,000 lines per second."
But I will happily admit 60K of program space plus 52K of variable is over three times what a BBC B with 32K had!
@John Swift 1 – the non standard spacing is not with the pin headers themselves, these are a standard 0.1" pitch, the issue is with the spacing between the headers on each side.
If the pins on one side are inserted into holes on some strip/vero board, then the pins on the other side fall half way between two rows holes, thereby preventing the use of cheap veroboard.
Yes, it is possible to cobble something together to generate the correct offset, and I believe you can even buy stepped adapters, however I found it sufficiently annoying that I simply gave up on the boards and went to using the chips directly on breadboards and veroboard, programming via the ICSP interface.
The only occasions I use the arduino boards is if I want say a capacitive touch screen LCD shield, or the protoneer style stepper shield, where it is simply quicker and cheaper to just buy the shield than fabricate it myself.
All of my prototyping for additions to my 3D printer are done using an ATmega1284p on a breadboard, this includes my own panelolu alternative using I2C for the LCD (using 4 less pins than panelolu) and bluetooth connectivity (here).
With regards the original topic of Rotary table controllers, I went with the PIC based Division Controller as designed by Steve Ward, but built it on a piece of double sided perfboard (here), which including PSU (old laptop supply), and LCD screen, had a total project cost of around £5.00, the stepper controller was an additional £4.25 (here).
"A fast 32 bit CPU with 256K of flash and 64K RAM running a powerful BASIC interpreter. 60KB of non volatile flash memory is reserved for the program. 52KB of RAM is available for BASIC variables, arrays, buffers, etc. This is sufficient for quite large BASIC programs up to 2500 lines or more and typically it will execute a program at 30,000 lines per second."
But I will happily admit 60K of program space plus 52K of variable is over three times what a BBC B with 32K had!
Neil, your description above is of the 28/44pin PIC32 versions used in the 'simple' Micromite – so would apply to my 28pin DIL MM (< £5) versions for instance.
My Explorer 64 board (which is 3" x 1" and fits onto a 1mm prototyping board very nicely) uses a larger 64pin PIC32 chip and runs 2-3 x faster but also has an extended MM Basic version that provides much more LCD graphics functionality, USB 2 and SD Card file support (and is therefore called Micromite Plus) – which is why the memory shown on my screen shot appears somewhat different to your description.
Certainly, anyone familiar with 1980's "Micros" will be quite at home with a Micromite and will not only find a lot more memory and I/O capability but that even the simple 28pin DIL version will run at least an order of magnitude faster than their old 8-bit Apple II, Atari 800 or Nascom II (and presumably Beeb) could do. More than enough for most purposes.
So, Micromite (in it's various form-factors & implementations) is certainly worth considering if you want a simple route into embedded control and deserves wider recognition over here than it currently has in my view.
That related directly to the MEW249 article wrt the Rotary Table Drive ONLY and another GENERAL Arduino discussion, which can carry on as long as the writers wish (rather like the general aircraft thread)
That related directly to the MEW249 article wrt the Rotary Table Drive ONLY and another GENERAL Arduino discussion, which can carry on as long as the writers wish (rather like the general aircraft thread)