By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Allendale Jan 24th

Arduinos and Microcontrollers ref: Rotary Table Mew 249

All Topics | Latest Posts

Search for:  in Thread Title in  
Zebethyal05/12/2016 16:02:14
191 forum posts

Whilst I applaud the development of the Arduino, and accept that the original designer has made very little from the project due to clones, (if you don't want your design copied - don't make it open hardware) the Uno, Duemilanove, Mega boards all use a non standard spacing that perpetuates the use of shields, which are often highly overpriced for what they actually offer.

The removal of the FTDI chip in favour of the CH340G, for USB programming, dramatically reduced the cost of the clones.

I only have a couple of Arduino Uno clones, preferring the smaller size of the Pro Mini (£13.33 for 10 from China), or Nano which includes a micro USB connection (£17.20 for 10 from China), these both use standard breadboard spacing.

I also buy suitable through hole chips with the required number of pins direct from RS (ATtiny, ATmega168p, ATmega644p, ATmega1248p), as they actually seem to be the cheapest, all of which can be programmed via the Arduino IDE and the one off purchase of a programmer, although these are actually many times the price of the above Mini or Nano alternatives.

The 8, 14, 20pin ATtiny and 40 pin ATmega chips can also be programmed via the IDE with a little tweaking of the configuration files (ATtiny chips can also be bought in SMD form on breadboard compatible boards for pennies from China).

For those interested in PIC development, don't forget that Microchip offers a free sample service for much of their range - I have yet to actually pay for any of my PIC microcontrollers and clone PicKit programmers from the Bay also work just fine..

Neil Wyatt05/12/2016 17:43:55
avatar
Moderator
17314 forum posts
690 photos
77 articles
Posted by Zebethyal on 05/12/2016 16:02:14:
PIC

I'll avert my eyes!

=:-0

Neil

IanT05/12/2016 18:06:18
1432 forum posts
141 photos

I enjoyed the most recent MEW - including the Arduino articles.

I've had an Arduino Uno for a while now but have also been playing with a Microchip PIC32 (USB Starter Kit). The PIC32 is a very powerful device and it can be programmed in 'C' using the IDE from Microchip (MPLAB X) or there is also Chipkit (MPIDE) which enables it to be programmed pretty much with the same code as (an Atmel based) Arduino - as used and described in the MEW articles. I do like Arduino btw....however...

I've recently (last week!) purchased another PIC32 based 'controller' system that I think many here would find just as easy as the Arduino (and maybe much more so) - I certainly have (even after just a few days). You can assume that I'm very impressed with it...

Micromite Plus is a 'controller' system developed in Australia by a guy called Geoff Graham. It is the latest in quite a long line of PIC32 based micro-computers and controllers developed by Geoff and published in Silicon Chip (an Australian hobby electronics mag). Geoff's Maximite & Micromite systems are much better known in the Antipodes than over here and understandably have a loyal following there. The good news is that there is now a UK based outlet for Micromite products and PCB/Kits, so hopefully they will become much better known here too. I should add that the software (in various forms) is freely downloadable, including the source code (and that I have no vested interest in this other than as a happy customer). The documentation is excellent (and also free to download too)

Why am I a "Fanboy"? (a term reserved for advocates of a particular technology or language I believe - and one that can probably also still be applied to an OAP?)

Well the Micromite is just so easy to use. I plugged my Explorer 64 board (via the USB) into my laptop and using a free terminal emulator programme (Tera Term) started editing and running programs straight away - just like with my Arduino Uno in fact... except that there is no "Edit, Compile, Run" cycle involved.

The high level language used is an interpreter, so at the command prompt > I can test/debug and write programs in "immediate" mode. The Editor runs directly on the PIC32 (a PC-based version is also available) and I can examine the I/O pins directly for instance. Of course no interpreter will ever run as fast as a compiler will...but the PIC32 is a miniature mainframe and even the slowest Micromite (a 28pin DIL package running at 48Mhz) can do 30,000 code lines a second. My 64 pin Explorer runs about 2-3 times faster (at 120Mhz) ...quite fast enough for most things in practice. Did I mention the 100Kb of available programme space - or the comms protocols supported - which include I2C, Asynch Serial, RS232, IEEE 485, SPI and 1-Wire? It's an incredible piece of technology...and very affordable!

