Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. 8Bit or 32Bit processors

8Bit or 32Bit processors

Scheduled Pinned Locked Moved Hardware
86 Posts 11 Posters 25.1k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #2

    As always it's all a matter of choosing the right solution for every needs. If you need to have a battery powered sensors that is going to sleep 99.999% of the time with a 1-2 years battery life, you will look for the lowest standby drain power, while if you need processor power, ram, storage etc you need to look at the boards you mentioned 😀

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sweeman
      wrote on last edited by
      #3

      Hi lafleur!

      I am glad to see that you are using the Adafruit Feather M0. Since I do have some issues with that, I would be grateful if you could have a look at my problem and help me out.

      https://forum.mysensors.org/topic/6908/adafruit-feather-m0-rfm69hcw-with-mysensors

      L 1 Reply Last reply
      0
      • S Sweeman

        Hi lafleur!

        I am glad to see that you are using the Adafruit Feather M0. Since I do have some issues with that, I would be grateful if you could have a look at my problem and help me out.

        https://forum.mysensors.org/topic/6908/adafruit-feather-m0-rfm69hcw-with-mysensors

        L Offline
        L Offline
        lafleur
        wrote on last edited by
        #4

        @Sweeman

        I'm on travel, and do not have any hardware to test with...

        some notes:

        Use generic M0 processor definition tool-->board--> Arduino zero (native USB port)

        If I remember, 2.1.1 has NOT yet implemented sleep for M0 processors

        Here is a striped down version of your code.... get it to work first sending messages to your gateway, then start adding your real code back.... This complies, but I DID NOT HAVE ANY HW to test it on...

        Make sure you check the radio pins on the feather and that they are correct.

            /**
             * The MySensors Arduino library handles the wireless radio link and protocol
             * between your home built sensors/actuators and HA controller of choice.
             * The sensors forms a self healing radio network with optional repeaters. Each
             * repeater and gateway builds a routing tables in EEPROM which keeps track of the
             * network topology allowing messages to be routed to nodes.
             *
             * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
             * Copyright (C) 2013-2015 Sensnology AB
             * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
             *
             * Documentation: http://www.mysensors.org
             * Support Forum: http://forum.mysensors.org
             *
             * This program is free software; you can redistribute it and/or
             * modify it under the terms of the GNU General Public License
             * version 2 as published by the Free Software Foundation.
             *
             *******************************
             *
             * DESCRIPTION
             *
             * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller
             * http://www.mysensors.org/build/temp
             */
        
        
            // Enable debug prints to serial monitor
            //#define MY_DEBUG 
        
            // Enable and select radio type attached
            //#define MY_RADIO_NRF24
            #define MY_RADIO_RFM69
        
            #include <SPI.h>
            #include <MySensors.h>  
        
        
        unsigned long SEND_FREQUENCY        = 10000;      // Minimum time between send (in milliseconds). We don't want to spam the gateway.
        unsigned long currentTime         = 0;
        unsigned long lastSendTime        = 0;
        unsigned long keepaliveTime       = 0;
        
        
        
            #define MY_RF69_SPI_CS 8
            #define MY_RF69_IRQ_PIN 7
            #define MY_RF69_IRQ_NUM 4
        
            // Initialize temperature message
            MyMessage msg(0,V_TEMP);
            
        
        /* ******************************************** */
            void before()
            {
             
            }
            
        
        /* ******************************************** */
            void setup()  
            { 
         
            }
        
        
        /* ******************************************** */
            void presentation() {
              // Send the sketch version information to the gateway and Controller
              sendSketchInfo("Temperature Sensor", "1.1");
              //present(0, S_TEMP);
              }
        
        
        /* ******************************************** */
            void loop()     
        { 
        
            currentTime = millis();                                    
        
         /* ***************** Send Sensor Data ***************** */
        
            if (currentTime - lastSendTime >= SEND_FREQUENCY)          // Only send values at a maximum rate
            {
              Serial.println("*** Sending Sensor Data"); 
        
             lastSendTime = currentTime;
        
            // lets send some data
              float temperature = 67.4;
               // Send in the new temperature
              send(msg.setSensor(0).set(temperature,1));
            }  // end of if
        
        } // end of loop
        
        
        
        L S 2 Replies Last reply
        0
        • Nca78N Offline
          Nca78N Offline
          Nca78
          Hardware Contributor
          wrote on last edited by
          #5

          I see "cheap" and then 30-40$ boards as suggestions, am I missing something ? :o

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #6

            "cheap" is all related to where you live :D

            1 Reply Last reply
            0
            • L Offline
              L Offline
              lafleur
              wrote on last edited by lafleur
              #7

              The M0 chip cost less that the 8bit 328, so building your own boards, it cost less...

              Then you need to add a radio, $2 to $9. Crystal, $.50, connectors, flash, voltage regulators, leds, capacitors, resistors, pcb board.... ect, all add cost....

              But vendors building board, need to make a profit to stay alive, so you pay for their work....

              So yes, finish boards in small quantity cost $20 to $40 or so.... not a bad price for what you get.....

              1 Reply Last reply
              0
              • Nca78N Offline
                Nca78N Offline
                Nca78
                Hardware Contributor
                wrote on last edited by
                #8

                I see, I didn't realize there were M0 chips so insanely cheap.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lafleur
                  wrote on last edited by
                  #9

                  @Nca78

                  As manufacturing of chips goes to smaller and smaller die size, chip cost go down and preformance goes up..... older processors cost more to build that newer parts!

                  It all means better performance, less power and more features for less money...

                  The intel 8080 when it was introduced was $360, power hungry, no ram, no storage, no I/O, needed a lot of support chips.... we have come a long way!!!!

                  1 Reply Last reply
                  1
                  • L lafleur

                    @Sweeman

                    I'm on travel, and do not have any hardware to test with...

                    some notes:

                    Use generic M0 processor definition tool-->board--> Arduino zero (native USB port)

                    If I remember, 2.1.1 has NOT yet implemented sleep for M0 processors

                    Here is a striped down version of your code.... get it to work first sending messages to your gateway, then start adding your real code back.... This complies, but I DID NOT HAVE ANY HW to test it on...

                    Make sure you check the radio pins on the feather and that they are correct.

                        /**
                         * The MySensors Arduino library handles the wireless radio link and protocol
                         * between your home built sensors/actuators and HA controller of choice.
                         * The sensors forms a self healing radio network with optional repeaters. Each
                         * repeater and gateway builds a routing tables in EEPROM which keeps track of the
                         * network topology allowing messages to be routed to nodes.
                         *
                         * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
                         * Copyright (C) 2013-2015 Sensnology AB
                         * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
                         *
                         * Documentation: http://www.mysensors.org
                         * Support Forum: http://forum.mysensors.org
                         *
                         * This program is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License
                         * version 2 as published by the Free Software Foundation.
                         *
                         *******************************
                         *
                         * DESCRIPTION
                         *
                         * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller
                         * http://www.mysensors.org/build/temp
                         */
                    
                    
                        // Enable debug prints to serial monitor
                        //#define MY_DEBUG 
                    
                        // Enable and select radio type attached
                        //#define MY_RADIO_NRF24
                        #define MY_RADIO_RFM69
                    
                        #include <SPI.h>
                        #include <MySensors.h>  
                    
                    
                    unsigned long SEND_FREQUENCY        = 10000;      // Minimum time between send (in milliseconds). We don't want to spam the gateway.
                    unsigned long currentTime         = 0;
                    unsigned long lastSendTime        = 0;
                    unsigned long keepaliveTime       = 0;
                    
                    
                    
                        #define MY_RF69_SPI_CS 8
                        #define MY_RF69_IRQ_PIN 7
                        #define MY_RF69_IRQ_NUM 4
                    
                        // Initialize temperature message
                        MyMessage msg(0,V_TEMP);
                        
                    
                    /* ******************************************** */
                        void before()
                        {
                         
                        }
                        
                    
                    /* ******************************************** */
                        void setup()  
                        { 
                     
                        }
                    
                    
                    /* ******************************************** */
                        void presentation() {
                          // Send the sketch version information to the gateway and Controller
                          sendSketchInfo("Temperature Sensor", "1.1");
                          //present(0, S_TEMP);
                          }
                    
                    
                    /* ******************************************** */
                        void loop()     
                    { 
                    
                        currentTime = millis();                                    
                    
                     /* ***************** Send Sensor Data ***************** */
                    
                        if (currentTime - lastSendTime >= SEND_FREQUENCY)          // Only send values at a maximum rate
                        {
                          Serial.println("*** Sending Sensor Data"); 
                    
                         lastSendTime = currentTime;
                    
                        // lets send some data
                          float temperature = 67.4;
                           // Send in the new temperature
                          send(msg.setSensor(0).set(temperature,1));
                        }  // end of if
                    
                    } // end of loop
                    
                    
                    
                    L Offline
                    L Offline
                    lafleur
                    wrote on last edited by
                    #10

                    @lafleur

                    You should also add this to your test code to see debug messages from the MySensor stack.. Also add to gateway, so that you can see what happening on both ends....

                    /*  Enable debug prints to serial monitor on port 0 */
                    #define MY_DEBUG            // used by MySensor
                    #define MY_DEBUG_VERBOSE_RFM69 
                    
                    1 Reply Last reply
                    0
                    • L lafleur

                      @Sweeman

                      I'm on travel, and do not have any hardware to test with...

                      some notes:

                      Use generic M0 processor definition tool-->board--> Arduino zero (native USB port)

                      If I remember, 2.1.1 has NOT yet implemented sleep for M0 processors

                      Here is a striped down version of your code.... get it to work first sending messages to your gateway, then start adding your real code back.... This complies, but I DID NOT HAVE ANY HW to test it on...

                      Make sure you check the radio pins on the feather and that they are correct.

                          /**
                           * The MySensors Arduino library handles the wireless radio link and protocol
                           * between your home built sensors/actuators and HA controller of choice.
                           * The sensors forms a self healing radio network with optional repeaters. Each
                           * repeater and gateway builds a routing tables in EEPROM which keeps track of the
                           * network topology allowing messages to be routed to nodes.
                           *
                           * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
                           * Copyright (C) 2013-2015 Sensnology AB
                           * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
                           *
                           * Documentation: http://www.mysensors.org
                           * Support Forum: http://forum.mysensors.org
                           *
                           * This program is free software; you can redistribute it and/or
                           * modify it under the terms of the GNU General Public License
                           * version 2 as published by the Free Software Foundation.
                           *
                           *******************************
                           *
                           * DESCRIPTION
                           *
                           * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller
                           * http://www.mysensors.org/build/temp
                           */
                      
                      
                          // Enable debug prints to serial monitor
                          //#define MY_DEBUG 
                      
                          // Enable and select radio type attached
                          //#define MY_RADIO_NRF24
                          #define MY_RADIO_RFM69
                      
                          #include <SPI.h>
                          #include <MySensors.h>  
                      
                      
                      unsigned long SEND_FREQUENCY        = 10000;      // Minimum time between send (in milliseconds). We don't want to spam the gateway.
                      unsigned long currentTime         = 0;
                      unsigned long lastSendTime        = 0;
                      unsigned long keepaliveTime       = 0;
                      
                      
                      
                          #define MY_RF69_SPI_CS 8
                          #define MY_RF69_IRQ_PIN 7
                          #define MY_RF69_IRQ_NUM 4
                      
                          // Initialize temperature message
                          MyMessage msg(0,V_TEMP);
                          
                      
                      /* ******************************************** */
                          void before()
                          {
                           
                          }
                          
                      
                      /* ******************************************** */
                          void setup()  
                          { 
                       
                          }
                      
                      
                      /* ******************************************** */
                          void presentation() {
                            // Send the sketch version information to the gateway and Controller
                            sendSketchInfo("Temperature Sensor", "1.1");
                            //present(0, S_TEMP);
                            }
                      
                      
                      /* ******************************************** */
                          void loop()     
                      { 
                      
                          currentTime = millis();                                    
                      
                       /* ***************** Send Sensor Data ***************** */
                      
                          if (currentTime - lastSendTime >= SEND_FREQUENCY)          // Only send values at a maximum rate
                          {
                            Serial.println("*** Sending Sensor Data"); 
                      
                           lastSendTime = currentTime;
                      
                          // lets send some data
                            float temperature = 67.4;
                             // Send in the new temperature
                            send(msg.setSensor(0).set(temperature,1));
                          }  // end of if
                      
                      } // end of loop
                      
                      
                      
                      S Offline
                      S Offline
                      Sweeman
                      wrote on last edited by
                      #11

                      @lafleur

                      Thank you very much! This is a big step in the right direction for me and I hope that I can get it to work with that :)

                      To add to this discussion:
                      These radios come already assembled. It is true that you could save some money by assembling them yourself and maybe more by ordering directly from Hong Kong (which takes anything between 4-10 weeks) and hoping that they sent you the right stuff. But if you add up the stuff that you would need and the time to solder etc. then at least I would end up spending more for a bigger and uglier radio.

                      1 Reply Last reply
                      0
                      • gohanG Offline
                        gohanG Offline
                        gohan
                        Mod
                        wrote on last edited by
                        #12

                        Still a pro mini is well tested platform, performance is not an issue for a sensor node anyway

                        L 1 Reply Last reply
                        0
                        • gohanG gohan

                          Still a pro mini is well tested platform, performance is not an issue for a sensor node anyway

                          L Offline
                          L Offline
                          lafleur
                          wrote on last edited by lafleur
                          #13

                          @gohan Pro-mini, is a great part, but sometime you need a lot more! 32 bit is the future for me, less power, less cost, more resources....less hassles...

                          1 Reply Last reply
                          1
                          • gohanG Offline
                            gohanG Offline
                            gohan
                            Mod
                            wrote on last edited by
                            #14

                            Agreed but at the moment you have to choose between the future that isn't sure to work or the past that has been proven reliable 😀

                            1 Reply Last reply
                            0
                            • tbowmoT Offline
                              tbowmoT Offline
                              tbowmo
                              Admin
                              wrote on last edited by
                              #15

                              @gohan

                              The only way we can get the shiny new things to be proven hardware, is to have people build stuff using it :) That way, we can have more people testing the hardware, and reporting any bugs (if there is any), and have a better chance for getting it to be the next big thing :)

                              1 Reply Last reply
                              1
                              • GertSandersG Offline
                                GertSandersG Offline
                                GertSanders
                                Hardware Contributor
                                wrote on last edited by
                                #16

                                @lafleur

                                I was wondering where you can get a M0 processor for less then the price of an atmega328p ? Most SAMD21's I see are 5 times the price of an atmega328p (normal given it's much better capacities).

                                1 Reply Last reply
                                0
                                • tbowmoT Offline
                                  tbowmoT Offline
                                  tbowmo
                                  Admin
                                  wrote on last edited by tbowmo
                                  #17

                                  @GertSanders

                                  atmega328p costs 2.07$ on mouser : http://www.mouser.dk/ProductDetail/Microchip-Technology-Atmel/ATMEGA328P-AU/

                                  If you take the equivalent atsamd20E15, it cost 1.84$ http://www.mouser.dk/ProductDetail/Microchip-Technology-Atmel/ATSAMD20E15A-AU

                                  (both have 32Kb flash)

                                  If you beef up the atsam to the largest memory, it costs 2.36$ http://www.mouser.dk/ProductDetail/Microchip-Technology-Atmel/ATSAMD20E18A-AU

                                  But then you also have 256Kb of flash and 32Kb ram available, for .29$ extra (compared to the atmega328)..

                                  Of course that is not atsamd21, but for a standard node you don't need the USB capabilities of the '21, and a '20 should be enough..

                                  1 Reply Last reply
                                  1
                                  • Nca78N Offline
                                    Nca78N Offline
                                    Nca78
                                    Hardware Contributor
                                    wrote on last edited by Nca78
                                    #18

                                    On AliExpress you can find STM32 with Cortex M0 for as low as 0.4$ per unit. Not compatible with Arduino unfortunately but for that price the specs are pretty impressive...
                                    And the STM32F103C8T6 which are compatible with Arduino and soon compatible with MySensors are around 1$, similar price than AtMega328 but for Cortex M3 at 48MHz, 64KB of flash, 20KB or RAM and lots of extras.

                                    NeverDieN 1 Reply Last reply
                                    0
                                    • GertSandersG Offline
                                      GertSandersG Offline
                                      GertSanders
                                      Hardware Contributor
                                      wrote on last edited by
                                      #19

                                      @tbowmo said in 8Bit or 32Bit processors:

                                      ATSAMD20E18A-AU

                                      Too bad that MOUSER still charges me 20 EUR for transport, even for something as small as a single chip. I would need to buy for more then 50 EUR before transport cost is waived. How the suppliers on Aliexpress do it, I do not know.

                                      Nca78N scalzS 2 Replies Last reply
                                      0
                                      • GertSandersG GertSanders

                                        @tbowmo said in 8Bit or 32Bit processors:

                                        ATSAMD20E18A-AU

                                        Too bad that MOUSER still charges me 20 EUR for transport, even for something as small as a single chip. I would need to buy for more then 50 EUR before transport cost is waived. How the suppliers on Aliexpress do it, I do not know.

                                        Nca78N Offline
                                        Nca78N Offline
                                        Nca78
                                        Hardware Contributor
                                        wrote on last edited by
                                        #20

                                        @GertSanders said in 8Bit or 32Bit processors:

                                        How the suppliers on Aliexpress do it, I do not know.

                                        They just use cheaper shipping options that are much slower. It's possible in the US too as you can order PCBs from PCBs.io for 5$ shipping included, and they are in the US.

                                        1 Reply Last reply
                                        0
                                        • GertSandersG GertSanders

                                          @tbowmo said in 8Bit or 32Bit processors:

                                          ATSAMD20E18A-AU

                                          Too bad that MOUSER still charges me 20 EUR for transport, even for something as small as a single chip. I would need to buy for more then 50 EUR before transport cost is waived. How the suppliers on Aliexpress do it, I do not know.

                                          scalzS Offline
                                          scalzS Offline
                                          scalz
                                          Hardware Contributor
                                          wrote on last edited by scalz
                                          #21

                                          @GertSanders
                                          ali, or chinese supplier, in fact are cheating a bit for getting those price.

                                          when ordering at mouser, i generally order some stock for future boards, and regarding some parts, like passives it's almost same price as ali and you're sure of the quality (and for some sensors i'm sure they're not out of specs, clones..) , with a bigger choice.

                                          but sometimes i have some missing parts too :grimacing:
                                          tme has low shipping cost, or Arrow.com is nice too as it's 20€ minimum order for getting free express shipping ;)

                                          I don't know how to get cheaper then..

                                          Nca78N sundberg84S 3 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          9

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular