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. Custom board with ATmega328 and crystal (or not)

Custom board with ATmega328 and crystal (or not)

Scheduled Pinned Locked Moved Hardware
6 Posts 4 Posters 3.8k Views 1 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.
  • marceltrapmanM Offline
    marceltrapmanM Offline
    marceltrapman
    Mod
    wrote on last edited by
    #1

    While creating a board for another project using an ATmega328 I found that it might be easier to create a MySensors board with the standalone microcontroller instead of a complete Arduino (and all overkill components).

    The first question that comes up while working on the design of the board is 'do I need the crystal or not'.

    I am not really sure.
    I saw a couple of projects with and without but I did not really find out what advantages/disadvantages come with doing the board this way (other than maybe use less current).

    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.

    T 1 Reply Last reply
    0
    • marceltrapmanM marceltrapman

      While creating a board for another project using an ATmega328 I found that it might be easier to create a MySensors board with the standalone microcontroller instead of a complete Arduino (and all overkill components).

      The first question that comes up while working on the design of the board is 'do I need the crystal or not'.

      I am not really sure.
      I saw a couple of projects with and without but I did not really find out what advantages/disadvantages come with doing the board this way (other than maybe use less current).

      T Offline
      T Offline
      ToSa
      Code Contributor
      wrote on last edited by
      #2

      @marceltrapman I'm running almost all of my nodes (+gateway) using custom ATmega328 setup vs. using an Arduino (quite a few of them just on a breadboard for now). I did not try without a crystal. At the end you need to look at which operation is most time critical. Usually these are communication but SPI is not that time critical with the clock signal being generated by the MCU itself. I don't know for sure about e.g. one-wire if you want to use a DS18B20 or so. If you want a time aware sensor you probably should go with a crystal to get at least a little accuracy :)
      For power consumption you should carefully check. I guess the ATmega based on the fuses turns on or off the internal clock - you might lose some of the lower power consumption again because now the ATmega itself consumes more...

      marceltrapmanM 1 Reply Last reply
      0
      • T ToSa

        @marceltrapman I'm running almost all of my nodes (+gateway) using custom ATmega328 setup vs. using an Arduino (quite a few of them just on a breadboard for now). I did not try without a crystal. At the end you need to look at which operation is most time critical. Usually these are communication but SPI is not that time critical with the clock signal being generated by the MCU itself. I don't know for sure about e.g. one-wire if you want to use a DS18B20 or so. If you want a time aware sensor you probably should go with a crystal to get at least a little accuracy :)
        For power consumption you should carefully check. I guess the ATmega based on the fuses turns on or off the internal clock - you might lose some of the lower power consumption again because now the ATmega itself consumes more...

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

        @ToSa Well, that sounds like I should use the crystal.
        Thank you for your reply!

        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
        • R Offline
          R Offline
          royaraya16
          wrote on last edited by
          #4

          In my opinion there's no need to use the crystal, you can use de 8MHz internal clock. And if you check the datasheet you'll see that a lower clock speed also reduces your power consumption...

          Here's an awesome tutorial that I found, it explains step by step how to use the standalone atmega328p chip.

          http://www.gammon.com.au/forum/?id=11637

          marceltrapmanM 1 Reply Last reply
          0
          • R royaraya16

            In my opinion there's no need to use the crystal, you can use de 8MHz internal clock. And if you check the datasheet you'll see that a lower clock speed also reduces your power consumption...

            Here's an awesome tutorial that I found, it explains step by step how to use the standalone atmega328p chip.

            http://www.gammon.com.au/forum/?id=11637

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

            @royaraya16 said:

            In my opinion there's no need to use the crystal, you can use de 8MHz internal clock.

            I have not yet read the article by why is it then that all Arduino boards (that I know of) make use of a crystal?

            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.

            tbowmoT 1 Reply Last reply
            0
            • marceltrapmanM marceltrapman

              @royaraya16 said:

              In my opinion there's no need to use the crystal, you can use de 8MHz internal clock.

              I have not yet read the article by why is it then that all Arduino boards (that I know of) make use of a crystal?

              tbowmoT Offline
              tbowmoT Offline
              tbowmo
              Admin
              wrote on last edited by
              #6

              @marceltrapman said:

              @royaraya16 said:

              In my opinion there's no need to use the crystal, you can use de 8MHz internal clock.

              I have not yet read the article by why is it then that all Arduino boards (that I know of) make use of a crystal?

              Becauses it is easier, gives a more reliable oscilator (over a wide temperature, and voltage range), and the first arduino was designed with 16Mhz crystal (if I remember correctly). the maximum internal rc osc. is 8Mhz

              / Thomas

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              22

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              Posts


              Copyright 2025 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