Arduino /C++ Questions…

Advert

Arduino /C++ Questions…

Home Forums Help and Assistance! (Offered or Wanted) Arduino /C++ Questions…

Viewing 6 posts - 26 through 31 (of 31 total)
  • Author
    Posts
  • #477658
    SillyOldDuffer
    Moderator
      @sillyoldduffer
      Posted by John Haine on 05/06/2020 10:50:28:

      I think the Arduino cycle time is 4 us –

      That's right!

      Advert
      #477669
      Joseph Noci 1
      Participant
        @josephnoci1
        Posted by Graham Stoppani on 05/06/2020 11:00:32:

        Posted by Neil Wyatt on 04/06/2020 16:45:15:

        I'm a died in the wool lover of assembly language, just because…

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

        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…In the good old days of embargo…My masters was the development of a Bit-Slice emulation of the 11-780 and I wrote lots of code to verify the Bit-Slice version executed identically to the actual VAX11-790..Also did a bit slice version ( copy?..) of the HP-1000 with RAM (!) instead of ferrite core memory…it ran 40X faster than the real one..

        I think Neil's Arduino makes the HP-1000 look really old..

        Those were the days..

        Joe

        #477670
        Ian P
        Participant
          @ianp

          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?

          Ian P

          #477684
          IanT
          Participant
            @iant
            Posted by Neil Wyatt on 05/06/2020 10:26:33:

            It's always interesting to hear about other alternatives.

            It's worth pointing out that, in principle, the controller for this could be replaced by a 555 timer controlled with a potentiometer to fine-tune the rate and pulse the stepper driver.

            Some people just use geared DC motors and speed controllers.

            If I want 32-bit I'd probably go for the Arduino Due which has an ARM processor (a sort of piritual successor to the BBC Micro ) which is available for £12-15.

            Neil

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

            Regards,

            IanT

            #480645
            Neil Wyatt
            Moderator
              @neilwyatt

              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:

              • The theoretical duration between pulses is 68.341 milliseconds.
              • Every 68milliseconds I apply a pulse and add 341 to a counter.
              • If the counter exceeds 1000, I wait an extra millisecond and subtract 1000 from the counter.

              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.

              #480729
              Adrian Purser
              Participant
                @adrianpurser13794

                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.

              Viewing 6 posts - 26 through 31 (of 31 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