1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Cheap STM32 modules

Discussion in 'Microcontrollers' started by Nigel Goodwin, Mar 8, 2017.

  1. Little Ghostman

    Little Ghostman Well-Known Member Most Helpful Member

    Joined:
    Jan 7, 2011
    Messages:
    3,702
    Likes:
    426
    Location:
    SCOTLAND
    I almost complained about them only coming in blue, but I thought that would be a little out of order lol
     
  2. Triode

    Triode Member

    Joined:
    Feb 11, 2009
    Messages:
    925
    Likes:
    22
    Location:
    Bay Area
    I have a tacklebox full of random chinese modules that cost under $2 each as well, but when you need two or three of them to make something work real quick they're worth the cost of at least 20 of the ones you never use. Once you have a working bit of code for each one you can throw together a lot of solutions pretty quickly.
     
  3. dr pepper

    dr pepper Well-Known Member

    Joined:
    Oct 6, 2008
    Messages:
    4,644
    Likes:
    246
    Location:
    North west UK
    I thimk I have a couple of st modules hanging around too, never got round to do anything with them, but I didnt know you can program them with the arduino Ide, I'll look in to that one.
    Are the i/o pins markings logical, or is it like some other non duino boards the physical i/o pin numbers and the ide pin numbers dont match.
    This might be useful to anyone starting with these:
     
    Last edited: Mar 30, 2017
    • Like Like x 1
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada

    Someone wrote an article for Hackaday on these recently.
    http://hackaday.com/2017/03/30/the-2-32-bit-arduino-with-debugging/
     
  6. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    That Hack-a-day article by Al Williams provides a link to a library and core just for STM32F1xx devices. I wonder if it's just a sub-set of the STMDuino library? I'll have to check this out...

    STM32F1xx Library.png
     
  7. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    I just got one of these there's a bootloader for it trying to find out if it works with the USB
    stm32.jpg
     
  8. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,205
    Likes:
    640
    Location:
    Derbyshire, UK
    As it comes the bootloader is via the serial port only, but if you google there's a USB bootloader you can upload to it, and make it more like an Arduino - although I haven't tried it.

    Currently I'm playing with the WEMOS mini, and various other ESP8266's - which are pretty higher specced as well, and have the added benefit of WiFi :D
     
  9. dr pepper

    dr pepper Well-Known Member

    Joined:
    Oct 6, 2008
    Messages:
    4,644
    Likes:
    246
    Location:
    North west UK
    Let us know how you get on Burt, I'm going to get a few of those next china order.

    Nige, I have played with the esp of various kinds for a while now, made some nice webpages, you need to learn html/css and javascript for that, but its very much like C so you wont find it that hard.
    SVG guages look smart and are not hard to do.
    One thing with the esp dont use client.print too much or it'll go sloow, either concatenate all your page data into one string and then just have one client.print, or better use client.stream, even better still an async stream which is about as good as the esp gets, you can see images loading a little slower than usual on my stuff, but its much quicker than anything else I've tried.
    Spiffs is very handy esp on the 12e chip as found in the wemos.
     
  10. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    Got it talking to the computer trying to figure out the pins as the numbering
    don't no where pin 13 is for the blinking led lol
    Well i figured it out but the led was blinking just not bright.
     
    Last edited: May 19, 2017
  11. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    It's alive
     
    • Like Like x 1
  12. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Hi Burt:

    The on-board LED is 'PC13' and is plenty bright on my "blue pill" boards. The scary part for me is how much memory is used just for the simple "blink" sketch.

    stm32 blink.png

    I've been using an STLink v2 clone (see below) for programming both STM32 "blue pill" and cheapie STM8 boards. It's really painless. You don't have to mess with the STM32 board jumpers and you don't have to give up a big chuck of memory on the boards for a bootloader.

    STLink Connected.png

    The nice "sale" prices I saw last summer seem to be starting again... and, how about that little STM8 board for little more than the cost of a postage stamp (16-MHz, 8K Flash/1K RAM/640 EEPROM)?

    On Sale 1.png
     
    Last edited: May 21, 2017
  13. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    I seen the led but it was very dim I didn't think it was on the right pin.
    But here mine and it doing more and using less memory
    st32.png
     
  14. dr pepper

    dr pepper Well-Known Member

    Joined:
    Oct 6, 2008
    Messages:
    4,644
    Likes:
    246
    Location:
    North west UK
    Hey Nige/peeps, the stm32 modules were on the doorstep today, so I'm gonna have a try and see if I can get the 'duino Ide to burn these things, will let you know if I get anywhere.
    I notice there are 2 xtals on the board, one maybe for the uart?

    Edit: Sussed, I managed to program one of these modules, I burned the blink sketch using the serial programming interface and it works, changing the flash rate works too.
    Now to see if I can burn the maple bootloader to this device so I can use its Usb port to program it.
    Looks like some of my 'duino projects are going arm 32 bit.
    Aha Ok mike this chip has a built in Rtc, that'll be usefull, I'll look that up and see how to use it with the 'duino Ide.
    The hackaday article was the most useful aid for this little test.
    Burt the arduino Led_built_in has never failed for me, the Ide seems to know which is the correct pin, must be in the processor file.
     
    Last edited: Jun 27, 2017
  15. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    The second xtal is 32786 Hz for the built-in RTC...
     
  16. dr pepper

    dr pepper Well-Known Member

    Joined:
    Oct 6, 2008
    Messages:
    4,644
    Likes:
    246
    Location:
    North west UK
    On my windows xp pc I cannot get the Dfu drivers installed so I'm unable to use the onboard Usb serial device, this isnt surprising as my arduino M0 is the same.
    So I can either use my win7 pc or this xp one with the Usb to serial dongle, kinda handy I can do that, the M0 only programs on the win7 computer which isnt always handy.
     
  17. dr pepper

    dr pepper Well-Known Member

    Joined:
    Oct 6, 2008
    Messages:
    4,644
    Likes:
    246
    Location:
    North west UK
    Having messed around for too long I've realised that if you get one of these program it with a serial adaptor, getting the thing to work with its Usb socket is well hard.
    An original maple would probably be simple as it already has a bootloader / Usb driver pre loaded in the stm32.

    Edit: Sussed it in the end I got it to program via Usb, a lot of sites you see on the web are written by people who presume you have the same knowledge as they do, while its useful for those to share with us such knowledge it can be really tricky to decipher, This wiki is what I used to get the bootloader into the virgin Stm32F1, it uses St's own software so it works:
    http://wiki.stm32duino.com/index.php?title=Burning_the_bootloader
    And this is where I got the Pc device drivers (which I dont think you need to bother with), its the hackaday article mentioned further up:
    http://hackaday.com/2017/03/30/the-2-32-bit-arduino-with-debugging/
     
    Last edited: Jun 28, 2017

Share This Page