Jump to content

jonthompson

Members
  • Content Count

    22
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About jonthompson

  • Rank
    Probie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. jonthompson

    Arduino Controller for Automatic gates

    Power/gnd should be self explanatory but one of the RX wires -> D2 (INT0 --There are 2 interrupt pins on the arduino, D2=INT0 and D3=INT1.) Sorry i haven't addressed the surfband in the docs yet. It will only switch sides when "speedlimit" is valid -- and it resets once speedlimit is no longer valid (this is intentional since there is a physical switch at the helm, i didnt want it to be confusing.) I havent verified if multiple of those bands have the same transmitting ID - i assume they do - but if it doesnt work let me know and I'll send you some simple testing code to capture the output from your band so update the source until I get a chance to write a capture-code part.
  2. jonthompson

    Arduino Controller for Automatic gates

    Perfect - then yes - it is basically identical. Just wire it the same as the L298N.. You don't need speed control (normally done with the PWM pins) but you will need to drive the PWM pins high most likely - so you'll need 2 additional wires (the ENA/PWM bridging wont work on that one i dont think.) That said - Is there a reason you're using it? I might pick up a $1 L298N vs a $50 motor board I would still plan to use automotive relays with it instead of driving the lencos directly from that board (although it says it can drive 12A, there's really no need to have it do all that work and run all that larger gauge wiring.)
  3. jonthompson

    Arduino Controller for Automatic gates

    If you end up grabbing my code (which I am actually updating right now moving a pin around to work better with the surf band) the code will work exactly the same on your board as the nano and mega share the same pin configs - the mega just adds a ton more (which is great!) The only thing i would change is i'd use one of the mega's dedicated RX/TX for GPS instead of the pins I'm using (8/9.) This should just work out of box with my code - no changes required (GPSPort handles that magically for you.) Your motor driver looks a little confusing but your pin outs are actually the same as the L298N. You likely just bridge M1ENA -> M1PWM and M2ENA->P2PWM (we have jumpers for this.) I didn't check the specs but if you have a 5V regulator onboard that cant handle >12V make sure you disable that (The L298N does, its a jumper.) Just double check the sheet for how to correctly wire to make sure i'm not missing anything as Im not familiar with that board. Otherwise you just wire the INA/INB the same way as the L298N - you have M1INA, M1INB, M2INA, M2INB instead of IN1, IN2, IN3, IN4 on the L298N - but its the same just different names.
  4. jonthompson

    Arduino Controller for Automatic gates

    Just a heads up - I added a simple cheap DIY surf band to my controller over the weekend and just checked in the code to my github The added parts are under $20: This waterproof SOS band (cheap, waterproof, sealed battery, somewhat lame looking but easier than building one.) https://www.amazon.com/gp/product/B01BQYTM6Q/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1 and Using the receiver like this: https://www.amazon.com/Transmitter-Receiver-Regeneration-Wireless-Burglar/dp/B01AL5Q7SC (Can also get a 5 pack for about the same price without the antennas and just add your own wiring.) Logic is - pressing button while surfing overrides the current deploy state until the boat slows below the speed limit - then it returns to whatever you have the switch set to. This is great for transfers controlled by surfer -- and then not confusing for the driver when restarting.
  5. jonthompson

    Arduino Controller for Automatic gates

    Happy to help -- not to hijack jhartts thread - do you want to drop this to PM? Or you can facebook chat me -- just we dont clutter up this thread further! - https://www.facebook.com/jon.thompson1 -- can post back the final response once we troubleshoot it.
  6. jonthompson

    Arduino Controller for Automatic gates

    Do you have the ability to hook up a laptop to the controller to get serial printouts while you are testing? Kind of a pain - but it'd be much easier to debug this issue. Are you using jhartt3's code or mine on github? Mine prints stats out every second to serial - if you point me at the code you're using i can add some debug logic to it for you to see if we can track down the issue.
  7. jonthompson

    Arduino Controller for Automatic gates

    Yup! A single pair of the same gauge wire for both +12 and GND - so a 25A-30A line under-30ft should be 10AWG - as per the power table i shared above.
  8. jonthompson

    Arduino Controller for Automatic gates

    Wire the 12V/GND on the motor controller to the 12v BEFORE the 12-9V regulator (but make sure both are on switched power that is not always on, do not run directly to battery.) Treat it as 2 independent power systems: 1) Ardiuno controller (GPS, motor shield, etc - low draw, use whatever you want) - everything here shares a common ground. 2) Acutator relays (High amp draw, make sure power/gnd are same gauge.) This is a dedicated power/ground from the battery of an acceptable gauge. You are dealing with 4 different voltages on the arduino - so that makes it confusing, 12v source (regulator, motor driver), 9v (arduino output from regulator), 5v (motor controller and anything on the 5v arduino regulator) and 3.3V (gps, switch, etc). The wiring diagram on my project might help - i am using the LM2596 in place of the 12-9V but it is doing the same thing -https://github.com/jonthompson/surfactuator
  9. jonthompson

    Arduino Controller for Automatic gates

    If you are using the L298N you need to remove this jumper: cdn3.bigcommerce.com/s-vt19phz/product_images/uploaded_images/l298n-dual-2a-motor-driver-module-tronixlabs-australia-pinout.jpg?t=1416543556 You also need to run 5V to the L298N from the 5V pin on the arduino - he mentioned this above - everything can be small gauge wire as you're not dealing with high draws with the arduino stuff - that is the point of the relays, they isolate the high amperage actuators and just operate like a light switch between them and the battery.) (Tech detail on why: this jumper controls the onboard regulator which converts 12V or less power to a regulated 5V output on the 5V screw. This is super handy if you're dealing with <12V because you can power your arduino with this 5V output efficiently. That said, boats run at 14V+ when running and >12V will fry the regulator killing the motor board - and potentially your arduino and other accessories..)
  10. jonthompson

    Arduino Controller for Automatic gates

    Incase you're curious this is what it looks like in a 4x4x2 box - it's tight - but it fits well. I'm no longer doing aviation connectors as they are a huge pain to solder - i'm just doing RJ45 from here on out, easy to replace if there's an issue and it doesnt need to be water tight under the dash. This has the latest code on it and i'm tossing it in my friends boat Friday morning to confirm it all works well.
  11. jonthompson

    Arduino Controller for Automatic gates

    Just to clarify, the only wire you need at 10-12AWG is a single run from your battery to the relays for the actuators. You can size that wire up to 25-30a from that chart above to cover both actuators safely - put appropriate sized fuses for the wiring. Dont way overdo it on the fuses - you want them to blow if there's an issue Everything else can be 18ga as they are low draw. The arduino/motor controller/gps/etc draws<300ma. You can wire that into something else under your dash that has power - and then run 2 pairs of 18ga wire back to the relays to control them. The code I have posted on github currently works great with just a switch (the uno version is the latest.) I'll upload the rotary encoder changes (optional) once i get to test on the water. I've also found the cheapest enclosure for everything are standard junction boxes -- if you use a nano - you can fit everything in a 4x4x2 (tightly) - otherwise size up to a 6x6x4 for more space.
  12. jonthompson

    Arduino Controller for Automatic gates

    Sorry - that doesnt seem to work - use this for your wiring needs - assets.bluesea.com/files/resources/newsletter/images/DC_wire_selection_chartlg.jpg
  13. jonthompson

    Arduino Controller for Automatic gates

    hey guys - sorry i have been MIA and haven't been back up to my boat to test the latest code - will be up on Friday to upload it and once I am done with a test run i'll upload it. In the interim - here is the latest code and instructions on github - i renamed everything to avoid any legal hassles with the name - https://github.com/jonthompson/surfactuator Just a note - i don't know if you mentioned it, but you MUST PULL THE 5V REGULATOR JUMPER ON THE MOTOR CONTROLLER. Otherwise you will fry the motor controller with >12V from the battery and potentially your arduino if it fries the regulator. You will power the logic with 5v from the arduino.
  14. jonthompson

    Arduino Controller for Automatic gates

    sorry not yet - i wanted to test a few changes this weekend on my friends SAN -- i did - have a couple tweaks to make - and will upload in the next day or two along with a full wiring description instead of just a fritzing as it will be easier for folks to understand Either way - if you do build it - its easy to do software updates over USB so you can tweak/apply new changes down the line..
  15. jonthompson

    Arduino Controller for Automatic gates

    yeah the nano screw shield is much more secure and MUCH smaller - i've been building them in junction boxes: https://www.homedepot.com/p/4-in-x-4-in-x-2-in-PVC-Junction-Box-E989NNJ-CAR/100404097 I was using aviation connectors for all the inputs before but i got so sick of soldering i'm just running wire out with bullet connectors - MUCH easier instead of soldering 16 tiny aviation pins. Amusingly now all of my friends have slick gps controlled gates running my software and i'm still on a suckgate... haven't had time to design my gate design yet - nor plan to till fall.
×