WidenersInline FabricationSnyders JerkyTitan Reloading
MidSouth Shooters SupplyLee PrecisionReloading EverythingRotoMetals2
Load Data Repackbox
Page 1 of 7 1234567 LastLast
Results 1 to 20 of 133

Thread: I need advice with Logic automation programing

  1. #1
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782

    I need advice with Logic automation programing

    I have a problem: Too many elk

    Yes I know eat them! Well it ain’t that simple!

    First this is Deeded land on a Reservation. The hunting that occurs is strictly by enrolled Tribal members. I have quite a few qualified hunters but I have more elk than hunters and they eat my alfalfa in the summer and destroy what they missed during the summer by getting at in the winter in the hay stacks.

    Let me be clear, while hunting is an integral part of our survival in fending these elk away it is at best, part of a larger strategy. I am talking numbers of 100 head on the fields during the summer and 200 to as high as 300 head hitting our hay stacks in rather winter.

    Fencing the hay stacks is the only long term sure fire solution but the cost of fencing the fields would be prohibitive.

    We have done hazing to a fault and the elk win under any scenario. Enter technology!

    I have Thermal vision, a grand view of the marauding animals though the distance is from 1200 to 2500 yds. I can now send a radio transmission control to every inch of it via Pyro technics firing controllers and I have access to plenty of good and legal non-lethal ordinance.

    What I need is coding for logic boards to bridge the gap from my 6v DC impulse (pyro firing device) to a series delay timers that branch out to not only the launching of pyrotechnics but ALSO lights, sounds and motion devices.

    Elk are smart and trust me: They get wise fast! You do not deter them with a monotonous droning repetitive series of deterrents.

    As I have been speaking with a lot of folks locally and researching what is available and the respective costs of each component, the two most likely contenders are the logic board series Arduino and the micro computer, Raspberry Pi.

    I see applications for agriculture FAR BEYOND my elk problem but for now what I need is guidance to locate coding as close to my needs and then to modify it to suit my problem.

    The exact operation I need a logic board/micro computer to do is when a low voltage DC impulse is triggered, a logic board relays that signal to a series of delay timers set according to a set sequence. The next time I send that same impulse to the board, it sends an impulse to another series of delay timers. Next time another set of timers get the nod.

    If I could get 7 or 8 different responses in a row before the board resets back to the beginning series of delay timers I would be satisfied. More options would be welcome however.

    Three44s
    Last edited by Three44s; 11-08-2020 at 12:34 PM.
    Quote Originally Posted by Bret4207

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

  2. #2
    Banned
    Join Date
    Sep 2018
    Posts
    755
    Holy moly, you are into this thing up to your eyeballs.
    Consider visiting the nearest technical college and speak with whoever teaches software programming/coding. Ask for some help from the undergrad students. This could potentially be considered a graded lab project by the teacher.
    Good luck,
    —Griff

  3. #3
    Boolit Buddy MrHarmless's Avatar
    Join Date
    Aug 2018
    Location
    Oklahoma
    Posts
    236
    All these things could be programmed out with an Arduino, although you'd probably need to expand the I/O Pins for as many pieces there are in play. I consider the Arduino to be a little more approachable, but essentially you're just looking at learning to trigger pin outs, and code some logic for sequencing and reset, which is actually not too hard. I'm fairly certain pin outs on Arduino are limited to 5 volts, so you may need some relays/bipolar junction transistors to properly trigger pyrotechnics. If you're doing this over a large area, you may need to look into Bluetooth to avoid hard wiring everything.
    MC-130J Driver
    Former T-6A Texan II Driver
    FAIP Mafia
    Hook 'em all

  4. #4
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    Quote Originally Posted by dangitgriff View Post
    Holy moly, you are into this thing up to your eyeballs.
    Consider visiting the nearest technical college and speak with whoever teaches software programming/coding. Ask for some help from the undergrad students. This could potentially be considered a graded lab project by the teacher.
    Good luck,
    —Griff
    Been there tried that. I think like you it is a bang up idea and my County is 9th in the US for gross farm receipts. We have a lot of Ag vs wildlife issues not just counting elk.

    But the interest is there but I have made a direct hit there, still working on it
    Quote Originally Posted by Bret4207

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

  5. #5
    Boolit Man
    Join Date
    Jul 2020
    Location
    Bowling Green Kentucky
    Posts
    91
    Arduino is the easiest. Its outputs only source 20 milliamps or so, so use logic level Mosfet transistors which will go full on with 5 volts.

  6. #6
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    Yes that’s true and I am gearing up with some 6 v lead acid batteries because my RF receivers run off 4 AA bats. They have four indicator LEDs that burn while they are live. I figure 24/7 operation will cause me to have to change those AA’s often.

    The larger rechargeable lead acid hooked to a solar cell will save money and hassle very quickly!.

    Thank you

    Three44s
    Quote Originally Posted by Bret4207

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

  7. #7
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    Quote Originally Posted by MrHarmless View Post
    All these things could be programmed out with an Arduino, although you'd probably need to expand the I/O Pins for as many pieces there are in play. I consider the Arduino to be a little more approachable, but essentially you're just looking at learning to trigger pin outs, and code some logic for sequencing and reset, which is actually not too hard. I'm fairly certain pin outs on Arduino are limited to 5 volts, so you may need some relays/bipolar junction transistors to properly trigger pyrotechnics. If you're doing this over a large area, you may need to look into Bluetooth to avoid hard wiring everything.
    So true!

    Actually I am anticipating relays, delay timers to create the special effects because of many of their power requirements. Also as you elude to, transistors can be an even better substitute to just relays depending on the load.

    Best regards

    Three44s
    Quote Originally Posted by Bret4207

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

  8. #8
    Moderator Emeritus

    MaryB's Avatar
    Join Date
    Jun 2013
    Location
    SW Minnesota
    Posts
    10,350
    Raspberry Pi is the better choice, more outputs... it could be done without a micro controller using a counter that counts to 8 and resets, and use time delay relays on each output... or use a 555 timer circuit to drive each relay(probably the cheaper option).

    Advantage of the Pi is a random number generator to vary what triggers every time it sees a trigger event. So it would be totally random as to what deterrent(s) go off each time. That way the elk will not see a pattern...

  9. #9
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    Quote Originally Posted by MaryB View Post
    Raspberry Pi is the better choice, more outputs... it could be done without a micro controller using a counter that counts to 8 and resets, and use time delay relays on each output... or use a 555 timer circuit to drive each relay(probably the cheaper option).

    Advantage of the Pi is a random number generator to vary what triggers every time it sees a trigger event. So it would be totally random as to what deterrent(s) go off each time. That way the elk will not see a pattern...
    MaryB,

    What I am envisioning right now is an Arduino or a Raspberry Pi tied to Arduinos or a series of on and off delay timers to control the various deterrents.

    The logic controller or a micro computer needs to sequentially select a different series of timers each time I send a signal. I would prefer seven or eight different sets of timers before the controller loops back to the first selection.

    I have built delay timers and other simple circuits on perf board before (the 555 is high on my list) so the act of building my own stuff is no problem and I see the easiest way to orchestrate each scene (a combination of noises, pyrotechnics and lights) in the near term is with a bank of timers. Certainly shifting the task from simple delay timers towards using logic to create more variability in the deterrence operation.

    There has been a new development in this endeavor that occurred right after I started this thread yesterday. My Pyro guy called with a friend of his who is a programmer with experience setting up fruit sorting and packing lines. He is willing and eager to help us get this thing off the ground. He has extensive experience with Raspberry Pi but is also getting acquainted with Arduino as well.

    He tells me that both systems have merit with our project and can be set up to work together and that they complement each other.

    Even though I have someone quite promising who is helping us at this point, I would appreciate any and all comments and suggestions, so keep them coming!

    Thank you and best regards

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

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

  10. #10
    Boolit Grand Master popper's Avatar
    Join Date
    Jun 2011
    Posts
    10,597
    I'm assuming you have a radio link to a remote processor(s) that trigger the squibs. Adrurino or PI would work but you don't really need much of a processor. PIC is another one. The coding is easy in C. Random number generator & timers are simple to code and probably already done on some of the blog boards. Think about the real problem, reloading the pyro. SIL had deer eating trees and roses in her yard, not much of anything to drive them away.
    Whatever!

  11. #11
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    popper,

    Yes, as I stated in the post opening the thread, I have two radio frequency pyrotechnics remote control systems. One borrowed that can support up to 1200 cues and my owned one that supports 12 cues.

    As soon as the COVID-19 restrictions substantially ease, the loaned unit has to go home.

    My owned unit (12 channels) will remain and that is what I am planning for a logic circuit to control.

    Both units have identical receiver units with four output channels each.

    Thank you and best regards

    Three44s
    Last edited by Three44s; 11-09-2020 at 10:56 PM.
    Quote Originally Posted by Bret4207

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

  12. #12
    Banned
    Join Date
    Sep 2018
    Posts
    755
    Can you please post the make/model of your control unit, or better yet, the spec sheet for it? It would be tremendously helpful. —Griff

  13. #13
    Moderator Emeritus

    MaryB's Avatar
    Join Date
    Jun 2013
    Location
    SW Minnesota
    Posts
    10,350
    Easy enough to do multiple random number generators on the Pi. Could setup multiple channels with multiple random outputs on each... just a lot of loop coding...

  14. #14
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    Quote Originally Posted by MaryB View Post
    Easy enough to do multiple random number generators on the Pi. Could setup multiple channels with multiple random outputs on each... just a lot of loop coding...
    The programmer who has just stepped into this has a lot of experience with Raspberry Pi. The company he works for has been involved with automating a very large fruit sorting and packing installation. He told me involved Raspberry Pi from one end to the other, that shocked me.

    But he seems to be leaning towards Arduino in this first phase. We just are not too complicated yet. Myself, I do not care what it is, just that it works.

    I have no doubt that Raspberry Pi will be on this ranch before long, but I see an integrated package of Arduino/Raspberry Pi or some other recombination at that point because there are other “fish” out there.

    Best regards

    Three44s
    Quote Originally Posted by Bret4207

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

  15. #15
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    Quote Originally Posted by dangitgriff View Post
    Can you please post the make/model of your control unit, or better yet, the spec sheet for it? It would be tremendously helpful. —Griff
    Griff,

    Here is what I can tell you at this point:

    Changsha Aixuan Electronic Equipment Factory

    Web site: www.bilusocn.com

    Email: bilusocn@163.com

    It operates in the 433 MHz

    There are no markings on the receiver other than “Bilusocn” and the words “magic effect”

    I can add that I had a VOM hooked to it to see what voltage was running and while the receiver is live but waiting there is a lower dc voltage read. I was told that is likely because the unit tests for continuity on the fireworks hooked to it. The voltage was as high as 4v in an open circuit but often lower. Firing was read at a bit over 6 v DC when patched into a 6v scalded lead acid battery.

    So I suppose there will need to be a threshold keep the continuity check feature from tripping the logic board inadvertently.

    https://m.bilusocn.com/Shipping-From...y-p825729.html

    This the one I own, in spite of the 150 m range quoted we have reliably fired off at 100 yds past one mile in a condition I refer to a “super line of sight”

    https://m.bilusocn.com/Shipping-From...t-p825784.html

    This is the unit loaned to me and we tested it successfully at 2300 yds!

    I hope that helps

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

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

  16. #16
    Boolit Buddy
    Join Date
    Jul 2018
    Location
    South Alabama
    Posts
    296
    A quick look and I don't see any remote control ports on your transmitter. Too bad, a serial port would make it a very simple task. Another option would be to crack open the case and tack wires to the switches, then connect those switches to a relays driven by an Arduino or other single board computer (SBC). Firing a relay would be the same as a button press on your fireworks controller. The SBC can then implement all the random timers and fire the relays to simulate the button presses on the controller.

    There are stackable 8 relay cards for the Raspberry Pi (R-Pi). You can stack up to 8 of them on a R-Pi for up to 64 relays possible. It would make a really compact, neat package. From there it would be a matter of writing the code to fire the relays in a manner that simulates running the controller with the buttons. The problem is that the relays use up all of the I/O pins on the R-Pi and you're stuck looking for another device to monitor your input lines and communicate with the R-Pi to to get things going. Unfortunately the R-Pi has plenty of horsepower but limited I/O pins.

    The Arduino, perhaps a MEGA2560 would give you more than enough I/O pins to control all the relays you would ever need. It would also still have lots of I/O pins left to sense the triggers you want to monitor. The horsepower of the MEGA is limited, but would be more than adequate. The best part of the Arduino is that just about anyone can program them. I've done a number of projects in minimal time and I'm not a programmer. The down side is that they don't have stackable relay cards (they call them shields) for the MEGA. the cards that are available would need to be wired to the Mega and mounted in some sort of enclosure. I have found that the physical mounting is the hardest part of an Arduino or R-Pi project. There is a 16-relay card available that would work with most SBC's, Amazon part 'B0057OC66U', and you can use more than one of needed.

    Since you have an experienced programmer you may want to consider the BeagleBone SBC. It's got all the horsepower of the R-Pi and a lot of I/O pins. It's a Linux-based device that allows you to use the programming language of your choice (C++, Python, etc). It's the best of both worlds but costs maybe $50 more. It could even be set up to host a web page for you to arm, disarm, and control the system with just a little more programming. Once you're into the magic code behind the project there is almost no limit to what you can build into it.

    I wish you luck, it looks like a fun project.

  17. #17
    Boolit Grand Master popper's Avatar
    Join Date
    Jun 2011
    Posts
    10,597
    44 if I understand you correctly, you have the radio remote link that triggers the multi channel (12) squib firing device. You want something between the RF receiver and the squib control so you can do a round-robin type sequence? Not hard to do with micro but then you need lots of squib firing devices.
    If you want a (single) squib firing device to trigger ranks of squibs, that is tricky. Seems like most of the triggers use a current limited low voltage to verify squib wiring for 'test mode'. A single firing unit could be 'expanded' by using binary code to an expander but then if relays used, no test mode. Relay aren't cheap so transistors (FET) should be used - they do have a drawback as common neutral is needed.
    Bank select from the RF link is easy with a counter/comparator, each 'count' word triggers a separate bank.
    SIL lived next to the plantation east of Memphis, even a pellet shot in the flank didn't deter the deer. Elk seem to be the same. They stay where there is food. There is a semi-permanent herd on the golf course in Estes Park.
    Whatever!

  18. #18
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    BamaNapper,

    I need to clarify here.

    The receivers have four outputs each tied the transmitter. When you push say button one, the output number one on the receiver goes to battery voltage, 6v DC, momentarily. As I see it you control a relay that signals a logic board and code written that causes what I call scene “A” to occur. The scene could be caused by a series of on and off delay timers adjusted to cause a span of deterrents operating in an orchestrated sequence consisting of pyrotechnics, recorded chases from previous engagements, lights and whatever else can be thought of and added.

    You push button #1 on the transmitter again and I want the logic board to advance to scene”B”. A different set of timers with different formatting go to work. Push button #1 a third time and scene “C” takes place and so on ......

    I would like to have 7 or 8 different scenes to run through. We could go with another layer of logic boards to replace the several delay timers involved. We could go up scale like Raspberry PI and have a micro computer scramble the sequences ..... But if I had some set scenes to start with I think I could get in those lead elk cow’s heads and send them packing long enough to give us time to get more sophisticated if necessary.

    Thank you and best regards
    Quote Originally Posted by Bret4207

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

  19. #19
    Boolit Master
    Join Date
    Feb 2007
    Location
    Communism running rampant!
    Posts
    4,782
    popper,

    I guess I could refer to the event I want to cause as a scene like a segment of a play.

    You have got the round robin idea down I believe. Some scenes would entail pyro and some not. Besides Pyro, each scene would require sound and lights integrated into it. The reason that pyro would have to be omitted some times is due to fire danger in certain circumstances. Recorded gun fire might substitute if not relied too much then.

    From each output pin I would have either a series of delay timers to lay out a particular scene which operate the various electrical powered items or in a more sophisticated system, logic boards.

    The same sound generator and set of lights can be operated by more than one relay thus any number of relays could access those items since they are not perishable where as pyro is a one off tool. Other mortar and rocket tubes would be required, filled and powered through the relays tied to later scenes.

    You are correct, elk are stubborn. We have tribal hunters that extract a toll. The elk are not fazed that much and return that same afternoon/evening. We then haze them away. During the chase we stop and fire rockets. They boogie then! The chasers have to sleep sometime, usually giving up by midnight. The elk find their way back by around 2:30 AM to the hay stacks.

    I assist from my vantage point with a thermal viewer. The thermal advantage along with a remote control system like we are discussing here would be a big improvement and addition to our current technique.

    Thank you and best regards

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

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

  20. #20
    Boolit Buddy
    Join Date
    Jul 2018
    Location
    South Alabama
    Posts
    296
    I think I see what you're looking for. Control is between the receiver and the 'shows'.

    I would still go with an Arduino at the receivers, coupled with however many relay outputs you might need. Relays are added 8 at a time.

    Click image for larger version. 