So what's the catch?

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

Geoffg.net/micromite

Regards,

IanT

A new (and elderly) PIC32/Micromite 'Fanboy' laugh

john swift 105/12/2016 18:22:00
avatar
318 forum posts
183 photos

Hi Duncan

the Arduino Nano looks like a useful component to incorporate into DIY projects

now I'm spoilt for choice

John

Bandersnatch05/12/2016 18:29:14
avatar
1464 forum posts
42 photos
Posted by IanT on 05/12/2016 18:06:18:

Geoffg.net/micromite

Try: http://geoffg.net/micromite.html

Michael Gilligan05/12/2016 18:49:28
avatar
14944 forum posts
638 photos
Posted by Bandersnatch on 05/12/2016 18:29:14:
Posted by IanT on 05/12/2016 18:06:18:

Geoffg.net/micromite

Try: http://geoffg.net/micromite.html

.

Hang the expense ... Let's have a direct **LINK**

IanT05/12/2016 18:56:04
1432 forum posts
141 photos

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....

Thank you.

IanT

Michael Gilligan05/12/2016 19:21:38
avatar
14944 forum posts
638 photos

You're welcome, Ian

... You did the important bit yes

MichaelG.

duncan webster05/12/2016 19:38:55
avatar
2418 forum posts
39 photos
Posted by john swift 1 on 05/12/2016 18:22:00:

Hi Duncan

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.

SillyOldDuffer05/12/2016 20:06:14
5310 forum posts
1086 photos

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!

Dave

Carl Wilson 405/12/2016 20:39:57
avatar
670 forum posts
53 photos

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.

IanT05/12/2016 21:00:23
1432 forum posts
141 photos

John Swift - if you want "small" - then there is also a Nano-Mite!

https://www.shop-dontronics.com/Micks-Mites/MBG-Bare-Boards/Nanomite-Bare-PCB

(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...

Regards,

 

IanT

Edited By IanT on 05/12/2016 21:00:54

SillyOldDuffer05/12/2016 21:12:25
5310 forum posts
1086 photos
Posted by Carl Wilson 4 on 05/12/2016 20:39:57:

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.

Cheers,

Dave

Carl Wilson 405/12/2016 21:35:29
avatar
670 forum posts
53 photos

Fortunately for all of you Neil Wyatt was smart enough not to use my author photograph.

How apposite that you should talk about what motor I used because I was just about to post on that very subject.

You'll notice in some of the pictures in the article that the stepper I have used has eight wires. You can find it here:-

**LINK**

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:-

stepper.jpg

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.

Carl.

Neil Wyatt05/12/2016 21:45:30
avatar
Moderator
17314 forum posts
690 photos
77 articles
Posted by IanT on 05/12/2016 18:06:18:

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

Neil Wyatt05/12/2016 21:47:04
avatar
Moderator
17314 forum posts
690 photos
77 articles
Posted by Carl Wilson 4 on 05/12/2016 21:35:29:

Fortunately for all of you Neil Wyatt was smart enough not to use my author photograph.

I can blame that on the designer

Neil

Carl Wilson 405/12/2016 22:13:47
avatar
670 forum posts
53 photos

I told her what you said, you had better watch out!!

David Taylor05/12/2016 23:28:14
avatar
128 forum posts
39 photos
Posted by Bandersnatch on 04/12/2016 18:41:47:

Posted by martin perman on 04/12/2016 17:03:02:

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.

IanT06/12/2016 00:02:33
1432 forum posts
141 photos
Posted by Neil Wyatt on 05/12/2016 21:45:30:
Posted by IanT on 05/12/2016 18:06:18:

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

mm memory screen.jpg

Regards,

IanT

john swift 106/12/2016 01:08:14
avatar
318 forum posts
183 photos

Hi Zebethyal

reading your comment about non standard spacing that perpetuates the use of shields,

has me thinking about a DIY solution

I've no found all the information I need

Probably need to obtain an Arduino and a variety of connectors and a piece of veroboard (perf board) and have a go

this is just my initial thought :--

diy uno veroboard shield.jpg

John

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Latest Forum Posts
Support Our Partners
ChesterUK
Eccentric July 5 2018
Warco
Ausee.com.au
cowells
Allendale Electronics
emcomachinetools
Eccentric Engineering
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest