Reloading EverythingWidenersInline FabricationMidSouth Shooters Supply
Lee PrecisionRepackboxTitan ReloadingLoad Data
Snyders Jerky RotoMetals2
Page 3 of 7 FirstFirst 1234567 LastLast
Results 41 to 60 of 133

Thread: I need advice with Logic automation programing

  1. #41
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,752
    .45Cole,

    There is no question that in the long run, a fencing system needs to be constructed around the hay storage area.

    The green fields in the summer are more problematic however. For one thing, the amount of fencing needed would be prohibitive. We are in what is effectively a desert and when the grasses etc dry up by early summer, the elk turn their thoughts toward us. It is often that we have 100 head on our fields in early August starting in the evening (daylight still).

    The elk create and use the same breached fence paths summer, fall and winter and I envision PIR and ultra sonic sensors as a early warning system that they are approaching. I give them enough time to get away from those entrances and then give them the business.

    As far as neighbors complaint about noise, not much because they are way farther away than I am. This is not just a pyro based system either and often pyro can not be used as the dry conditions around the perimeter preclude it.

    Where else will the elk go?

    There is lots of other agriculture and beyond that they have a lot of State lands and an entire Reservation to hole up on. The bad thing is that this Reservation is stuck with perhaps 20,000 wild horses they can not control due to slaughter restrictions. Those horses are destroying the environment for the elk. On my side of the ridge the horses rarely go and the grass is way better.

    As far as fencing the hay stacks the kind of fence really matters. I am not going to say your mesh idea has no merit but we do have conventional electric fence and the elk “laugh at it”. Luckily much of the soil conditions are such that I have been given an idea that leads to a very solid and less expensive solution that I will not go into here. This will take time though and in the meantime I need the summertime control and the same equipment relocated will assist us in the winter until we get the hay stack fencing figured out.

    We can get the hay stacks effectively fenced and then the elk may turn to pawing and digging up the dormant hay fields as they have been known to do as well.

    Our hay operation began there in the late ‘60’s and there were no elk bothering. We had a brief stint of 20 head about three different winters in the 80’s. But by the early ‘90’s things started to get worse and by 2000 things were full on.

    The winters of 2015/16 and 16/17 were crushers. We had 300 head and 200 head respectively every night until the snow left.

    There are some reasons for the change. The State of Washington had a legislative cap on the local elk herd of 3000 in the entire basin. That sunsetted in the early ‘80’s

    The Wildlife department over restricted Hunter opportunity and the herd then (by their numbers) grew to 15,000. After a big ruckus they scaled back to a claimed herd of 9,500.

    There is a lot of hockus pockus I figure because I watched an “expert” of theirs “explain” how they came up with their numbers!

    A local rancher challenged their claim that the herd had been scaled back from their first number of 15,000 to the new number of 9,500.

    The expert got laughed at in front of about 250 people!

    I will give that one time to soak in. There is a back story on that one. I will tell it shortly!

    Three44s
    Last edited by Three44s; 11-27-2020 at 11:42 AM.
    Quote Originally Posted by Bret4207

    “There is more to this than dumping lead in a hole.”

  2. #42
    Boolit Master .45Cole's Avatar
    Join Date
    Jun 2008
    Location
    Colorado
    Posts
    616
    Been around those "beautiful" wild horses that nobody wants to see reduced, until the discussion of how they fit in the environment has ran its course. Sounds like you've tried the simple solution and it doesn't work for your complicated problem. NW CO has elk problems (and horse problems too) but the elk are just lazy bums raiding bales as they are easy targets but there are many ranches. Sounds like you can't get compensation, can't hope they go elsewhere, and can't hope the feed pressure subsides (those horses really do well as feral animals out west).
    It sounds like you have some money to spend, I'm an engineer and in college seniors have to do a senior project that's applicable to their field. You sound like you have a great senior project for a team and some funding to actually make the project go. Those electrical engineers can program, make boards and all sorts of fun junk, inc integrating the inputs to outputs with alarms, detectors and all sorts of stuff. They're also broke engineering students so they know how to stretch a dollar. I'd help you but I'm out of my element.

  3. #43
    Boolit Grand Master popper's Avatar
    Join Date
    Jun 2011
    Posts
    10,581
    I looked at some of the example code, lazy ex-microsoft programmers from India. Header (*.H) files are for declaration/definitions,not runnable code. Very sloppy! Runnable code is in *.C files, not *.H files. * means whatever name.
    Processor starts and:
    1) set up realtime clock - used as a base for hardware timers.
    2) set up input/output hardware 'pins'.
    3) set up interrupt(hardware event) handler/priority.
    4) set up a continuous 'loop' of commands (functions) that is the real program.
    Most have a sleep mode that keeps the 'pins' in current state (on/off) and 'wake' on an event, timer or input from pins.

    A 'function' is a bit of code that does something specific. It is the form of
    return value function_name(variable_name);
    Functions return a value that can be used in other functions. Variable_name is the variables used by (passed) to the function.
    Each variable has a name and it's value can be changed. Fixed 'names' are declared so you can read english vs some digital representation. They are in read/write memory and allocated in header (*.H) files. Runnable program is stored in read only memory - the code you download. Hardware (I/O pins, timers, etc.) are named in *.H files. They have special read/write memory called registers. To turn a pin on or off, you write to the register which then automagically sets the pin. Read the register to see if on or off.
    So you have code (read only) variable (read/write) and register (read/write) sections. The processor reads code, manipulates variables/registers or does simple math (add, subtract. mult. div.).
    So, MCU has RAM (variables), ROM ( code ), registers, physical pins, math processor and stack (RAM).
    The stack (like a stack of papers) is used to pass variables. You want to add A+B+C=D so A,B,C are copied (pushed) onto the stack, the math unit pulls them off the stack, operates on them and the sum is pushed on the stack. Your program then pops the answer off the stack.
    Same with register operation, register value is pushed (copied) to the stack, math operates on it and result is pushed to stack. Register value is popped off the stack in to the register.

    The code you write is compiled (usually GCC) - actual values given to the variables you named, english code changed to machine digital code.
    It is then run through a linker that sets the RAM/ROM sections. After linking it is ready to download to the hardware board.

    Hope that helps.
    Whatever!

  4. #44
    Moderator Emeritus

    MaryB's Avatar
    Join Date
    Jun 2013
    Location
    SW Minnesota
    Posts
    10,313
    Quote Originally Posted by popper View Post
    Note: ALL these processors start with the outputs in UNKNOWN condition (on or off). Therefore any pyro controls MUST have power applied AFTER the processor is up and running!! I.E. an ARM manual switch (that RED one). Don't forget to DISARM before processor is turned off.
    Happy Thanksgiving.
    Pull up or pull down resisters and can force a pin high/low on startup.

  5. #45
    Boolit Master



    Join Date
    Sep 2009
    Location
    The Lowcountry
    Posts
    1,120
    Zdfmjvbs,dgnbkajdfhydbvjmb,phlfjdjnxn
    This is all I see when you start writing about coding!
    Good luck with it.
    college students seem to be the best bet, try and to patent it!

  6. #46
    Boolit Grand Master popper's Avatar
    Join Date
    Jun 2011
    Posts
    10,581
    Mary, Atmel uses internal pullups but again, they are enabled in code. External is OK when needed - primarily to provide the power required by the driven device.
    I played with the MicroChip IDE a bit (takes a while to download and install but it's FREE), works pretty good and has a simulator so you can test code without a board connected. Or debug code on the actual board. You can select the board you have and most of the driver code needed is put in the project. Driver is the code to run the MCU hardware. You still have to write application code.
    Whatever!

  7. #47
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,752
    Quote Originally Posted by 45workhorse View Post
    Zdfmjvbs,dgnbkajdfhydbvjmb,phlfjdjnxn
    This is all I see when you start writing about coding!
    Good luck with it.
    college students seem to be the best bet, try and to patent it!
    Thank you!

    I have been trying to reach a suitable educator and have not stirred the right “pot”. We have an excellent Trade School here (Perry Tech) and that’s where I began but they only do industrial stuff (PLC) and that’s out of my price range. They steered me to a High School teacher but he emailed back that it did not suit him and his class, go figure!

    I was sent to another High School and that teacher has a brother who is an electrical engineer for the local power company and who plays a lot with Arduino on a personal basis.

    Before I got busy with him, and other programmer came to light and he is in earnest about the project since he is a good friend with the pyro folks I am acquainted with. The pyro folks are looking at diversifying their retail sales for their product. The COVID-19 shut downs has destroyed their ability to sell fireworks shows. Agriculture is an essential service, we never shut down.

    My ideas for the use of micro controllers run way beyond this elk problem or even other animal problems to ranch security and controlling and monitoring irrigation and even applying crop growing supplements through the water.

    As such, I have decided that win lose or draw, I need to acquaint myself out of pure necessity with setting up circuits and controllers and also coding for them because my needs will outstrip the degree that other folks can help me.

    As such I have been perusing the internet and gleaning what I can from the many free resources out there. As I dig deeper I can ultimately justify spending some money on online tutorials as need be as well.

    I understand how that code looks foreign to a person. A couple of weeks back until I started watching some very good videos I was totally lost. I do not know much, but the “fog” has been lifted a fair amount.

    Best regards
    Last edited by Three44s; 11-27-2020 at 09:09 PM.
    Quote Originally Posted by Bret4207

    “There is more to this than dumping lead in a hole.”

  8. #48
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,752
    popper,

    I will share your examples with the programmer who is going to assist us. I am getting some of your examples and still a quite a bit foggy on other parts.

    Thank you and best regards

    Three44s
    Quote Originally Posted by Bret4207

    “There is more to this than dumping lead in a hole.”

  9. #49
    Banned
    Join Date
    Sep 2018
    Posts
    755
    When y’all get this thing figured out, do us all a favor and debug those damn electronic voting machines, would ya?

  10. #50
    Boolit Master



    Join Date
    Sep 2009
    Location
    The Lowcountry
    Posts
    1,120
    Quote Originally Posted by dangitgriff View Post
    When y’all get this thing figured out, do us all a favor and debug those damn electronic voting machines, would ya?
    Amen brother!^^^^^^^^^^^

  11. #51
    Boolit Buddy Big Tom's Avatar
    Join Date
    Jan 2009
    Location
    Cincinnati, Ohio
    Posts
    420
    Some things to consider before reaching out to a developer:
    - How many devices need to be triggered?
    - Do you want all devices to be triggered when motion sensor goes off?
    - Do you want them to go off all at one, in sequential order or in random order?
    - When in random order, is it o.k. to trigger one device multiple times?
    - Do you need an "active time" per device (e.g. sound generator or lights)?
    - If so, what is the minimum and maximum time you are looking at?
    - If triggers fire in sequential order, do you want a delay in-between, if so how long/random?
    - What is the "time out" between motion triggers where the whole thing "sleeps"?
    - Do you need it to be user configurable or is a fixed sequence sufficient?

    As others have already mentioned, this can easily be developed using a 8 or 16 port relay and an Arduino Mega. Hardware cost is about $50 (maybe $15 more if you want a small status display), it all would work on 5V and the relays can be used for any voltage up to 120V...
    NRA Certified Instructor Pistol
    NRA Certified Instructor Metallic Cartridge Reloading
    NRA Certified Instructor Shotshell Reloading
    NRA Certified Chief Range Safety Officer
    NRA Life member
    www.primercatcher.com

  12. #52
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,752
    Quote Originally Posted by dangitgriff View Post
    When y’all get this thing figured out, do us all a favor and debug those damn electronic voting machines, would ya?
    I think the US Navy needs a leaky ship loaded with the jokers who pulled the illegal voting scam towed to an off shore bombing range. Toss some meat scraps around the area. Hey, sharks need to make a living don’t they?

    Three44s
    Quote Originally Posted by Bret4207

    “There is more to this than dumping lead in a hole.”

  13. #53
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,752
    Big Tom

    Thank you for the response and the PM!

    I pm’ed you back

    Best regards

    Three44s
    Quote Originally Posted by Bret4207

    “There is more to this than dumping lead in a hole.”

  14. #54
    Boolit Grand Master In Remembrance
    Join Date
    Jul 2013
    Location
    The Pacific NorthWet
    Posts
    3,877
    Most of my career's been "Embedded Systems", making custom computerized things that do stuff properly and at the right time.

    Mary B among others have good knowledge here. One concept that may help;

    On coding, .h files are actually a very good idea, they let you set up definitions that can be VERY handy, and let you make the code more usable / reusable / useful.

    For example, a .h file can contain definitions for which pins you are using for which thing, if you then need to change what pin's used for what signal, TRUST ME, it's a lot easier to just change one definition in the .h file than finding every hard coded use of that device pin in your entire block of source code, this helps keep programmers SANE! (OK, marginally saner?)

    Imagine code where you had a definition in each of 10 .c files for the "Fire_Pyro_4" pin to toggle, that pin changes from A.4 to A.5 as it makes a PC board easier, and when you make this change you get 8 of the 10 .c files, but miss 2 of them? That way lies hair being yanked out by handfuls, screaming into pillows, head-butting walls, you get the idea - It's BAD. I've seen too many embedded projects in Process Basic or other non C/C++ languages where this exact problem caused huge horrid issues and near destroyed companies (Not my code as I detest basic LOL)

    On lazy programmers, yep they "outsourced" (for cost reasons, a poor choice IMO) a lot of embedded work to Ireland and India, and now China, and as those coders too often don't have a culture of good work ethic and pride in their work (or years of experience coding things where if you mess up, someone could die or your company fold), the results are SAD. (I'm picky though.)

  15. #55
    Moderator Emeritus

    MaryB's Avatar
    Join Date
    Jun 2013
    Location
    SW Minnesota
    Posts
    10,313
    There is no such thing as a sane programmer LOL they are all wired on caffeine and ready to snap!

    I have had to repair contract programming... I told one company no way to repair, it needs to be scrapped and redone properly with documentation... so they outsourced it again. I got a call form them a year later, "can you fix it?" NOPE you had the chance to have me do it right a year ago when I had the time. I am middle of a big year long project so you are on your own. And they had called a bunch of other programmers before me, they were blacklisted locally, nobody wanted to work for them.

  16. #56
    Banned
    Join Date
    Sep 2018
    Posts
    755

    I need advice with Logic automation programing

    I’m sure there is a financial threshold that intersects your motivation curve somewhere on the chart...
    R/Griff

  17. #57
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,752
    Quote Originally Posted by dangitgriff View Post
    I’m sure there is a financial threshold that intersects your motivation curve somewhere on the chart...
    R/Griff
    Beyond the cost of the equipment the coding would be rather the more expensive portion of the endeavor normally. In this case I was gifted the bulk of the coding necessary to accomplish the task and more and the completing amount is arriving soon.

    It all happened so quickly that it took me by surprise that I have not asked the person behind this generosity if is alright to share their identity here on the forum. When the time comes and if the person responsible is comfortable in my doing so, I will.

    In any case rest assured that as of the past few days I have received the gift of a lifetime out of the blue so to speak from a most generous and skilled programmer. I can not thank this person enough.

    I also thank the several folks here the Boolit forum much that have added to helping me along with our problem, it is much appreciated, some with code.

    I stand in awe of you programmers, we as users of this equipment have little clue how much effort goes into programming, the dedication, training, smarts and sheer HOURS involved in writing extensive code.

    When I received the bulk of this code for my project I was awestruck of the complexity of it. I had spent several hours with online tutorials on a particular web site I have mentioned before (toptechboy.com) and though I thought I could see a glimmer of the light, it turned out to be a reflection from entering “the tunnel” rather than a light at the far end. I am not disparaging the skill of the owner of those tutorials as I still value his efforts and generosity in furthering lay peoples understanding the science and art but I was kidding myself to believe I could cobble something useful very soon.

    As to the economics, it’s there. Imagine a crop that put up well that’s worth north of $200 per ton and 100 head of elk eating it up from late July until it stops growing and then that herd doubling or tripling and returning after significant snow fall to eat and destroy what they missed while it was growing by attacking the hay stacks.

    We have a system if you will where Tribal hunters harvest the elk within their legal parameters, neighbors haze the elk until midnight or there abouts and then the elk still return by 2:30 AM and do just about the same damage anyway. In 2016 we ran like this for seven weeks straight pushing 200 head every single night.

    With the amount of hazing we had to do, I am certain that a remote control system will greatly add to our success which I already have the radio frequency portion successfully tested. The one link in the chain, a logic system remaining is about to enhance that.

    I was using pyro with a fish line trigger and getting results but the lead cows were smart enough to walk the herd around the traps in the dark. You see they discovered that tramped snow, my tracks meant fireworks! I witnessed this from the thermal scope.

    Without question, fencing the stack area is the only logical long term solution but it’s not easy or cheap. We get no help from State Wildlife as it is just inside a Reservation. The tribe is zero help. Only individual members and their hunting and it’s a big assistance.

    In the case of the growing season damage, fencing the whole property is just not economically feasible. Enter virtual fence.

    Best regards

    Three44s
    Last edited by Three44s; 12-02-2020 at 06:11 AM.
    Quote Originally Posted by Bret4207

    “There is more to this than dumping lead in a hole.”

  18. #58
    Moderator Emeritus

    MaryB's Avatar
    Join Date
    Jun 2013
    Location
    SW Minnesota
    Posts
    10,313
    As you read the code and refer back to your website bits and pieces will start to make sense then all of a sudden it all makes sense even if you don't have the skills yet to do it. I taught myself basic on a Tandy TRS80 when they first came out. Wrote a scrolling text program to attract attention to them at the Radio Shack I worked at as store manager(I was 16!). Ended up taking it to the fair that yer and sold a bunch of them to farmers who wanted basic accounting stuff. Won the fairs award for best display in the technology building!

    If you are serious about it buy one of the micros and play with it, plenty of simple tutorials to teach basics like make an LED blink(teaches I/O programming) etc. The Beagle Bone has the advantage of learning to output video to a monitor... it is a fun hobby and I have little micros doing stuff all over the house. Smart thermostat with a fan on/off timer for the furnace(fan is summer use, it moves the window A/C cool air around), another one does some ham radio stuff, and I am working on a low power consumption one to push my weather station data to the internet instead of leaving a PC idling all night long with just the weather program running...

  19. #59
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,752
    You are right MaryB!

    I see so many applications around the farm for micro controllers, it’s incredible!

    I not only have issues with elk, but cougars as well. My wife runs a series of trail cameras so we can pattern the cats comings and goings. But it would be much more useful to have that information real time. We do not pay extra for cameras tied to cellular contracts. Enter micro controllers, micro computers and point to point WiFi! General ranch security is also a plus.

    I need a weather station at my hay fields, particularity for wind conditions. Are my wheel line sprinkler lines about to blow away? Is it safe to fire off the pyro to haze the elk or is it too risky for starting a fire?

    I inject micro nutrients in my irrigation water. Several of the materials are not compatible and I have to stand over the process and clean and switch products through an injection pump. The actual application of the irrigation water along with soil moisture monitoring real time. These are all in play!

    I fully intend to have controllers to play with besides the working units for the elk and I believe that I should not just concentrate on just the Arduino series. I was just looking over the Beagle Bone series on the internet last night and been pondering the Raspberry Pi for a while now.

    I have been studying the code that I have for this elk hazing project in the hopes it will sink in. I go between the definitions and the code.

    The programmer has set up lots of descriptions along the way to school me as well and that is very helpful.

    Best regards

    Three44s
    Quote Originally Posted by Bret4207

    “There is more to this than dumping lead in a hole.”

  20. #60
    Moderator Emeritus

    MaryB's Avatar
    Join Date
    Jun 2013
    Location
    SW Minnesota
    Posts
    10,313
    He didn't do the descriptions for just you. Good programmer document their code. Okay I get spun off to a subroutine... what the heck does this do? The last programmer didn't document it so now I have to waste a couple hours reverse engineering it, following all the variables... when a section of documentation code at the tops say this subroutine counts the defective widgets rejected from the line then lists the variables and which are internal to the subroutine and which ones return to the main program...

    When you come back to some of your own code after a year it is a huge help too! You will not remember why you did something the way you did it... I write my comment code like a story that lists what comes in, what goes on in that block of code, and then describe what goes out...

Page 3 of 7 FirstFirst 1234567 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Abbreviations used in Reloading

BP Bronze Point IMR Improved Military Rifle PTD Pointed
BR Bench Rest M Magnum RN Round Nose
BT Boat Tail PL Power-Lokt SP Soft Point
C Compressed Charge PR Primer SPCL Soft Point "Core-Lokt"
HP Hollow Point PSPCL Pointed Soft Point "Core Lokt" C.O.L. Cartridge Overall Length
PSP Pointed Soft Point Spz Spitzer Point SBT Spitzer Boat Tail
LRN Lead Round Nose LWC Lead Wad Cutter LSWC Lead Semi Wad Cutter
GC Gas Check