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. OpenHardware.io
  3. 💬 Various bootloader files based on Optiboot 6.2

💬 Various bootloader files based on Optiboot 6.2

Scheduled Pinned Locked Moved OpenHardware.io
optiboot
164 Posts 18 Posters 63.7k Views 18 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.
  • mar.conteM Offline
    mar.conteM Offline
    mar.conte
    wrote on last edited by
    #136

    hy,
    can anyone tell me what is the word near cpu 8mhz-38k4-d13 etc..??
    tanks

    S 1 Reply Last reply
    0
    • mar.conteM mar.conte

      hy,
      can anyone tell me what is the word near cpu 8mhz-38k4-d13 etc..??
      tanks

      S Offline
      S Offline
      Samuel235
      Hardware Contributor
      wrote on last edited by
      #137

      @mar.conte - Your question isn't very clear. If you're asking what the name means its broken down as:

      8mhz - Crystal speed/frequency
      38k4 - 38400 upload speed
      D13 - Pin 13 to flash the LED (if needed) just for visual indication that the bootloader has been burnt/installed.

      Not sure if that is what you meant but I could only assume. If not then please attempt to explain a little clearly for us :)

      Hope that sorts your problem!

      MySensors 2.1.1
      Controller - OpenHAB (Virtual Machine)
      Gateway - Arduino Mega MQTT Gateway W5100

      mar.conteM 1 Reply Last reply
      0
      • S Samuel235

        @mar.conte - Your question isn't very clear. If you're asking what the name means its broken down as:

        8mhz - Crystal speed/frequency
        38k4 - 38400 upload speed
        D13 - Pin 13 to flash the LED (if needed) just for visual indication that the bootloader has been burnt/installed.

        Not sure if that is what you meant but I could only assume. If not then please attempt to explain a little clearly for us :)

        Hope that sorts your problem!

        mar.conteM Offline
        mar.conteM Offline
        mar.conte
        wrote on last edited by
        #138

        @Samuel235
        Sorry for my english, your answer is ok Tanks you

        S 1 Reply Last reply
        0
        • mar.conteM mar.conte

          @Samuel235
          Sorry for my english, your answer is ok Tanks you

          S Offline
          S Offline
          Samuel235
          Hardware Contributor
          wrote on last edited by
          #139

          @mar.conte - Its okay, i understood you, just about ;)

          Now just apply that description to all of the other bootloader varients that the great @Gertsanders has provided us with :)

          MySensors 2.1.1
          Controller - OpenHAB (Virtual Machine)
          Gateway - Arduino Mega MQTT Gateway W5100

          1 Reply Last reply
          0
          • mar.conteM Offline
            mar.conteM Offline
            mar.conte
            wrote on last edited by
            #140

            Help!!!
            I have upload bootloader 8mhz 38k bod 2,7 and internal clock with sketch j gammon!!!
            Consumption 2 mh!!!
            Why?
            Tanks

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Samuel235
              Hardware Contributor
              wrote on last edited by
              #141

              I'm sorry, i don't understand the issue at hand.... Could you attempt to explain any clearer?

              MySensors 2.1.1
              Controller - OpenHAB (Virtual Machine)
              Gateway - Arduino Mega MQTT Gateway W5100

              mar.conteM 1 Reply Last reply
              0
              • mar.conteM Offline
                mar.conteM Offline
                mar.conte
                wrote on last edited by
                #142
                This post is deleted!
                1 Reply Last reply
                0
                • S Samuel235

                  I'm sorry, i don't understand the issue at hand.... Could you attempt to explain any clearer?

                  mar.conteM Offline
                  mar.conteM Offline
                  mar.conte
                  wrote on last edited by
                  #143

                  @Samuel235
                  Hy
                  My project is simple atmega328 with internal clock 8 mhz in powerdown mode end rfm69 hw which send to gateway when pir motion is high powered all with 2 aa battery.
                  The First test what i do is in breadboard atmega328 with optiboot 6.2 ( i have upload bootloader 8mhz internal , 38vk, bod 2v7) and simple sketch j gammon: result no microampere but around 2/5 mah in sleep mode;

                  alexsh1A 1 Reply Last reply
                  0
                  • mar.conteM mar.conte

                    @Samuel235
                    Hy
                    My project is simple atmega328 with internal clock 8 mhz in powerdown mode end rfm69 hw which send to gateway when pir motion is high powered all with 2 aa battery.
                    The First test what i do is in breadboard atmega328 with optiboot 6.2 ( i have upload bootloader 8mhz internal , 38vk, bod 2v7) and simple sketch j gammon: result no microampere but around 2/5 mah in sleep mode;

                    alexsh1A Offline
                    alexsh1A Offline
                    alexsh1
                    wrote on last edited by
                    #144

                    @mar.conte I'm not familiar with the sketch you mentioned. The best is to use the voltmeter and oscillograph to determine consumption.

                    Why do you have BOD 2.7v? I do not have any BOD - this would let a node to run on two batteries until voltage drops to below 1.9V

                    mar.conteM 1 Reply Last reply
                    0
                    • alexsh1A alexsh1

                      @mar.conte I'm not familiar with the sketch you mentioned. The best is to use the voltmeter and oscillograph to determine consumption.

                      Why do you have BOD 2.7v? I do not have any BOD - this would let a node to run on two batteries until voltage drops to below 1.9V

                      mar.conteM Offline
                      mar.conteM Offline
                      mar.conte
                      wrote on last edited by
                      #145

                      @alexsh1
                      I have only voltmeter extec, can i mesure ua?
                      Can you send simple sketch for deep sleep ?

                      S alexsh1A 2 Replies Last reply
                      0
                      • mar.conteM mar.conte

                        @alexsh1
                        I have only voltmeter extec, can i mesure ua?
                        Can you send simple sketch for deep sleep ?

                        S Offline
                        S Offline
                        Samuel235
                        Hardware Contributor
                        wrote on last edited by
                        #146

                        @mar.conte - Are you basically saying that your hardware is using too much power to enable you to run on battery for any substantial time?

                        MySensors 2.1.1
                        Controller - OpenHAB (Virtual Machine)
                        Gateway - Arduino Mega MQTT Gateway W5100

                        mar.conteM 1 Reply Last reply
                        0
                        • S Samuel235

                          @mar.conte - Are you basically saying that your hardware is using too much power to enable you to run on battery for any substantial time?

                          mar.conteM Offline
                          mar.conteM Offline
                          mar.conte
                          wrote on last edited by
                          #147

                          @Samuel235
                          Yes, i want obtain few micro amp but its two month wich i try without result.....

                          tonnerre33T 1 Reply Last reply
                          0
                          • mar.conteM mar.conte

                            @Samuel235
                            Yes, i want obtain few micro amp but its two month wich i try without result.....

                            tonnerre33T Offline
                            tonnerre33T Offline
                            tonnerre33
                            Hardware Contributor
                            wrote on last edited by tonnerre33
                            #148

                            @mar.conte Which skecth did you use ?
                            Did you have radio errors in your log ?

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              Samuel235
                              Hardware Contributor
                              wrote on last edited by
                              #149

                              Could you please either include your sketch here or give us a link to the example sketch that you used please.

                              MySensors 2.1.1
                              Controller - OpenHAB (Virtual Machine)
                              Gateway - Arduino Mega MQTT Gateway W5100

                              mar.conteM 1 Reply Last reply
                              0
                              • S Samuel235

                                Could you please either include your sketch here or give us a link to the example sketch that you used please.

                                mar.conteM Offline
                                mar.conteM Offline
                                mar.conte
                                wrote on last edited by mar.conte
                                #150

                                @Samuel235
                                Resolved
                                I have try with sketc j gammon https://www.gammon.com.au/forum/?id=11497
                                And the problem are pir input (model hrc-501)
                                Are ever high and the cpu dont go in sleep.
                                I have remove pir and all ok the atmega run 20 uah very good.
                                Can you advise a good pir wich run to 3,3 V for my project?
                                Tanks

                                mar.conteM 1 Reply Last reply
                                0
                                • mar.conteM mar.conte

                                  @Samuel235
                                  Resolved
                                  I have try with sketc j gammon https://www.gammon.com.au/forum/?id=11497
                                  And the problem are pir input (model hrc-501)
                                  Are ever high and the cpu dont go in sleep.
                                  I have remove pir and all ok the atmega run 20 uah very good.
                                  Can you advise a good pir wich run to 3,3 V for my project?
                                  Tanks

                                  mar.conteM Offline
                                  mar.conteM Offline
                                  mar.conte
                                  wrote on last edited by mar.conte
                                  #151

                                  @mar.conte
                                  im not sure why pir with simple test like this http://playground.arduino.cc/Code/PIRsense is ok
                                  but with my sketch the cpu reset forever

                                  
                                  #include <Arduino.h>            // assumes Arduino IDE v1.0 or greater
                                  #include <avr/sleep.h>
                                  #include <avr/wdt.h>
                                  #include <avr/power.h>
                                  #include <avr/io.h>
                                              
                                  
                                  
                                  ISR (PCINT2_vect)
                                  {
                                    // handle pin change interrupt for D0 to D7 here
                                  }  // end of PCINT2_vect
                                  
                                  
                                  
                                  const unsigned long WAIT_TIME = 4000;
                                  
                                  
                                   const byte  LED =8 ;
                                   
                                   const byte  LED2 =9 ;
                                  int  wakepin =3 ;
                                    unsigned long lastSleep;
                                  
                                  
                                  
                                  volatile boolean motionDetected=false;
                                  float batteryVolts = 5;
                                  char BATstr[10]; //longest battery voltage reading message = 9chars
                                  char sendBuf[32];
                                  byte sendLen;
                                  void checkBattery(void);
                                  
                                  #include <RFM69.h>    //get it here: https://www.github.com/lowpowerlab/rfm69
                                  #include <SPI.h>
                                  
                                  //*********************************************************************************************
                                  // *********** IMPORTANT SETTINGS - YOU MUST CHANGE/ONFIGURE TO FIT YOUR HARDWARE *************
                                  //*********************************************************************************************
                                  #define NETWORKID     100  // The same on all nodes that talk to each other
                                  #define NODEID        2    // The unique identifier of this node
                                  #define RECEIVER      1    // The recipient of packets
                                  
                                  //Match frequency to the hardware version of the radio on your Feather
                                  //#define FREQUENCY     RF69_433MHZ
                                  //#define FREQUENCY     RF69_868MHZ
                                  #define FREQUENCY     RF69_868MHZ
                                  #define ENCRYPTKEY    "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!
                                  #define IS_RFM69HW   true // set to 'true' if you are using an RFM69HCW module
                                  
                                  //*********************************************************************************************
                                  #define SERIAL_BAUD   115200
                                  
                                  #define RFM69_CS      10
                                  #define RFM69_IRQ     2
                                  #define RFM69_IRQN    0  // Pin 2 is IRQ 0!
                                  #define RFM69_RST     9
                                  
                                  
                                  
                                  
                                  int16_t packetnum = 0;  // packet counter, we increment per xmission
                                  
                                  RFM69 radio = RFM69(RFM69_CS, RFM69_IRQ, IS_RFM69HW, RFM69_IRQN);  
                                  
                                  void setup () {
                                  
                                  
                                  
                                   
                                    pinMode (wakepin,INPUT);
                                      pinMode(LED, OUTPUT);
                                       pinMode(LED2, OUTPUT);
                                         digitalWrite(wakepin,HIGH);
                                     
                                    
                                    char buff[50];
                                   
                                    Serial.begin(SERIAL_BAUD);
                                  
                                    Serial.println("Arduino RFM69HCW Transmitter");
                                    
                                    // Hard Reset the RFM module
                                    pinMode(RFM69_RST, OUTPUT);
                                    digitalWrite(RFM69_RST, HIGH);
                                    delay(100);
                                    digitalWrite(RFM69_RST, LOW);
                                    delay(100);
                                  
                                    // Initialize radio
                                    radio.initialize(FREQUENCY,NODEID,NETWORKID);
                                    if (IS_RFM69HW) {
                                      radio.setHighPower();    // Only for RFM69HCW & HW!
                                    }
                                    radio.setPowerLevel(31); // power output ranges from 0 (5dBm) to 31 (20dBm)
                                    
                                    radio.encrypt(ENCRYPTKEY);
                                    
                                    pinMode(LED, OUTPUT);
                                    Serial.print("\nTransmitting at ");
                                    Serial.print(FREQUENCY==RF69_433MHZ ? 433 : FREQUENCY==RF69_868MHZ ? 868 : 915);
                                    Serial.println(" MHz");
                                  
                                   }
                                  
                                  
                                  
                                  
                                  uint16_t batteryReportCycles=0;
                                  
                                  
                                  
                                  void loop () 
                                  { 
                                      
                                     //rf();
                                  
                                  
                                    sleepNow();
                                     rf();
                                      
                                   //radio.sleep();
                                     
                                                  // sleep function called here 
                                  
                                  
                                   radio.sleep();
                                  }
                                  
                                  
                                  
                                  void wake ()
                                  {
                                  
                                   // cancel sleep as a precaution
                                    //sleep_disable();
                                    // precautionary while we do other stuff
                                   detachInterrupt (1);
                                  }  // end of wake
                                  
                                  void sleepNow()
                                  
                                  {
                                  
                                     if (millis () - lastSleep >= WAIT_TIME)
                                    {
                                      lastSleep = millis ();
                                  
                                  
                                      byte old_ADCSRA = ADCSRA;
                                      // disable ADC
                                      ADCSRA = 0;  
                                      // pin change interrupt (example for D0)
                                      PCMSK2 |= bit (PCINT16); // want pin 0
                                      PCIFR  |= bit (PCIF2);   // clear any outstanding interrupts
                                      PCICR  |= bit (PCIE2);   // enable pin change interrupts for D0 to D7
                                  
                                      set_sleep_mode (SLEEP_MODE_PWR_DOWN);
                                    
                                      power_adc_disable();
                                      power_spi_disable();
                                      power_timer0_disable();
                                      power_timer1_disable();
                                      power_timer2_disable();
                                      power_twi_disable();
                                    //PORTB = 0x00;
                                      UCSR0B &= ~bit (RXEN0);  // disable receiver
                                      UCSR0B &= ~bit (TXEN0);  // disable transmitter
                                  
                                      sleep_enable();
                                      
                                      noInterrupts ();
                                    attachInterrupt (1, wake,HIGH);
                                      digitalWrite (LED, LOW);
                                   
                                    interrupts ();
                                      sleep_cpu ();      
                                     digitalWrite (LED, HIGH);
                                  
                                      sleep_disable();
                                      power_all_enable();
                                   
                                      ADCSRA = old_ADCSRA;
                                      PCICR  &= ~bit (PCIE2);   // disable pin change interrupts for D0 to D7
                                      UCSR0B |= bit (RXEN0);  // enable receiver
                                      UCSR0B |= bit (TXEN0);  // enable transmitter
                                  
                                    }  // end of time to sleep
                                     
                                   
                                  }
                                  
                                  void rf()
                                  {
                                   char radiopacket[20] = "Hello World #";
                                    itoa(packetnum++, radiopacket+13, 10);
                                    Serial.print("Sending "); Serial.println(radiopacket);
                                      
                                    if (!radio.sendWithRetry(RECEIVER, radiopacket, strlen(radiopacket))) { //target node Id, message as string or byte array, message length
                                      Serial.println("OK");
                                  
                                    }
                                  
                                    radio.receiveDone(); //put radio in RX mode
                                    Serial.flush(); //make sure all serial data is clocked out before sleeping the MCU
                                    
                                    
                                  
                                  
                                   }
                                  
                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    Samuel235
                                    Hardware Contributor
                                    wrote on last edited by
                                    #152

                                    Firstly, i can't read the structure the way you have posted your sketch. You should use the code function in the reply, the icon looks like "</>" above where you make your reply. Put your code in there for us to have any chance of reading it at all.

                                    Secondly, I don't think that this is the place to be posting this issue. For a start, this isn't an issue relevant to the bootloader in this thread and secondly, it doesn't even have anything to do with MySensors.

                                    MySensors 2.1.1
                                    Controller - OpenHAB (Virtual Machine)
                                    Gateway - Arduino Mega MQTT Gateway W5100

                                    mar.conteM 1 Reply Last reply
                                    1
                                    • mar.conteM mar.conte

                                      @alexsh1
                                      I have only voltmeter extec, can i mesure ua?
                                      Can you send simple sketch for deep sleep ?

                                      alexsh1A Offline
                                      alexsh1A Offline
                                      alexsh1
                                      wrote on last edited by
                                      #153

                                      @mar.conte yes, you can measure consumption (should be in uA) while sleeping with a good voltmeter.

                                      However, I really fail to understand what has Nick's sketch you mentioned to do with MySensors? I suppose some people here may be aware of sleeping issues, but again your problem has nothing to do with MySensors.

                                      Please see the following - it may help you troubleshoot your issue
                                      https://www.mysensors.org/build/battery

                                      1 Reply Last reply
                                      2
                                      • S Samuel235

                                        Firstly, i can't read the structure the way you have posted your sketch. You should use the code function in the reply, the icon looks like "</>" above where you make your reply. Put your code in there for us to have any chance of reading it at all.

                                        Secondly, I don't think that this is the place to be posting this issue. For a start, this isn't an issue relevant to the bootloader in this thread and secondly, it doesn't even have anything to do with MySensors.

                                        mar.conteM Offline
                                        mar.conteM Offline
                                        mar.conte
                                        wrote on last edited by
                                        #154

                                        @Samuel235
                                        I wanted to build my projects with mysensors, first of all I started with bootloader found in this section to try them with examples that I know because I do not know yet mysensors, I wanted to learn it so I took the liberty to insert code in your section. if you can figure out my problem thank you or I apologize for the trouble thanks

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          Samuel235
                                          Hardware Contributor
                                          wrote on last edited by
                                          #155

                                          I get why you done it, but i don't understand why. You don't need to 'know' mysensors.... There is a getting started page, i suggest you take a few hours and read through everything. I'm not helping with an issue that is completely not related to mysensors while on the mysensors forum. Just simply for future readers of this thread that come here to solve their issue, if this thread is bloated out with over 10/20 replies that is not related to the question at hand its much harder for them to find their resolution here. I suggest contacting the author of the code himself as i'm pretty sure that your issue is not the bootloader.

                                          MySensors 2.1.1
                                          Controller - OpenHAB (Virtual Machine)
                                          Gateway - Arduino Mega MQTT Gateway W5100

                                          mar.conteM 1 Reply 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