Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Ron
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Ron

    @Ron

    11
    Reputation
    14
    Posts
    432
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website oberdiek.net

    Ron Follow

    Best posts made by Ron

    • Capacitive Soil Moisture Sensor

      Hi everyone,

      I am happy to share my very first PCB design project with you. It is a capacitive soil moisture sensor using an ATmega328P and NRF24L01+.
      The capacitance is measured as commonly done through a low pass filter using the ATmega PWM instead of a NE555.

      I am not a professional in the area of microelectronics and pcb design and have thought me most of the things myself. This is also why I already have a ton of ideas for future improvements on the design with the switch to a NRF52 being on top. Still I am quite satisfied with my results so far. The pcb is tested and working (despite the fact that I soldered a wrong value capacitor and forgot the capacitor for the ftdi connector, which is already fixed). You can see example measurements on a plot below.
      I have made all source files available on the corresponding GitHub repository.

      I am happy to hear your thoughts and maybe some tips and remarks.

      Cheers!
      Ron

      prototype_01.jpgprototype_02.jpgprototype_03.jpgexample_readings.png

      posted in My Project
      Ron
      Ron
    • ATMEGA328P standalone soil moisture sensor

      Hi everyone,

      first of all thank you very much for this awesome project / community.

      I recently got more and more interested in building sensors. My next project would be to add some capacitive soil moisture sensors to some plants around the house.
      I know there are already a few sensors of this kind out there like these:
      https://www.openhardware.io/view/767/Wireless-Module-for-Capacitive-Soil-Moisture-Sensor-v20#tabs-design
      https://www.openhardware.io/view/672/Soil-moisture-meter#tabs-instructions

      The second one however, despite it is exactly what I was looking for, does not provide any design files.
      But as I wanted to learn more about electronics in general and also wanted to build my first smd pcb, I build my own capacitive soil moisture sensor based on an ATMEGA328P, NRF24L01+ and a 3V coin cell. The schematic is based on the chirp sensor and I oriented myself with regards to component selection at this project.
      The good news is: It works!
      But I already noticed some flaws (e.g. I forgot to add a FTDI connector besides the AVR ISP 🤦‍♂️ 😆 ) and I could need some help from you:

      The voltage range that comes out of the sensor circuit is very limited. In air the analog pin reads about 570 while reading around 498 submerged in a glas of water.
      I read this post and made my own calculations (I measured my probe to have between 20pF and 460pF). Based on these the voltage swing should be around 2.4V from minimum to maximum capacity. Now the real world is probably not exactly like the calculations but this difference seems a little bit large to me. Anything that I am missing here?
      As additional information: I generate a 1 MHz square wave using the internal clock of the atmega by enabling fast pwm using the following bits:

      TCCR2A = (1 << COM2B1)  // Clear OC2B on compare match
      	| (1 << WGM21)  // pwm mode 7
      	| (1 << WGM20);  // pwm mode 7
      TCCR2B = (1 << WGM22)  // pwm mode 7
      	| (1 << CS20);  // no prescaling
                 
      OCR2A = 7;
      OCR2B = 3;
      

      In the setup function I set pin 3 (connected to OC2B) as output and pin 14 (A0) as input (this is where the sensor output goes in).

      Any help on this would be greatly appreciated.
      As soon as I finish the sensor (when I am no more bothered by the remaining flaws 😁 ) I will make it accessible for everyone.

      Thank you in advance for any advice or guidance.

      Best regards,
      Ron
      Schematic.png
      20200812_104549.jpg
      20200812_104544.jpg

      posted in Hardware
      Ron
      Ron
    • RE: 💬 Capacitive Soil Moisture Sensor

      @sundberg84 said in 💬 Capacitive Soil Moisture Sensor:

      Nice work @Ron . Thinking about getting some of these for my plants.
      Any experienced issues, or the PCB and components works good?

      I had the first prototype running for about 2-3 months and did not experience any issues. The next thing on my todo list is to get an estimation on the total battery lifetime. I would assume that it will be quite good as I did not notice any significant drop in battery voltage over that time. I will post my measurements in the corresponding GitHub question as soon as I have some time. 🙂

      posted in OpenHardware.io
      Ron
      Ron
    • controlling Teufel Sound System

      Hi there,

      i am reading now for some time in this forum and it really helped me out a few times, thanks for that!
      But now i would like to actively participate here.

      The Problem:
      I have a Teufel Concept E in my livingroom. This can only be controlled with a special remote control.
      Because it is not automatically activating itself when there is an incomming signal (e.g. from my tv) i always need to search for the remote control.
      At the moment i can already switch a 433MHz Socket with an Arduino/Transceiver and Openhab to turn on my tv, it would be great if i could also switch the sound system with an Arduino. So i asked myself on which technology/frequency the remote control is sending and opened it up

      0_1497541564069_20170615_171132.jpg

      there was a leaking battery 😣 but i don't mind because it's still working 🙂
      now im not really sure if that what i want to do is going to work. I think the black chip on the right side is the transmitter? I searched google for "N51822" and found a "NRF51822 bluetooth low energy" which can send on bluetooth low energy and 2.4GHz ultra low power.
      Do you think it is going to work? And what do i have to do to achive just a simple on/off remote with an arduino?

      Thank you very much for every answer on this!
      Ron

      posted in Hardware
      Ron
      Ron
    • RE: ATMEGA328P standalone soil moisture sensor

      Hi everyone,

      I have rebuild the sensor and this is the current status:

      • Changed out the coincell for two AAA batteries due to higher capacity and better availability. This increased the sensor size in both height and width but this does not bother me.
      • Added the possibility to attach an ATSHA204A in a SOT-23-3 package for message signing.
      • Added an FTDI connection besides the AVR-ISP
      • Changed from indentation to mounting holes. This makes it easier to design 3D printed cases for it.

      Any nice features that I am missing here or that some of you would like to see on this? I am open for suggestions 🙂

      PS: Is there any way to scale the uploaded images?

      SoilMoistureSensor02.jpeg
      SoilMoistureSensor01.jpeg

      posted in Hardware
      Ron
      Ron
    • RE: ATMEGA328P standalone soil moisture sensor

      @mfalkvidd you are right, I might somehow have found an older datasheet somewhere (my one was from 2015). In the current datasheet from the microchip website the same graph is present which indicates 2.4V minimum for 8 MHz. So I probably will deactivate 2.7V BOD. 🙂

      posted in Hardware
      Ron
      Ron

    Latest posts made by Ron

    • RE: 💬 Capacitive Soil Moisture Sensor

      @sundberg84 said in 💬 Capacitive Soil Moisture Sensor:

      Nice work @Ron . Thinking about getting some of these for my plants.
      Any experienced issues, or the PCB and components works good?

      I had the first prototype running for about 2-3 months and did not experience any issues. The next thing on my todo list is to get an estimation on the total battery lifetime. I would assume that it will be quite good as I did not notice any significant drop in battery voltage over that time. I will post my measurements in the corresponding GitHub question as soon as I have some time. 🙂

      posted in OpenHardware.io
      Ron
      Ron
    • RE: 💬 Capacitive Soil Moisture Sensor

      @Anticimex That was also my thinking behind that. According to the datasheet the ATmega328P works reliably down to 2.4V when using 8MHz.

      posted in OpenHardware.io
      Ron
      Ron
    • RE: 💬 Capacitive Soil Moisture Sensor

      @Puneit-Thukral Thanks. I am not quite sure, so correct me please if I am wrong, but I think I am already using the MiniCore bootloader with platformIO. Or do I need to configure to explicitly use the MiniCore bootloaders? Also I have set BOD to disabled as I read somewhere that no BOD can also save battery.

      posted in OpenHardware.io
      Ron
      Ron
    • Capacitive Soil Moisture Sensor

      Hi everyone,

      I am happy to share my very first PCB design project with you. It is a capacitive soil moisture sensor using an ATmega328P and NRF24L01+.
      The capacitance is measured as commonly done through a low pass filter using the ATmega PWM instead of a NE555.

      I am not a professional in the area of microelectronics and pcb design and have thought me most of the things myself. This is also why I already have a ton of ideas for future improvements on the design with the switch to a NRF52 being on top. Still I am quite satisfied with my results so far. The pcb is tested and working (despite the fact that I soldered a wrong value capacitor and forgot the capacitor for the ftdi connector, which is already fixed). You can see example measurements on a plot below.
      I have made all source files available on the corresponding GitHub repository.

      I am happy to hear your thoughts and maybe some tips and remarks.

      Cheers!
      Ron

      prototype_01.jpgprototype_02.jpgprototype_03.jpgexample_readings.png

      posted in My Project
      Ron
      Ron
    • RE: ATMEGA328P standalone soil moisture sensor

      @mfalkvidd you are right, I might somehow have found an older datasheet somewhere (my one was from 2015). In the current datasheet from the microchip website the same graph is present which indicates 2.4V minimum for 8 MHz. So I probably will deactivate 2.7V BOD. 🙂

      posted in Hardware
      Ron
      Ron
    • RE: ATMEGA328P standalone soil moisture sensor

      @mfalkvidd said in ATMEGA328P standalone soil moisture sensor:

      @Ron You can use 8MHz safely down to 2.34V according to the graph in the datasheet.

      Are you sure with that? I found this information in the datasheet to the atmega328p-au, where it states that the safe operating range ends at 2.7V:
      SmartSelect_20200907-211145_Xodo Docs.jpg

      Maybe I should consider using an external oscillator instead of the internal one? Do you know something about the power consumption with an external crystal compared to the internal oscillator?

      @mfalkvidd said in ATMEGA328P standalone soil moisture sensor:

      For size, CR123a might be an option. They are lithium 3V, so one would be sufficient.

      These ones look definitely interesting, I will have a look at them, thank you 🙂

      posted in Hardware
      Ron
      Ron
    • RE: ATMEGA328P standalone soil moisture sensor

      Hi there,

      I am currently thinking about a power supply solution for the sensor. The possible options with their advantages/disadvantages are:

      • Single AAA Battery Cell + dc-dc boost converter
        + compact formfactor
        - not that much capacity
        - additional costs because of boost converter hardware
      • Double AAA Battery
        + relatively large capacity and thus longer lifetime
        + no need of a booster which could introduce noise to the radio
        - bulky (as you can see on the photos of my last post)

      What bothers me is that without a booster I can only use two AAA batteries until they reach 2.7V in total, as I need at least 2.7V if I want to use the 8 MHz internal clock of the atmega.
      Does it make sense to combine two AAA batteries with a boost converter to 3.3V? This way one could use the batteries until they reach ~2V in total.
      I am interested to hear your thoughts on that.

      posted in Hardware
      Ron
      Ron
    • RE: ATMEGA328P standalone soil moisture sensor

      Hi everyone,

      I have rebuild the sensor and this is the current status:

      • Changed out the coincell for two AAA batteries due to higher capacity and better availability. This increased the sensor size in both height and width but this does not bother me.
      • Added the possibility to attach an ATSHA204A in a SOT-23-3 package for message signing.
      • Added an FTDI connection besides the AVR-ISP
      • Changed from indentation to mounting holes. This makes it easier to design 3D printed cases for it.

      Any nice features that I am missing here or that some of you would like to see on this? I am open for suggestions 🙂

      PS: Is there any way to scale the uploaded images?

      SoilMoistureSensor02.jpeg
      SoilMoistureSensor01.jpeg

      posted in Hardware
      Ron
      Ron
    • RE: ATMEGA328P standalone soil moisture sensor

      I have a strong feeling that I got the wrong diode for the rectification of the triangular wave that comes out after the capacitive sensor (RC circuit). I got this one:

      https://lcsc.com/product-detail/Schottky-Barrier-Diodes-SBD_Guangdong-Hottech-SS14L_C190475.html

      In the datasheet it says that this diode has a Typical Junction Capacitance of between 90 and 110 pF which seems pretty high compared to the capacitance of the sensor. Do I need a diode with a lower capacitance?

      Can someone give me a hint if I am on the right track?
      Thank you 🙂

      Edit: Okey I switched the smd diode with an all purpose tht diode that I had lying around and now the voltage swing is already at 1.1V so it definitely is the diode. Any recommendations on diode selection for high frequency (1-4MHz) applications?

      posted in Hardware
      Ron
      Ron
    • ATMEGA328P standalone soil moisture sensor

      Hi everyone,

      first of all thank you very much for this awesome project / community.

      I recently got more and more interested in building sensors. My next project would be to add some capacitive soil moisture sensors to some plants around the house.
      I know there are already a few sensors of this kind out there like these:
      https://www.openhardware.io/view/767/Wireless-Module-for-Capacitive-Soil-Moisture-Sensor-v20#tabs-design
      https://www.openhardware.io/view/672/Soil-moisture-meter#tabs-instructions

      The second one however, despite it is exactly what I was looking for, does not provide any design files.
      But as I wanted to learn more about electronics in general and also wanted to build my first smd pcb, I build my own capacitive soil moisture sensor based on an ATMEGA328P, NRF24L01+ and a 3V coin cell. The schematic is based on the chirp sensor and I oriented myself with regards to component selection at this project.
      The good news is: It works!
      But I already noticed some flaws (e.g. I forgot to add a FTDI connector besides the AVR ISP 🤦‍♂️ 😆 ) and I could need some help from you:

      The voltage range that comes out of the sensor circuit is very limited. In air the analog pin reads about 570 while reading around 498 submerged in a glas of water.
      I read this post and made my own calculations (I measured my probe to have between 20pF and 460pF). Based on these the voltage swing should be around 2.4V from minimum to maximum capacity. Now the real world is probably not exactly like the calculations but this difference seems a little bit large to me. Anything that I am missing here?
      As additional information: I generate a 1 MHz square wave using the internal clock of the atmega by enabling fast pwm using the following bits:

      TCCR2A = (1 << COM2B1)  // Clear OC2B on compare match
      	| (1 << WGM21)  // pwm mode 7
      	| (1 << WGM20);  // pwm mode 7
      TCCR2B = (1 << WGM22)  // pwm mode 7
      	| (1 << CS20);  // no prescaling
                 
      OCR2A = 7;
      OCR2B = 3;
      

      In the setup function I set pin 3 (connected to OC2B) as output and pin 14 (A0) as input (this is where the sensor output goes in).

      Any help on this would be greatly appreciated.
      As soon as I finish the sensor (when I am no more bothered by the remaining flaws 😁 ) I will make it accessible for everyone.

      Thank you in advance for any advice or guidance.

      Best regards,
      Ron
      Schematic.png
      20200812_104549.jpg
      20200812_104544.jpg

      posted in Hardware
      Ron
      Ron