Name:	Cropped1.jpg 
Views:	30 
Size:	35.2 KB 
ID:	271356

    This would use the analog inputs of the Arduino to monitor the outputs of the receiver. Using the analogs will allow you to ignore any noise that might show up. The resistor values shown would be changed to work at testing. The important part is to use the voltage divider to cut the voltage in half so that the 6V coming from the receiver trigger is seen by the Arduino as a 3V signal to keep from blowing up the analog inputs. I show 1K, but would probably test using all 10K to start.

    The relay outputs can be wired in any manner you'd like. They could pass the 6VDC as shown for your pyrotechnics, or simply use the common and normally open contacts to turn on lights, trigger horns, or open a garage door. Dry relay contacts are the simplest control method in my opinion when you have a variety of things to control.

    A version of the Arduino MEGA 2560 is available with a micro SD card, or use the standard card with a shield that has an SD card. The MEGA provides far more I/O than needed. The SD card is handy to allow you to change your programming of the scenes without reprogramming the Arduino. Simple text files stored on the SD card could be read by the Arduino code. Perhaps a file for each trigger from the receiver. A file would contain a list of relays to fire, a delay time in seconds for each relay, and maybe another for how long to keep the relay energized. The list and delays could be a single line in the file. Add as many lines to the file as you want to match the number of scenarios you want to use for a specific trigger. The code can simply step through one line at a time with subsequent triggers, and go back to the top at the end of the file. Maybe that makes sense.

    example line in a file (maybe a file named 'trigger1.txt'): 1/3/2/5 ; 1/7/10/2 ; 1/2/20/15 ; etc.;etc.;etc.;
    (relay card 1, relay 3, delay 2 secs before firing, hold relay for 5 secs. Then card 1 relay 7 fires 10 secs later and is held for 2 secs. Then card 1 relay 2...)
    That line could go on for as many relays as you want to put in the show for this trigger.
    The second line in the file would have different relays and delays and be used the next time trigger 1 is received.

    The Arduino code at each receiver would be identical, only the files on the SD cards would be different. When you want to change your scenarios, simply put in an SD cad with new files. I still say this looks like a fun project. I spent 15 yrs designing GUIs and writing control system software (obviously not Arduino-based) for boardrooms, classrooms and commercial venues. But I never did anything that would have been even close to your project in terms of fun.

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