Ad Widget

Collapse

A hardware ZABBIX Agent made with PIC18F67J60 microcontroller

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rbenea
    Member
    • Apr 2008
    • 35

    #1

    A hardware ZABBIX Agent made with PIC18F67J60 microcontroller

    Hi all,

    I created a stand alone, hardware ZABBIX Agent using a PIC18F67J60 microcontroller. This microcontroller is equipped with an Ethernet port and it has enough processing power to run a ZABBIX Agent Daemon on it.

    You can see a picture of it here: http://www.microelemente.ro/produse-si-servicii/


    The device, with the original software, was ment to be installed on remote locations and ping different IP addresses. In case of network fail (ping timeout) it will issue a reset of the remote equipment. In the end, by changing the firmware, it seems that the device is perfect for a ZABBIX Agent. The code is written in microPascal.

    Right now I'm measuring only one voltage using a ADC and two temperatures using two 1-wire sensors, but the possibilities are endless.

    You can try it using:
    DNS Name: ip-watcher.dyndns.info
    Connect to: DNS Name
    Port: 10050

    Available item using Type: zabbix agent
    agent.ping (int) - returns always 1
    adc[0] (float) - the power line voltage (use multiplier: 0.070978338 to get the voltage in Volts, around 8-9V)
    adc[1] (int) - same as adc[0] (I use it without multiplier to store the actual ADC value)
    tmp[0] (float) - temperature from outside sensor in C
    tmp[1] (float) - temperature from inside sensor in C

    I think that this device is very handy to gather measurements from remote locations. Because of it's low power consumption and the on-board power regulator, works very well with PoE (power over Ethernet) or on battery.

    Please tell me your opinion about this little 'invention'.

    Regards,

    Rares
    Last edited by rbenea; 12-05-2008, 16:45. Reason: More explicit
  • Niels
    Senior Member
    • May 2007
    • 239

    #2
    This is extremely cool!

    I don't fully understand what you say about network fail and reset. The microcode you mention, how is that managed?

    Comment

    • rbenea
      Member
      • Apr 2008
      • 35

      #3
      Dear Niels,

      I'm glad that you are interested in this project. Let me explain what is with the reset function.

      The default function of this module (with the original firmware) is to issue a reset of the equipment (router, switch, AP, server...) when the net goes down (something like a net watchdog). You can configure up to 8 IPs that will be pinged by the device at regular intervals. If net goes down and you'll get consecutive time outs on one of the IPs then the reset procedure will be initiated.




      As you can see in the image you have 8 LEDs. Each LED is assigned to one IP address. If you get timeouts on that IP, the assigned LED will start to blink. The reset part is made with the help of a TRIAC that acts as a power switch, so when you have to reset you cut the power of the equipment and restore it again.

      This device was successfully used together with remote APs made with WRT54GL that would hang from time to time and need to be reseted.

      Talking about remote reset, you gave me a great idea to implement this function in the ZABBIX Agent so that you'll be able to reset from remote or if the connection with the ZABBIX Server is lost.

      If the users are interested in this project I could make a dedicated board/hardware for the ZABBIX Agent and also I could make the code Open Source (made in MikroPascal).

      Regards,

      Rares

      Comment

      • rbenea
        Member
        • Apr 2008
        • 35

        #4
        The first 24 hours

        These are the graphs generated by ZABBIX for the first 24 hours using the hardware ZABBIX Agent made with PIC18F67J60 microcontroller.



        Because the sun is falling on the sensors, you can see around 18:43 if it was cloudy or not.




        This is the power voltage.

        Did somebody else try this?

        Rares

        Comment

        • Niels
          Senior Member
          • May 2007
          • 239

          #5
          Thank you for explaining. It looks like this device could be very handy for many things. I'm especially interested in a temperature sensor.

          Comment

          • bbrendon
            Senior Member
            • Sep 2005
            • 870

            #6
            This is super cool. Maybe we should get some of these to monitor the coke machine?
            Unofficial Zabbix Expert
            Blog, Corporate Site

            Comment

            • nelsonab
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Sep 2006
              • 1233

              #7
              Originally posted by infinity005
              This is super cool. Maybe we should get some of these to monitor the coke machine?
              LOL!! That would be funny to see when the spikes in the delta values are.

              I agree this device is pretty cool, quite tempted to get one myself. :-)
              RHCE, author of zbxapi
              Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
              Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

              Comment

              • rbenea
                Member
                • Apr 2008
                • 35

                #8
                Latest development

                Hi all,

                This is the latest hardware ZABBIX Agent made with PIC18F67J60 microcontroller, Version 1.0



                I presented to Florin from www.microelemente.ro the hardware ZABBIX Agent idea and he was very interested in it and in what ZABBIX can do. Together with him we developed the Version 1.0 of the agent.

                Here is the features list:
                - 4 digital inputs (with pull-up resistors) that can run in 3 modes:
                - digital input 0/1: pin[0-3] will return 0 or 1 based on the input state
                - counter: cnt[0-3] will return the count of falling/rising transitions of the digital input
                - 1-Wire digital temperature sensor: tmp[0-3] will return the temperature in C multiplied by 100
                - 2 ADC converters input that can measure voltage between 0 to 30V: adc[0-1] will return the voltage in V multiplied by 100.

                All the values are integers.

                The settings can be configure from a internal web page.

                This module can be powered from a DC power source with 9-20V.

                Also the module comes with a Ethernet Bootloader. The source code is written in MikroPascal www.mikroe.com and can be changed using the MikroPascal compiler and uploaded with the boot loader. Also to mention, for those who know C, the hardware is compatible with the TCP/IP stack from Microchip.

                The software and the schematics will be made open source. You'll find everything on Florin's www.microelemente.ro web page in the next days.

                I'm waiting for your suggestions and ideas for future versions.

                Regards,

                Rares

                Comment

                • rbenea
                  Member
                  • Apr 2008
                  • 35

                  #9
                  Originally posted by infinity005
                  This is super cool. Maybe we should get some of these to monitor the coke machine?
                  Using the counter function will be very easy to monitor

                  Rares

                  Comment

                  • cstackpole
                    Senior Member
                    Zabbix Certified Specialist
                    • Oct 2006
                    • 225

                    #10
                    This looks really cool. How much will you be selling them for? :P
                    Last edited by cstackpole; 16-05-2008, 16:21. Reason: cant type smilies

                    Comment

                    • RohrbaGe
                      Senior Member
                      • Aug 2005
                      • 167

                      #11
                      Hi,

                      yes this is really interesting stuff.

                      How much will it cost?
                      I think we can monitor temperature on remote sides and also
                      we can power off/on remote systems.

                      Can it be extented to have some more ports?


                      Gerald

                      Comment

                      • rbenea
                        Member
                        • Apr 2008
                        • 35

                        #12
                        How much will it cost?
                        Florin posted the product on his site www.microelemente.ro. The price for the module is 39 Euro + shipping.

                        This is the first version without power switch. Also this is based on the ip-watcher module. He said that if people are interested in this kind of modules he'll create a new board specially made for the zabbix_agent.

                        I think we can monitor temperature on remote sides
                        Yes, the board in itself is very versatile and you can monitor all kind of stuff: temperature, voltage, levels, traffic, coke machine usage

                        we can power off/on remote systems.
                        What do you mean? Do you want the remote reset feature?
                        If yes, Florin told me that the easiest way to do it would be something like this: do a reset if the remote module wasn't interrogated by the server in the last 5 minutes (no agent.ping received in the last 5 min).

                        Can it be extended to have some more ports?
                        Not using this hardware version (PCB Board) and yes in the future versions. What do you need? What kind of sensors/inputs?

                        Rares

                        Comment

                        • wazza
                          Junior Member
                          • Jun 2008
                          • 4

                          #13
                          Hardware agent and sensor base...

                          Hi,

                          This looks really cool. I can see lots of little uses for a device like this.
                          I want / need to be able to measure temperature (preferably at two points)

                          Also I would also like to have two simple open / closed switch sensors, which I'd like to put onto the doors of 19" rack's. That way whenever a rack is opened by someone, we would get an alarm.

                          I have dozens of racks in different data centers around the world, and this would be a very cool addition to each of them.

                          If it supported PoE (Power over Ethernet), that would be an additional benefit.

                          Any more information greatly appreciated.

                          Thanks,

                          Warren

                          Comment

                          • qix
                            Senior Member
                            Zabbix Certified SpecialistZabbix Certified Professional
                            • Oct 2006
                            • 423

                            #14
                            Love this!!!

                            I failed to see one thing though, is the temperature sensor included on the board?

                            How accurate is the temp sensor?

                            We have been looking for a cost efficient temperature monitoring system for a lot of remote sites, if this works well, we like to order a bunch

                            If the temp sensor is included, I already have permission to place an order.
                            Any idea when we can start ordering?
                            With kind regards,

                            Raymond

                            Comment

                            • yo2lio
                              Junior Member
                              • May 2008
                              • 29

                              #15
                              Temperature sensor

                              Hello,

                              No, Temperature sensor is not included in the price.
                              I use DS18B20 sensor from DALLAS , 0.0625 deg C resolution and 0.5 deg C accuracy.

                              Module support (with default software) up to 3 sensors, price for each sensor is 4 USD.

                              Board will be available for sale at the end of JULY !

                              Best regards, Florin Medrea.

                              Comment

                              Working...