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. ATtiny supported?

ATtiny supported?

Scheduled Pinned Locked Moved Hardware
42 Posts 20 Posters 28.9k Views 9 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.
  • R Offline
    R Offline
    Rasmus Eneman
    wrote on last edited by
    #1

    I would like to use small 8pin AVRs for nodes with only one sensor (like temp).
    Is ATtinys supported?

    I'm sorry if this is a dumb question, I'm new to the Arduino and AVR world.

    hekH YveauxY Z 3 Replies Last reply
    1
    • R Rasmus Eneman

      I would like to use small 8pin AVRs for nodes with only one sensor (like temp).
      Is ATtinys supported?

      I'm sorry if this is a dumb question, I'm new to the Arduino and AVR world.

      hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      @Rasmus-Eneman

      I doubt it but this might help: :)
      http://hackaday.com/2014/02/16/nrf24l01-using-3-attiny85-pins/

      YveauxY 1 Reply Last reply
      0
      • R Rasmus Eneman

        I would like to use small 8pin AVRs for nodes with only one sensor (like temp).
        Is ATtinys supported?

        I'm sorry if this is a dumb question, I'm new to the Arduino and AVR world.

        YveauxY Offline
        YveauxY Offline
        Yveaux
        Mod
        wrote on last edited by Yveaux
        #3

        @Rasmus-Eneman IMHO there's nothing in the library that would prevent it from running on an ATTiny, but you might (will?) probably have troubles fitting everything in the available flash/ram.
        Connecting the nRF24 radio might also be troublesome as the ATTiny really has too little pins. I saw an article where somebody combined CE/CSN pins but this required some external components and modifications to the nRF24 library.
        ATTiny is also not supported by Arduino and can only be added by using third party software.
        I doubt if all is worth the trouble really...

        http://yveaux.blogspot.nl

        1 Reply Last reply
        0
        • hekH hek

          @Rasmus-Eneman

          I doubt it but this might help: :)
          http://hackaday.com/2014/02/16/nrf24l01-using-3-attiny85-pins/

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #4

          @hek Ah, just beat me :facepunch:

          http://yveaux.blogspot.nl

          hekH 1 Reply Last reply
          0
          • YveauxY Yveaux

            @hek Ah, just beat me :facepunch:

            hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by
            #5

            @Yveaux

            Yiha!

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rasmus Eneman
              wrote on last edited by
              #6

              I actually saw some Arduino projects on ATtiny, however I didn't thought of the IO problem.
              Guess I will have to kill that idea.

              Thanks both of you for the fast response :)

              1 Reply Last reply
              0
              • R Rasmus Eneman

                I would like to use small 8pin AVRs for nodes with only one sensor (like temp).
                Is ATtinys supported?

                I'm sorry if this is a dumb question, I'm new to the Arduino and AVR world.

                Z Offline
                Z Offline
                Zeph
                Hero Member
                wrote on last edited by
                #7

                @Rasmus-Eneman

                You can find a lot of guides on the web about using the Arduino environment for the ATTiny series.

                The TMRH2o nRF library is supposed to support ATTiny, but may not have been tested.

                You already know that pins are going to be very tight, but if you have a one-pin sensor which doesn't need much code...

                It might be possible to fit the sensor code (for some sensors) and the MySensors libraries, but if so it would be tight.

                One tip: avoid any floating point code (some node sketches use it and some do not).

                I'd actually love to see somebody make a MySensors node on an ATTiny.

                marceltrapmanM 1 Reply Last reply
                0
                • Z Zeph

                  @Rasmus-Eneman

                  You can find a lot of guides on the web about using the Arduino environment for the ATTiny series.

                  The TMRH2o nRF library is supposed to support ATTiny, but may not have been tested.

                  You already know that pins are going to be very tight, but if you have a one-pin sensor which doesn't need much code...

                  It might be possible to fit the sensor code (for some sensors) and the MySensors libraries, but if so it would be tight.

                  One tip: avoid any floating point code (some node sketches use it and some do not).

                  I'd actually love to see somebody make a MySensors node on an ATTiny.

                  marceltrapmanM Offline
                  marceltrapmanM Offline
                  marceltrapman
                  Mod
                  wrote on last edited by
                  #8

                  I have looked into this too but decided against it.
                  Mainly for 2 reasons:

                  1. A board stacked onto your own pcb would make that you can keep the width and length of your pcb small. Imho adding your own microcontroller etc. to your own pcb would make it larger. Unless I am mistaken.
                  2. When going that route why not use the ATmega328? Price can't be the reason not to use it or is it?

                  Fulltime Servoy Developer
                  Parttime Moderator MySensors board

                  I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                  I have a FABtotum to print cases.

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    treb0r
                    wrote on last edited by
                    #9

                    I found such board with ATtiny84 and NRF24L01.
                    http://nettigo.pl/products/bezprzewodowy-sensor-tinybrd
                    I am trying to find out from the producers if mysensors library will also work on it.
                    What do you think? Hardware site is already done. Will it be possible to run sketches with mysensors on it?
                    Regards

                    1 Reply Last reply
                    0
                    • marceltrapmanM Offline
                      marceltrapmanM Offline
                      marceltrapman
                      Mod
                      wrote on last edited by
                      #10

                      I am still interested in the answer to the question 'why would you want to use an ATtiny?'....

                      Fulltime Servoy Developer
                      Parttime Moderator MySensors board

                      I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                      I have a FABtotum to print cases.

                      H T NeverDieN 3 Replies Last reply
                      0
                      • marceltrapmanM marceltrapman

                        I am still interested in the answer to the question 'why would you want to use an ATtiny?'....

                        H Offline
                        H Offline
                        hyla
                        wrote on last edited by
                        #11

                        @marceltrapman

                        They're so very ... minimalistic ;)

                        Christoph

                        1 Reply Last reply
                        0
                        • marceltrapmanM marceltrapman

                          I am still interested in the answer to the question 'why would you want to use an ATtiny?'....

                          T Offline
                          T Offline
                          treb0r
                          wrote on last edited by treb0r
                          #12

                          @marceltrapman
                          Because in case of door/window sensor it is better looking, when you have sth small sticked to the frame :)

                          1 Reply Last reply
                          0
                          • OitzuO Offline
                            OitzuO Offline
                            Oitzu
                            wrote on last edited by
                            #13

                            Actually i tried to port the mysensors lib to the attiny, a few months ago..
                            https://github.com/Oitzu/Arduino
                            I had to remove much of the auto-id, repeater and gw stuff to fit it into the memory of the attiny.
                            But it the end it didn't run stable enough. This can maybe be fixed but i didn't investigated further.

                            1 Reply Last reply
                            0
                            • marceltrapmanM marceltrapman

                              I am still interested in the answer to the question 'why would you want to use an ATtiny?'....

                              NeverDieN Offline
                              NeverDieN Offline
                              NeverDie
                              Hero Member
                              wrote on last edited by NeverDie
                              #14

                              @marceltrapman said:

                              I am still interested in the answer to the question 'why would you want to use an ATtiny?'....

                              For example, an ATTiny85 is

                              • cheaper (just $1),
                              • it's smaller,
                              • it uses less power (about 1/4 as much),
                              • it's programmable using the arduino IDE,
                              • it also sports a differential ADC (for higher accuracy) that the atmeg328p simply doesn't have,
                              • doesn't require external support components
                              • wouldn't require a breakout board

                              For the last point, consider this type of possibility:
                              jee.jpg
                              http://jeelabs.org/book/1501a/

                              Is that enough of an answer? If necessary software can be crammed in there, it's a clear win.

                              Some of the attiny's support SPI natively. For those that don't (such as the ATTiny85), I've read there's a softSPI library for it

                              Moshe LivneM 1 Reply Last reply
                              1
                              • NeverDieN NeverDie

                                @marceltrapman said:

                                I am still interested in the answer to the question 'why would you want to use an ATtiny?'....

                                For example, an ATTiny85 is

                                • cheaper (just $1),
                                • it's smaller,
                                • it uses less power (about 1/4 as much),
                                • it's programmable using the arduino IDE,
                                • it also sports a differential ADC (for higher accuracy) that the atmeg328p simply doesn't have,
                                • doesn't require external support components
                                • wouldn't require a breakout board

                                For the last point, consider this type of possibility:
                                jee.jpg
                                http://jeelabs.org/book/1501a/

                                Is that enough of an answer? If necessary software can be crammed in there, it's a clear win.

                                Some of the attiny's support SPI natively. For those that don't (such as the ATTiny85), I've read there's a softSPI library for it

                                Moshe LivneM Offline
                                Moshe LivneM Offline
                                Moshe Livne
                                Hero Member
                                wrote on last edited by
                                #15

                                @NeverDie I would like to add my support for your worthy quest. Some time ago I was looking for a way to make MySensors RFID like tags for presence detection but the result was just too big as well as too energy consuming.

                                1 Reply Last reply
                                0
                                • OitzuO Offline
                                  OitzuO Offline
                                  Oitzu
                                  wrote on last edited by
                                  #16

                                  @NeverDie @Moshe-Livne the underlying rf24 library supports the use of the attiny85.
                                  As mentioned above, the modified (shrinked) mysensors library runs on the attiny85 but is a little bit unstable.
                                  There could be multiple reasons for this... i stopped the development of the attiny85 port because of low interest and time for other projects.

                                  @Sweebee : Do you still have the sketches and layouts for the attiny85 mysensors node?

                                  NeverDieN SweebeeS 2 Replies Last reply
                                  0
                                  • OitzuO Oitzu

                                    @NeverDie @Moshe-Livne the underlying rf24 library supports the use of the attiny85.
                                    As mentioned above, the modified (shrinked) mysensors library runs on the attiny85 but is a little bit unstable.
                                    There could be multiple reasons for this... i stopped the development of the attiny85 port because of low interest and time for other projects.

                                    @Sweebee : Do you still have the sketches and layouts for the attiny85 mysensors node?

                                    NeverDieN Offline
                                    NeverDieN Offline
                                    NeverDie
                                    Hero Member
                                    wrote on last edited by NeverDie
                                    #17

                                    @Oitzu said:

                                    @NeverDie @Moshe-Livne the underlying rf24 library supports the use of the attiny85.
                                    As mentioned above, the modified (shrinked) mysensors library runs on the attiny85 but is a little bit unstable.
                                    There could be multiple reasons for this... i stopped the development of the attiny85 port because of low interest and time for other projects.

                                    Which fork or version of RF24 did you try? Perhaps we can pick up where you left off.. I've read that TMRh2O is both supported and has fixes to bugs in prior versions. Is there presently anything better? However, if it turns out that's unstable too, then maybe just poking registers on the NRF24L01+ is enough for something barebones but stable. Anybody know? A softSPI library would still be needed though. Any suggestions on which of those would be a good choice for the Attiny85?

                                    I recently received a tiny AVR programmer:
                                    tinyAVR.jpg
                                    http://sfe.io/p11801
                                    purely for convenience, but I haven't tried it out yet. There's also a youtube video (https://www.youtube.com/watch?v=30rPt802n1k) which shows another way how to do it using a spare arduino as the programmer.

                                    1 Reply Last reply
                                    0
                                    • OitzuO Oitzu

                                      @NeverDie @Moshe-Livne the underlying rf24 library supports the use of the attiny85.
                                      As mentioned above, the modified (shrinked) mysensors library runs on the attiny85 but is a little bit unstable.
                                      There could be multiple reasons for this... i stopped the development of the attiny85 port because of low interest and time for other projects.

                                      @Sweebee : Do you still have the sketches and layouts for the attiny85 mysensors node?

                                      SweebeeS Offline
                                      SweebeeS Offline
                                      Sweebee
                                      wrote on last edited by
                                      #18

                                      @Oitzu https://github.com/sweebee/Arduino-home-automation/tree/master/2.4Ghz (MySensors)/Attiny/button-switch

                                      NeverDieN 1 Reply Last reply
                                      0
                                      • SweebeeS Sweebee

                                        @Oitzu https://github.com/sweebee/Arduino-home-automation/tree/master/2.4Ghz (MySensors)/Attiny/button-switch

                                        NeverDieN Offline
                                        NeverDieN Offline
                                        NeverDie
                                        Hero Member
                                        wrote on last edited by NeverDie
                                        #19

                                        @Sweebee said:

                                        @Oitzu https://github.com/sweebee/Arduino-home-automation/tree/master/2.4Ghz (MySensors)/Attiny/button-switch

                                        I gave it a quick read, and noticed that it appears to be using maniacbug's RF24 library. Six months ago Maniacbug posted the following here:

                                        My fork has been abandoned.TMRH20 now has the premier fork - by far. You'll find considerably improved reliability and performance over both my fork and the original code base. Plus he has made an effort to keep RF24Network working well. Don't walk, but run from the orginal code base and immediately starting using TMR's fork.

                                        http://tmrh20.github.io/RF24/

                                        Unfortunately, he posted this seemingly vital news in a comment buried way down the page instead of at the top, which is where it belongs. I wouldn't be surprised if most people are unaware of it.

                                        Would it be much effort to migrate to the new library? It sounds like that alone might solve the stability problem.

                                        1 Reply Last reply
                                        0
                                        • OitzuO Offline
                                          OitzuO Offline
                                          Oitzu
                                          wrote on last edited by Oitzu
                                          #20

                                          @NeverDie i used a spare arduino nano as programmer for the attiny85. This works great.
                                          As you maybe have seen i'm using a fork of the mysensors library of the end of may 2015.
                                          I don't really can identify, at this moment, with which version of rf24 the mysensors library comes by...
                                          but because the last update of this lib seems to be 9 months ago i should give it a try to update it.

                                          My suggested way to go would be: To merge the changes in the mysensors library from may 2015 to now into the fork (to be up-to-date with mysensors again) and then try to replace the rf24 library with a newer version.

                                          Did we have anyone here able to test the libs? At the moment i have no spare attiny & nrf laying arround, i'm waiting for a new delivery.

                                          About SPI: The rf24 lib includes a softSPI lib for communication.The lib even supports different ways to connect the nrf24 with the attiny.
                                          See: http://tmrh20.github.io/RF24/rf24ping85_8ino-example.html

                                          I never tried the 3 connect. I simply connected CE with VCC to get one pin for testing free.

                                          NeverDieN 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          11

                                          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