Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Tinkering; Like Guntering for the Connected Generation.

17810121315

Comments

  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    Handy having your own scales alright. I presume you are still manually entering the weights from the scales to the sheets?

    Has the clock a serial port on it? (could be internal as in needing to remove cover to access, but should be in the manual)

    I put a cattle scales together after joining the BEEP scheme. Was considering utilizing the the serial port on scales to automatically read the weight into an excel sheet and now with compulsory EID tags adding an EID tag reader would completely automate recording.



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    I've started using farmOS as a farm management package.

    I've set it up on a Raspberry Pi, Not a straight forward install as it wasn't packaged up for the ARM processor that Raspberry Pi uses.

    I've managed to get my Water level Sensors working with it too.

    Getting weights from a scales either directly into the package or transferred by CSV file would be a nice addition.



  • Registered Users, Registered Users 2 Posts: 4,264 ✭✭✭Kevhog1988


    Id like to get to that eventually but just manually inputting for now. once i type in the weight i have formulas set up for everything else.



  • Registered Users, Registered Users 2 Posts: 1,003 ✭✭✭timple23


    This is probably more of a guntering question, but I'm trialling something and I don't want to go ripping and stripping wires before I test it. I'm wondering if it would be ok to use a 4 core wire on a d type 3 pin plug, normally you'd have a two core wire with one wire power and one ground, what I want to know is can I use two wires as power and two wires as ground, so I'll have one ground and power going into the cab from the plug and the second live and power going to machine, hope it makes sense.



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    Not sure where the fourth core comes in, it that scenario. Is it just 2 going from earth pin to chassis ground?


    The correct config for those plugs is one earth, one permeant live and one ignition switch aux live. But in practice the vast majority are 1 permanent live and earth. You can have 2 lives with one earth without issue, but it is the load that needs consideration as long as you don't overload the pins or the wiring you won't have a problem. There can be different amp ratings between manufacturers and the amp rating of the small pin will be about half of the larger one.

    If there was a question in there about the amp rating of the earth line, the current on the earth pin will be the sum of the 2 live pins, doubling up with the earth wire will increase the current rating but just using a gauge wire suitable to the application is probably the best in practice. Basically make sure you are not overloading any of the pins or wires to avoid a fire.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    You have given me an idea, possibly for a new thread/project.

    Do you or anyone else think there may be any interest in compiling a list of formulas/macros or complete templates for farming spread sheets? We could start a github repo so that they will be searchable? could be divided into categories like Livestock, crops, accounts etc?

    @patsy_mccabe did you mention similar work with excel sheets previously?



  • Registered Users, Registered Users 2 Posts: 3,026 ✭✭✭Lime Tree Farm


    MS Access wouldn't need programming - would be more useful for filtering. I have individual xls spreadsheets for suppliers thst show different categories of product from the same supplier eg Fert. Feedstuffs. Drenches. etc.

    I think Summarising all the categories at year end from the various suppliers could be done more easily in Access. Though I never seem to getting around to doing it

    Anyone using MS Access ?



  • Registered Users, Registered Users 2 Posts: 11,390 ✭✭✭✭patsy_mccabe


    What I did was basically an automated way of reading data from websites and downloading it to an Excel spreadsheet. It worked fine till the websites changed their format.😀



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    The farmOS software I referred to earlier stores all data to an SQL database.

    A database is definitely the way to go but spread sheets can be use full too, information can always be parsed from a sheet to a database also.

    Are you using MS Access yourself?



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    Web scraping, yea some sites actively do their best to stop it.


    What sites were you scraping? Was thinking of writing a program to parse DAFM CSV export files to my farmOS setup.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,026 ✭✭✭Lime Tree Farm


    In my working life I wrote/manipulated macros and used Access but that know how has vanished through lack if use. I have opened xls workbook in Access but never took it further.



  • Registered Users, Registered Users 2 Posts: 11,390 ✭✭✭✭patsy_mccabe


    I was opening the data from ICBF for all my pedigrees here and matching the cows with different sires in AI to see what the figures of their offspring would be like for figures, star ratings etc.

    I used Selenium Basic and Google Chrome. A serious of videos here showing how to do it. A lot of work in it. I'm hoping the Irish Lim Society will make some improvements to their database before I go repairing what I've done.




  • Registered Users, Registered Users 2 Posts: 3,026 ✭✭✭Lime Tree Farm


    You will have to work around the login selective pin - unlike the ICBF which is static . Maybe login in first and then run the code.

    There is a facility in xls Macros where you can record your keystrokes and tweak the macro afterwards to fit your requirements.

    One of the days that I had time to spare I downloaded every bit of historic herd info from DAFM (20 years available). xls format. I don't know if it included purchased stock eg weanlings



  • Registered Users, Registered Users 2 Posts: 12,555 ✭✭✭✭AckwelFoley


    Nothing out of the norm .


    Farm has about 20 cameras, 15 WiFi switches to power lights so they can be remotely controlled or linked to other commands...I have motion sensor at some of the more expensive equipment and 2 on the entrance avenue. . So I know when someone is on the the avenue and what direction they're going..ie in or out.. if after dusk the sensors in avenue are triggered and the one at the machinery within 20 mins of each other it sets off an alarm at 2 houses, mine and the fathers which then triggers the armed response units..



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    I have no intention of taking that approach, as Patsy pointed out web scraping is too prone to breaking due to format changes and security measures actively taken by sites to block it. Just simply a program to process the exportable CSV files from DAFM, could possibly be done with Excel and macros alone at least in the early stages but it may be developed further and possibly become a custom module for with farmOS later.

    So basically initially read my herd profile from the exported DAFM CSV file and compare to one exported from farmOS and reformat and parse only the changes to be reimported into farmOS as births and purchases, and create a to do list of animals to be marked as on farm deaths and sales.

    I have direct access to the SQL database of my farmOS instance so much of the processing there can be eventually completely automated on that side.



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    Sounds good,

    Linked commands = Automation server? HA? or something else?



  • Registered Users, Registered Users 2 Posts: 11,390 ✭✭✭✭patsy_mccabe


    The reason I automated it was, ICBF update the data every 3 months. There are 28 figures for each animal, each figure has a percentile ranking and % reliability both across and within breed. So that's a total of 224 values for each animal. By automating with a Visual Basic macro all of these values get downloaded to Excel in a few minutes. It's mad to see the webpages continuously opening and closing.



  • Registered Users, Registered Users 2 Posts: 4,264 ✭✭✭Kevhog1988


    Can put up mine if anyone needs them or can build others if anyone has a good idea. Lad i work with is an absolute genius on excel and ive been picking up a lot off him.



  • Registered Users, Registered Users 2 Posts: 11,499 ✭✭✭✭wrangler


    We've a prattley scales here, a great job, it reads records and give the ADG while the lamb's in the scales, I had to agree to buy it years ago to get a new jeep over the line here. Because lambs aren't handled in the scales they just run in and out of it on their own, even fighting to get into it,



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    image.png

    I made up an Electric Fence monitor and was testing it this evening. It is actually just to read the flash on an electric fence signal light, so I've been testing it with Christmas tree lights 🎄. I should have a few ready for when cattle go back out in spring, probably needs some tweaks to sampling time to conserve battery life and Data usage.

    .



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    IMG_20211117_103959.jpg IMG_20211117_103939.jpg

    I added a touch screen in the Kitchen, with access to Home Assistant to monitor the House and Farm.



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    IMG_20211214_120940.jpg IMG_20211214_105401.jpg IMG_20211214_101739.jpg IMG_20211214_101651.jpg

    Electric Fence Monitor ready for some field testing.



  • Registered Users, Registered Users 2 Posts: 487 ✭✭pms7


    What kind of motion sensors do you use? Any issue with false alarms?



  • Registered Users, Registered Users 2 Posts: 12,555 ✭✭✭✭AckwelFoley


    I use a WiFi sensor. They are technically an indoor sensor but I mount them in an outdoor junction box leaving only the sensor dome exposed.


    The dome is then covered by a piece of 40mm wavin waste pipe cut at 25mm len which narrows the field of detection.

    As for false alarms, they are rare as I always install them in pairs in the avenues where I have them. So, both sensors need to be activated within 30 seconds inorder to trigger an event, ie, notify me or complete a command. In one avenue, the sensor is about 10m from the first, in the other, its about 20m and actually working off a different wifi network.


    I use a pretty basic smart app based on the Tuya system called Smart Home so all sensors and plugs are ran off that


    False alarms are always going to be an issue, but, I never have a sensor installed where it can't be seen by a camera so if i have an activation, I can have a quick look. Takes a bit of tinkering to get best position and angles


    Cat or dog will set it off, but birds and wind won't because of the pairs


    Sensors works of live power via a USB and plug into the box, or mostly a pair of batteries

    One sensors is mounted into a box with a camera and light mounted onto the front so i have a camera a light and a sensor. This is in the machinery shed

    20210523_212932.jpg 20210523_223324.jpg 20210428_225441.jpg 20210428_215922.jpg 20210403_175243.jpg


    Post edited by AckwelFoley on


  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    I like the Wavin pipe mod, simple but effective. Did you consider beam breaks? or just nothing available for Tuya eco system?



  • Registered Users, Registered Users 2 Posts: 12,555 ✭✭✭✭AckwelFoley


    Yes. I would have preferred something like a beam breakers but couldn't find anything that was available



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    The reason why I started using Home Assistant is its ability to mix devices from different IOT eco systems which gives far more choice , also in the case of Tuya with some third part integrations its possible to control the devices locally so they still work if the cloud servers or your internet connection go down.

    I've been using some image processing from my Hikvision DVR to send alerts to Home Assistant, but I'm using fairly basic cameras and it only supports smart detection on one camera and basic area detection on the others. I've the smart detection setup for the front gate and it rarely has false alarms, but the area detection on other cameras can be triggered by leaves on a windy day. I'm considering using Frigate with a dedicated processor for proper person and object detection.

    Having said that, sometimes you just can't beat simple, I have a few spare PIR's lying around so might give your idea to narrow the field ago.



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    Well that doesn't work very well. Flash from signal light is not prolonged enough to register reliably. Not sure if a better photo diode or a different signal light might improve it.


    Plan B

    I disassembled a cheap voltage divider type fence tester and put a volt meter on it Across the resistors.

    image.png image.png

    Sample Rate for the cheap meter is too slow to capture every pulse of the fence, but it is a measurable voltage.

    Think I'll need to go with a custom built circuit with a Voltage divider to reduce voltage to millivolts and an Op-amp to make safely readable by the Arduino.



  • Registered Users, Registered Users 2 Posts: 6,484 ✭✭✭emaherx


    plan B went up in smoke, due to under rated Resistors 🔥 😧

    Plans A and B will be revisited later but here is Plan C. I was avoiding this one as I thought it might not be accurate enough but initial tests are promising.



    A non contact EMF sensor, surprisingly easy to make with just a resistor and a short length of wire.

    image.png

    Sensitivity could probably do with some adjustment, but its just a matter of using different resistor values.

    image.png

    Adafruit lora32u4, Has built in LoRa Module and a LiPo battery socket with USB input and battery charging circuit, I'm hoping it will be a simple job to add a small Solar panel like the micro USB ones for Cameras like Reolink use.

    #define MY_DEBUG
    #define MY_RADIO_RFM95
    #define MY_DEBUG_VERBOSE_RFM95
    #define MY_RFM95_RST_PIN 4
    #define MY_RFM95_CS_PIN 8
    #define MY_RFM95_IRQ_PIN 7
    #define MY_RFM95_IRQ_NUM digitalPinToInterrupt(7)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
    #define MY_RFM95_FREQUENCY (RFM95_868MHZ)
    
    
    #define MY_NODE_ID 84
    
    
    #include <MySensors.h>
    #include <Arduino.h>
    
    
    
    
    uint32_t SLEEP_TIME = 30000; // Sleep time between reports (in milliseconds)
    
    
    #define CHILD_ID_LIGHT 0
    #define LIGHT_SENSOR_ANALOG_PIN 0
    
    
    MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
    
    // EMF
    
    
    int aVal=0;
    int VL=0;
    
    
    
    
    
    
    
    
    void presentation()
    {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("EMF Sensor", "1.0");
    
    
        // Register all sensors to gateway (they will be created as child devices)
        present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
    }
    
    
    void loop()
    {
        aVal=analogRead(LIGHT_SENSOR_ANALOG_PIN);
       // if (aVal > 1 ) {
            VL=map(aVal,1,100,1,255);
            Serial.println(VL);
            send(msg.set(VL));
      //  } 
    
    
        
    
    
        // Sleep until interrupt comes in on motion sensor. Send update every two minute.
       //sleep(SLEEP_TIME);
    }
    
    

    Initial Arduino Sketch for testing. It is setup a a light sensor, as Home Assistant and MySensors don't have an EMF option.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 832 ✭✭✭satstheway


    Would it be possible to use the electronics of a robotic house vacuum cleaner to operate a homemade slat cleaner. Using either the random function or with the more expensive mapped type?



Advertisement