Announcement

Collapse
No announcement yet.

OT, sorta... Anyone program STM32 or equivalent processors? ELS project.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OT, sorta... Anyone program STM32 or equivalent processors? ELS project.

    It's actually more relevant than not. As a learning exercise, I am going to make my own electronic lead screw for my lathe. Going to drive an OLED display, read a rotary encoder for selecting settings, and read the spindle speed from at least two channels.
    It's going to output step and direction to a stepper/servo driver. Going to design it so a full blown CNC setup can be used later, down the road with no modification to anything.
    No promises, only thing I've done is order a couple evaluation boards based on STM and Atmel chips, and a OLED display. I setup the programming environment on my Mac for the STM chip using AC6.
    I realize a 32bit MCU is way overkill, I do not care, it's about learning. I've dabbled with 8bit AVR's the past decade, I feel a need to move up.
    Since the spindle will have two channels, I plan to add in conversational threading, because why not? Hell, the STM chip has a DAC on it, even have it send speed signals to a VFD if I want... Ok, feature creep is a bad thing, start out simple!


    Sent from my iPhone using Tapatalk Pro

  • #2
    It's a pretty huge leap from 8 bit AVR's but not so bad nowadays when there is more hobbyist-friendly guides and resources available.

    And STM 32 bit is not necessarily overkill at all. Before you know you have figured out that in order to use pwm output you have to connect it to the same pins that you need for display I2C and to use more accurate timer for PWM control will **** up your real-time clock. (examples totally fictionary, but you are guaranteed to bump something along those lines)

    Around here everyone seem to like Silicon Labs MCU's with their crossbar I/O-mux that makes IO routing so much easier. But Silicon Labs is far from hobbyist friendly on other aspects..

    Comment


    • #3
      Originally posted by MattiJ View Post
      It's a pretty huge leap from 8 bit AVR's but not so bad nowadays when there is more hobbyist-friendly guides and resources available.

      And STM 32 bit is not necessarily overkill at all. Before you know you have figured out that in order to use pwm output you have to connect it to the same pins that you need for display I2C and to use more accurate timer for PWM control will **** up your real-time clock. (examples totally fictionary, but you are guaranteed to bump something along those lines)

      Around here everyone seem to like Silicon Labs MCU's with their crossbar I/O-mux that makes IO routing so much easier. But Silicon Labs is far from hobbyist friendly on other aspects..
      You're not kidding that things are a bit more complicated. If it wasn't for ST's CubeMX program that writes a skeleton C project that sets all the required registers for the options you want, I'd say "F" this! It takes the most complicated part out of it. It also visually maps out what peripherals will use which pins, which removes the issue you were mentioning. That was always an issue with Atmels ATTiny mcu's.

      Comment


      • #4
        Originally posted by MattiJ View Post
        .....
        Around here everyone seem to like Silicon Labs MCU's with their crossbar I/O-mux that makes IO routing so much easier. But Silicon Labs is far from hobbyist friendly on other aspects..
        They do have some really nice transmitter receiver stuff. Have a client project going using a 4010 and 4355 combo.

        Funny thing.... got a demo kit for it to verify basic capability, and it was AFU... did not work.

        Turns out that they had a bad PWB layout, AND neither the transmitter nor the receiver for the demo kit unit had even been programmed.... so it took 3 tries and them shipping a verified kit themselves to get a working one. (The demo kit is supposed to have a demonstration program in each part)

        No, they are not hobby friendly, but this was business. Still took a while.
        1601

        Keep eye on ball.
        Hashim Khan

        Comment


        • #5
          I've been looking intently at the STM offerings for a project at work, but had to move to the Freescale S32 to get higher temperature ratings for the final product.
          We'll still use the STM to quickly evaluate the Matlab automatic code performance as their Nucleo boards are well supported by Matlab and it's using the same ARM F4 core.

          I must say I'm a bit out of my depth on the on ARMs coming from AVR as well. I tried installing the CubeMX but all that I got was a zip with 50000 include files. I guess I tried the wrong package.
          What was the book you mentioned in another post?

          Comment


          • #6
            Originally posted by ikdor View Post
            I've been looking intently at the STM offerings for a project at work, but had to move to the Freescale S32 to get higher temperature ratings for the final product.
            We'll still use the STM to quickly evaluate the Matlab automatic code performance as their Nucleo boards are well supported by Matlab and it's using the same ARM F4 core.

            I must say I'm a bit out of my depth on the on ARMs coming from AVR as well. I tried installing the CubeMX but all that I got was a zip with 50000 include files. I guess I tried the wrong package.
            What was the book you mentioned in another post?
            https://leanpub.com/mastering-stm32

            You probably downloaded the Eclipse plugin version of CubeMX.. Word of caution, the book is slightly out of date. He has you download Eclipse separately, CubeMX standalone, and has you download a STM plugin for Eclipse. Since the book was written, ST created their own Eclipse bundle called AC6, and you install the CubeMX plugin into the AC6 version. ST's AC6 is much nicer than how the book has you do it, as things are more automatic like debugging and loading firmware. AC6 works on Windows, Mac, and Linux. His code works with the way he does things, but you can take snippets of his code and get it to work with AC6.
            I ordered a Nucleo board myself. Come to think about it, I still have a STDiscovery board never opened...
            Another thing to try out, if you DO want a hobby friendly version to play around with, have you tried the mBed online compiler? It practically is like the Arduino environment, with libraries for everything. The ST Nucleo boards, and STDiscovery boards work with it as well. If all else fails, you can go that route. It's free.
            https://developer.mbed.org/compiler/
            Last edited by RB211; 08-11-2017, 06:12 PM.

            Comment


            • #7
              Have you seen this Electronic Leadscrew project?

              Comment


              • #8
                What I have learned, with my many tech related purchases is... Not a damm thing. I am a tech. geek. JR
                My old yahoo group. Bridgeport Mill Group

                https://groups.yahoo.com/neo/groups/...port_mill/info

                Comment


                • #9
                  Originally posted by elf View Post
                  Have you seen this Electronic Leadscrew project?
                  Yes, want to roll my own with newer tech


                  Sent from my iPhone using Tapatalk Pro

                  Comment

                  Working...
                  X