|5765 forum posts|
Thinking about Neil's precision problem kept me awake last night. What a sad life I lead.
|John Haine||05/06/2020 10:50:28|
|3080 forum posts|
I think the Arduino cycle time is 4 us - at least when I've uses "micros" for clock timing that's the resolution. The Nano uses a ceramic resonator for its clock so not too accurate. May not be an issue.
|Graham Stoppani||05/06/2020 11:00:32|
71 forum posts
Back in the dim and distant past when I was doing my Computing degree, one of the things we dabbled with was VAX assembly language. I remember students commenting on how friendly it was compared to some other languages. Where they would refuse to compile due to the smallest of errors 'String and string' being a good example the assembler would really try to execute your code however mangled it was.
|Nick Clarke 3||05/06/2020 11:44:39|
760 forum posts
Students learning C after Pascal told me the same thing - Pascal demanded far more accuracy or the program wouldn't run while C would produce some amazing, if nonsensical results from mistakes in the code. Similar to your VAX assembler C really tried to execute your code however mangled it was. .
After leaving us several went on to one of the local universities where their first programming was in ADA - That taught them to be rigorous in their coding as it was totally unforgiving.
Edited By Nick Clarke 3 on 05/06/2020 11:45:41
|5765 forum posts|
|Joseph Noci 1||05/06/2020 12:39:05|
|671 forum posts|
Hah! I have fond memories of the VAx - esp the VAX11-780...Spent many hours writing code on that machine, also on a Micro-VAX...
I think Neil's Arduino makes the HP-1000 look really old..
Those were the days..
|Ian P||05/06/2020 12:41:49|
2380 forum posts
I know Neil's request is for assistance with the software, but something in his post puzzles me.
Its the rubber rollers and unknown gearing ratio.
I'm presuming that the software will be progressively tweaked by trial & error once the mount is is mechanically assembled and running. If the characteristics of the rubber components are going to determine the drive ratio then I suppose they could change over time so requiring ongoing software tweaking.
If there was no rubber in the drive and the ratio was known would the software problem go away?
|1532 forum posts|
In my minds eye Neil - I saw you building something rather like (a mini) Jodrell Bank which needed a mini Cray to control everything - but I have no real idea of what is required in this area.
It wasn't the 32 bit aspect I was thinking of though (although they do offer amazing performance) but more the ease of interactive development. I simply prefer the immediate nature of MMB. For someone like myself without a formal or professional background in programming it really helps. BTW - My 28 pin DIL PIC32 chips cost about £3 and only need one external component (a ceramic capacitor) to build a usable Micromite system.
However, I'll shut up now and get back to re-building the vertical head on my mill (replacement bearings etc).
|Neil Wyatt||18/06/2020 09:39:38|
17886 forum posts
I've just realised the stepper I'm using has 200 not 48 steps, plus I can get a 32-microstep controller.
I can make use of this additional precision*
But it means my delay between steps will only be about 68ms. Right in the nasty transition between the ms and uS counters.
But the relative in accuracy of microsteps isn't a big deal in proportion, its more about keeping the platform in steady motion than absolute precision and it always averages out per full step.
I have come up with a 'simplified Bressenham' algorithm to apply a sub-microsecond correction to any arbitary accuracy that just uses integers:
What is really neat about this is that I can fine-tune the platform speed just by changing the value added to the counter. It's also easy to make a routine to allow for the counter value reducing below zero.
Delays of 68.34 will follow the sun, and 68.53 the stars. If you have the wrong rate it's visible as drift of the star field so being able to adjust to 0.01 ms at least shoudl be aimed for.
|Adrian Purser||18/06/2020 15:43:30|
|2 forum posts|
On the subject of the STM32 Arm cpu (Nucleo etc), the STM32 'Blue Pill' boards are quite popular. They can be found for less than £2. They are similar form factor to the Arduino nano and can even be used with the Arduino IDE, although the free ST CubeIDE is rather good. I often feel that a 32bit CPU is a bit overkill for some of the projects I make but when they are so cheap and accessible, why not.
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
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.