Control 16 Servos Using A PCA9685

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 183

  • @erikpatt7585
    @erikpatt7585 4 года назад +1

    Nice explanation and finally a downloadable code without an error

  • @brucewoods9377
    @brucewoods9377 Год назад

    This is a great tutorial Tom. Very easy to follow. I have now made a mimic panel incorporating the Arduino Meg Pro and the PCA 9685 running 15 servos, SPST Switches and 2x2-pin bi-colour LEDS (One for Thrown and the other for Closed) and it works like a charm. Thanks again for the Tutorial, and keep up the great 👍 work

    • @TomsTrainsandThings
      @TomsTrainsandThings  Год назад +1

      Thank you so much, glad it was helpful in getting you where you needed to build your own.

  • @dalefgrooms1812
    @dalefgrooms1812 Год назад

    I know you posted years ago, but i love it! Thank you for your great work.

  • @jimrousey4650
    @jimrousey4650 4 года назад

    I have watched this video several times, and I am getting brave enough to try. I am not sure what sketch I should use. I found 2 on your project folder, and neither seems to match with the one on camera. I hope you are still notified when new comments arrive. I have watched dozens of your videos and am subscribed. Thanks Tom.

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      Thank you James. The ones in the project folder is the final sketch

  • @joedart1465
    @joedart1465 5 лет назад +1

    good job Tom. it's always the little details that make a difference and you delivered them clearly. Thanks.

  • @AkashJadhavIT
    @AkashJadhavIT 5 лет назад +1

    this the most detailed PCA9685 video out there, which also explains what each pin to beginners like me. thank you so much.
    1. would it possible for you to make a video of how to control multiple servos at once rather than running one at a time using PCA9685?
    2.second, how to mod this same servo for 360-degree rotation so we can control using PCA9685

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      Multiple servos running simultaneously are controlled in the code. Check out my other videos. These servos are only for 180 degree rotation. You would have to purchase 360 degree servos.

    • @AkashJadhavIT
      @AkashJadhavIT 5 лет назад

      @@TomsTrainsandThingsi will check out the other videos then, thank you for your reply 🙂

  • @MMRails
    @MMRails 5 лет назад

    Ah shoot! I have the PCA9684. I’ll come back later when I upgrade. Well explained Tom.

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      One short this time. Maybe next time. Thanks Mark. Say Hi to Donald for me!

  • @johnmarshall2660
    @johnmarshall2660 4 года назад +1

    Really great Tom... I finally got round to trying your sketch and found a bit confusing then realised that Final and Test were in same sketch that I downloaded, but works a treat just need adjust movement angle and the modify for 16 sets of points ... and a Happy New Year 2020...

  • @roberthughes1796
    @roberthughes1796 10 месяцев назад

    Great job Tom as usual. Could you supply a schematic or wire diagram on how to wire the switches and LEDs up to the Arduino and the PWA9685 to use for turnouts. Athe the present time I am using TVD Octo lll's.and a Quad LN.
    🙂

  • @bobcampisi1362
    @bobcampisi1362 4 года назад +2

    Great info Tom, I have been looking for months on how to set this up, your video and sketch are the best tried it and it works. Subscription worth every penny. Bob from Lubbock TX

  • @marka87
    @marka87 4 года назад +1

    Great stuff Tom, getting into this Arduino thing and your videos are really helpful.
    Thanks
    Mark (UK)

  • @mikeseba7817
    @mikeseba7817 Год назад

    👍👍👍
    Thank you! Very well explained!

  • @manonblake1583
    @manonblake1583 2 года назад

    Thanks Tom. I wanted to see if I could use two PCA9685’s. One for the servos and the other for The LED’s?

    • @TomsTrainsandThings
      @TomsTrainsandThings  2 года назад

      Never attempted to run both servos and LED's on the same device, but I see no problem with servos on one and LED's on another.

  • @willannand9988
    @willannand9988 3 года назад

    Revisited this video, lots of great information. One problem, I tried to download the code and the page was not available.

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад +1

      I'll have to update the web page link on the video. I got rid of the old web site back in December. Working on a new one, have a few of the sketches on the Project page. More to come soon. Tomstrainofthought.com

  • @rva1945
    @rva1945 4 года назад

    That is precisely what I've been using in my turnout.

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      Works great

    • @rva1945
      @rva1945 4 года назад

      @@TomsTrainsandThings Absolutely. I'm using two Mega one for DCC and another for the servos as I needed many digital pins for reading switches on a switchboard. Now I use a Processing sketch were I have my layout and click on the turnouts.

  • @Surajborate1
    @Surajborate1 3 года назад

    Thank you , very well explained
    Not able to open code link given in description .Please help me .

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад

      Thanks. I have a new web site, still under construction, but putting code in as needed
      tomstrainofthought.com/pca9685/

  • @masterdplos2689
    @masterdplos2689 5 лет назад +1

    Het there! I'm starting with arduino for my new layout and this has been really helpfull!! thanks

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      Glad I could help

    • @masterdplos2689
      @masterdplos2689 5 лет назад

      @@TomsTrainsandThings actually, I'm doing the translation for Spanish subtitles of one your videos. Meanwhile I'm learning a lot!

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      Thank you for doing that!

  • @yrunaked4
    @yrunaked4 3 года назад +1

    I want to have a crap ton of operating wig wags, Griswold signals and semaphores, this is probably the more affordable approach as those switch machines can break the bank

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад +1

      Servos are the way to go. I used 9 gram servos in this demonstration, but a better fit for wig wag or signals would be 3.7 grams.

  • @davidkerchner5163
    @davidkerchner5163 4 года назад +1

    Do you have a book? You have the best videos!

  • @ModelSceneryTutorials
    @ModelSceneryTutorials 5 лет назад +1

    Thank you. Do you have a wiring diagram or something that shows how to add the push button or switch and LEDs to the breadboard and connect them to the arduino?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      The sketch and Frirzing diagram is on my web page along with all my other Arduino lessons and projects. You can find the link in the description of this video.

    • @federicosarnico
      @federicosarnico 4 года назад

      @@TomsTrainsandThings Hello Tom, almost everything clear, only would like to know the value ( Ohm ) of resistor you used in the circuit

  • @jamesburba1995
    @jamesburba1995 2 года назад

    Tom, could you possibly show us how to completely wire, and code the Arduino and the PCA9685 with pushbuttons and LED position indicator lights on a control panel ? I have 29 turnouts, and servos, and would sure like to know how to make it all work. Thanks Tom !

    • @TomsTrainsandThings
      @TomsTrainsandThings  2 года назад

      Have you looked on my web site? That will point you in the right direction. The way you wire your mdel railroad is up to you. Everyone does it differently.

  • @liheliheliheli
    @liheliheliheli Год назад

    hello, dear grandpa Tom, could please tell me how you power pca9685 cause I am new in Electronics and trying to power it using my lipo battery with XT60, it seems like you power it using some converter, but it's unclear, could you please tell me what's your way of powering, thank you, and you did a good job and really appreciate your job

  • @ac44000cw
    @ac44000cw 5 лет назад +1

    Great project great video but please explain where to connect the toggle switches in the arduino or schematic will be helpful
    I need to install 15 turnouts

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      Thank you Luis. Go back and watch the video at 0:27 I tell you where you can find the explanation. The web address is in the Description under Contact Info. I have most of my Arduino projects on the web page.

    • @ac44000cw
      @ac44000cw 5 лет назад

      Toms Trains and Things
      Thanks for the fast response
      I made 1 servo work without any problems
      But I’m new to write code sketches and all that so I don’t know how to add 12 more servos to my arduino
      So I’m lost

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      In the example sketch on my web page I show two servo/switch routines in the if/else statements. Copy and paste the contents of these two statements and change the numbers involved. The first statement uses "0" the next one uses "1" Continue with the same numbering convention until you have the desired button/LED combos that will fit on an Uno. You will also need to declare the Pins for LED's, Buttons & Button State at the beginning as in the example. The Uno is limited by the available pins but more can be used on a Mega. Like I said in the video, I will show how you can increase the number of available pins on the Uno via a shield or module. I just received the module in the mail so I'll be doing a video on that shortly.

  • @safatkhan676
    @safatkhan676 Год назад

    Thanks for the video. What's the maximum current this thing can handle? My servos need about 1.5 amps each.

    • @TomsTrainsandThings
      @TomsTrainsandThings  Год назад +1

      The power drawn comes from the external powwr you supply to your servos. The PCA9685 only supplies a signal to the servos. To determine the max current for the device, I suggest contacting the manufacturer.

    • @safatkhan676
      @safatkhan676 Год назад

      @@TomsTrainsandThings The PCA9685 is just the controller chip on this board, right?

    • @TomsTrainsandThings
      @TomsTrainsandThings  Год назад +1

      @@safatkhan676 Yes, this is a breakout board for the chip, first offered by Adafruit

    • @safatkhan676
      @safatkhan676 Год назад

      @@TomsTrainsandThings Thanks for the informative video and responses.

  • @MrKWiley918
    @MrKWiley918 5 лет назад

    I have Kato turnouts, and I have an ideal about using an arduino, a motor shield AND a multi relay board, with each relay a turnout and the MS will provide the power to operate .

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      You can eliminate the motor shield. It needs external power to operate. The same external power you can hook up to the relay board. The motor shield can only control 1 motor per channel, it's not needed in your situation.

  • @OwenKane
    @OwenKane 2 года назад

    Interesting Video Tom, I can think of a number of places to use this and not all would be turnouts. Got me thinking would the PCA9685 be capable of activating a Kato turnout.

    • @TomsTrainsandThings
      @TomsTrainsandThings  2 года назад

      Thanks Owen. The PWM signal can control RGB LEDs, Servos, and spped on a DC motor. Anywhere any of these are used is a possibility.

  • @RichardDellAquila
    @RichardDellAquila Год назад

    Hi Tom, Interesting video. Do you know of a way to control the individual 16 servos separately with a push-button or switch, and if so, how can we obtain and compile the code? It looks like this video gets to that point, but I don't understand the detail.
    Thank you.

    • @TomsTrainsandThings
      @TomsTrainsandThings  Год назад

      Have you checked my web page that complements this video, this goes a little further with updated code! tomstrainofthought.com/projects/pca9685/

  • @moendrekocsis
    @moendrekocsis 5 лет назад

    Hi! Very useful video. One question: can you also integrate frog polarity switching? Thank you

  • @railbuilderdhd
    @railbuilderdhd 4 года назад

    This is great for how to get the arduino on Mrr. How about using digit ax DCC to control the input.

  • @pacificcoastminiatures
    @pacificcoastminiatures Год назад

    So everyone is showing using a PCA9685 to drive up to 16 servos or more if you daisy-chain them. But you're limited to how many buttons you can plug into the Arduino to act as inputs. How do you overcome that limitation?

    • @TomsTrainsandThings
      @TomsTrainsandThings  Год назад

      You can run 16 servos on each pca 9685. You can also use a pce 8555 for pb there are many different devices you can use with I2C to increase inputs & outputs

  • @RixtronixLAB
    @RixtronixLAB 11 месяцев назад

    Nice video, thanks :)

  • @brendanpratt7760
    @brendanpratt7760 Год назад

    interesting video. How do I add more switches/buttons on a Uno to control separate turnouts, or do I have to go to a Mega to do that ?
    I'm still learning this. :)

    • @TomsTrainsandThings
      @TomsTrainsandThings  Год назад

      DFRobot makes a shield where you can add more I/o to your device. I discuss this in several of my other videos
      www.dfrobot.com/product-1009.html

    • @brendanpratt7760
      @brendanpratt7760 Год назад

      @@TomsTrainsandThings thanks, I'm trying to find it amongst your dozens of helpful videos. :)

  • @gjdanco4260
    @gjdanco4260 4 года назад

    Hi Tom
    Enjoyed your tutorial. I have successfully built my own dcc++ using an arduino and a motor shield and can run and program engines on my test track. Now to step 2 I want is use JMRI to switch my servos using an uno and a pca9685. I was looking for the adafruit sketch you mentioned in your tutorial, however could not find it. Would you be able to direct me as where to find it? Thanks Geoff

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      A link to my web page is in the description, it's under /projects

    • @gjdanco4260
      @gjdanco4260 4 года назад

      @@TomsTrainsandThings Thank you Tom...found it...now to get to work

    • @gjdanco4260
      @gjdanco4260 4 года назад

      Tom, would you know of any tutorials that will connect JMRI to an arduino uno and PCA9685?
      Would prefer to control servos direct from my pc thus eliminating need for a panel, wiring, led lights, and switches.

  • @daviddanhauer9301
    @daviddanhauer9301 10 месяцев назад

    Have you ever attempted an Arduino/JMRI controlled turntable?

    • @TomsTrainsandThings
      @TomsTrainsandThings  10 месяцев назад

      No, but there are many others on RUclips that have done the turntable with Arduino. Not so sure about with JMRI

    • @daviddanhauer9301
      @daviddanhauer9301 10 месяцев назад

      @@TomsTrainsandThingsThanks!

  • @viktorvarga9566
    @viktorvarga9566 5 лет назад

    Hi Tom thank you for this video very usefull for me. But tell me please how to I modify the servo speed?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      Thank you. You can find more on this subject in some of my other videos.

  • @BALD8BIL
    @BALD8BIL 5 лет назад

    This looks like a lot going on but it looks like you got it down pat thanks for taking the time to share this video I know I'm in the process of deciding which switch motor to go with should it be the tortoise Cobalt or these RC motors it's a hard decision to make the tortoises you need to solder or buy an extra piece so you don't have to solder you want to get one year warranty with it. The kobold you get lifetime warranty with everything no soldering involved then we have the RC motors what's your cheat but all the extra stuff you have to buy make them work does not seem worth it I'm looking at about 36-40 turnouts just on my way out very hard to decide which way I want to go. so again thank you for taking the time to make this video and sharing it with us

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      Each pca9685 will operate 16 servo motors and they can be stacked where you can operate over 900 servos. All of them can be operated with one Arduino Uno or Mega which can be purchased for $22 for the original or less than half that for a clone which I use on all my projects. Since the technology is open source, any manufacturer can make the Arduinos. There is also a board for the inputs where you can increase the capacity of the Arduino to handle more inputs such as switches and LEDs. Initial cost for the Arduino method if you purchase all name brand items; Less than $50. Servos can be obtained for under $2 pc.
      Tortoise switch machines have a 9 year warranty and are located in the US. They rarely fail
      Cobalt has a lifetime warranty and located in Au & UK
      See my video comparing the two switch machines: ruclips.net/video/j-NPoi3gLQo/видео.html

  • @scottmorgan5370
    @scottmorgan5370 4 года назад

    Tom, I like this code for the 16 Servo Board, but I'm wondering if there is a way to slow the speed of the servo down, to throw the turnouts a little slower.

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      I haven't found a way yet. I have to keep trying. That's been ask by many.

    • @jyvben1520
      @jyvben1520 3 года назад

      use a smaller angle (full/10), pause, increase the angle (add 1/10), pause, repeat until full angle is reached.
      time to pause (aka sleep) is decided by you, that should do it ! /10 can be higher if you want it smoother

  • @AbdulRahman-jz3px
    @AbdulRahman-jz3px 2 года назад

    What if I only need 5 Servo need to use this driver? which is better to use arduino PWM pins or servo driver PWM pins?

    • @TomsTrainsandThings
      @TomsTrainsandThings  2 года назад

      Even with 1 servo on the PCA9685.
      Using the PWM pins on the Arduino limits you to just 1 maybe 2 at the most. I wouldn't put anything else on that Arduino since you're pushing it;s amperage limit.
      Try what I have on this video: ruclips.net/video/xT98CcJdpHI/видео.html

  • @jesusandrades2322
    @jesusandrades2322 4 года назад

    Hi, thanks for the video. I need to know if there is any way to disable the current on a servo with this librar y after it makes a move. I am using 15 servos and they make a lot of noise and vibrate. I think this would be a way to eliminate it. Thank you

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      Your probably over driving the servos past the limit. Even though they state 0 to 180 they may not go that far.

  • @JoeG-firehousewhiskey
    @JoeG-firehousewhiskey 5 лет назад

    This is awesome, thank you very much for the video!

  • @noavanderhaeghe6193
    @noavanderhaeghe6193 5 лет назад

    Hi Tom, how do you control the servo speed with this pca9686? Because I am using this for a school project and the speed has to be lower to be stable. Maybe you could tell me how to find it?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      Try a short delay in the code under the line pwm.set, this may slow down the rotation.

  • @ModelSceneryTutorials
    @ModelSceneryTutorials 4 года назад

    Do you have a sketch to control only 4 videos with leds using only an Uno without having to spend money on the pc9685?

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      Here is a video on controlling a servo with an Uno; ruclips.net/video/w3DL-H0fzmY/видео.html
      In order to control more than 1, you would need an external power source for the servos to drive them.

  • @larryo4480
    @larryo4480 4 года назад

    Great video Tom. I'm getting started with DCC++ and hope to use servo actuated turnouts. Do you know if the Walters LLC Switch Machines are compatible with the Arduino PCA9685?

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      Don't have any, but what I've seen, it has it's own control system with decoder. Short answer would be no. The PCA9685 along with the code in the Arduino takes the place of the components on the Walthers unit.

    • @larryo4480
      @larryo4480 4 года назад +1

      @@TomsTrainsandThings Thanks for the quick reply. I have one on order to play with, so I'll give it a go when it arrives and report back.

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      @@larryo4480 Thanks

  • @dixiem2139
    @dixiem2139 3 года назад

    Hello sir, What is the safest way in using power supply assuming there's 32 servos running together at the same time,? Thank you.

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад +1

      Calculate the total amp draw of all the servos and use a power supply capable of handeling it. Servos drw very little amperage if your using the 9g or smaller.

    • @dixiem2139
      @dixiem2139 3 года назад

      @@TomsTrainsandThings thank you~

  • @vincentblake2589
    @vincentblake2589 4 года назад

    Hi tom, how would you connect an on/off (SPST) toggle switch? would you keep the same as a push button with a 220ohm resistor (I am connecting 8 switches for 8 servos)?

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      Same as you would a push button. I used a PB in this demonstration because I didn't have an SPST sw to fit the breadboard.

    • @vincentblake2589
      @vincentblake2589 4 года назад +1

      Thank you for your help, great videos.

  • @ChrisPackham1
    @ChrisPackham1 5 лет назад

    Hi Tom, Good job, I learnt a lot from this. I have a question, how do I get JMRI to talk to the PCA9685 and control turnouts?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      Thanks Chris, glad I could help. JMRI is an entirely different discussion. I may cover it later on in another video.

    • @funcraft3605
      @funcraft3605 4 года назад

      Yea same here. I'd like to use an Arduino Mega to control DCC++ l298p shield with addition to the pca9685 all from JMRI

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад

      @@funcraft3605 see my comment to you on the other video.

    • @federicosarnico
      @federicosarnico 4 года назад

      @@TomsTrainsandThings which is the video where you speak how to drive PCA9685 from JMRI? you have too many videos .. please help

  • @javilagarde6852
    @javilagarde6852 5 лет назад

    Hello Tom. Where is the arduino code of this example? It's very good!! If you can put the link here it would be great. Greetings and thank you very much for sharing.

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      All code for my projects are on my web page

    • @javilagarde6852
      @javilagarde6852 5 лет назад

      Hello Tom. I was searching your website and I did not find the code for this project. Would you be so kind as to pass me the link or send it to me by email? Thank you very much greetings from Argentina. dj.jav1@hotmail.com

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      tomstrainsandthings.com/projects/

  • @guzzialfa
    @guzzialfa 5 лет назад

    Nicely presented, Tom. Thanks for showing us how to get 16 going. In practice would you have to have 16 toggle switches to throw for turn outs which makes sense but what about crossing gates for roads? Do you have to throw a switch to put them down or will you have a sensor that sees the train coming up and puts the crossing gate down upon approach or will you have to throw a toggle switch to do so?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +2

      Crossing gate video will be out shortly. You just have to add the servo without the pca9685 to a sketch I already did for the crossing gates.

  • @juanmanuelandradescaro978
    @juanmanuelandradescaro978 5 лет назад

    Hello, is there any function that removes the voltage of one of the outputs of the PCA9685? It's to keep them from vibrating.
    Thank you.

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      If your servos are vibrating, your driving them past their limit. Reduce the Max & Min figures. I show hoe to do that in another video.

  • @coreygibson2590
    @coreygibson2590 5 лет назад

    Hello. Your channel is Very informative and done well. I just got back into the hobby about 6 months ago. I'm at the stage where I'm about to build my layout. My question is,, do you think it's possible to incorporate this exact setup into JMRI? If it is not possible, then your button way will be my approach. Also I cannot find your modified script. I only have the download from Adafruit. Thanks

    • @coreygibson2590
      @coreygibson2590 5 лет назад

      I found your scripts on your website. Thanks

  • @lokivsfortune
    @lokivsfortune 5 лет назад

    using ohmeter i rfound that the vcc and GND is connected ,,also the v+ (before i connect to anything) is my driver i sbroken already?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      Sounds like you have a short.

    • @lokivsfortune
      @lokivsfortune 5 лет назад

      @@TomsTrainsandThings thanks..., module is broken for sure.., if this 16ch servo shield can handle just about 5v, how about16ch servo driver shield (that stack in to arduino uno) can handle more than 5v?

    • @lokivsfortune
      @lokivsfortune 5 лет назад

      @@TomsTrainsandThingsyes it is short,then i removed the capacitor and the module is not short...,

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      @@lokivsfortune Not sure why you had a capacitor in there. I did not show a capacitor in the diagram or video.

  • @maestrojamesw
    @maestrojamesw 5 лет назад

    Hi - I have an Arduino Mega successfully running DCC++. How do I get it to run the PCA9685 at the same time?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад +1

      Your best bet is to go on the Trainboard forum: www.trainboard.com/highball/index.php
      There are many modelers that do coding 24/7, they may be able to answer your question.
      Remember, the Arduino micro-controller is designed to perform 1 task at a time. Although you can stack tasks, there will be somewhat of a delay in performance. I use multiple Arduino's throughout my layout.

    • @maestrojamesw
      @maestrojamesw 5 лет назад

      @@TomsTrainsandThings Thank you.

  • @rodnamberkarns3424
    @rodnamberkarns3424 4 года назад

    Great video, very informative. My question is, the from the diagram, you can run 16 servos on the PCA9685 but it looks like the UNO board will run out of room for the LED lights before that. Is it possible to run the LED's off another PCA9685? Also, do you prefer the 2 pin bicolor or 3 pin bicolor LEDs? New to this so sorry if questions have been answered before. Thanks

    • @TomsTrainsandThings
      @TomsTrainsandThings  4 года назад +1

      There are other shields and boards similar to the pca9685 that can add additional capacity to the Uno that are also I2C devices. I will be doing another video to demonstrate this in the future. I have several of the boards that can accomplish this but not had the time to do it. As far as bicolor LED. I prefer using the 2 pin, but in this application, the 2 pin requires a reversal of polarity which you can not do in this application. Either 2 separate LEDs or the 3 pin need to be used for this.

    • @rodnamberkarns3424
      @rodnamberkarns3424 4 года назад

      @@TomsTrainsandThings what boards do you have or would recommend for the LEDs? I plan on having 10 turnouts run with servos as shown in your video with a Red/Green 3 pin LED at each to indicate direction. Thanks!

    • @rodnamberkarns3424
      @rodnamberkarns3424 4 года назад

      @@TomsTrainsandThings One other question, does the UNO run off the 5V that also powers the servos on the PCA9685 or is another power source needed for the UNO, like USB?
      Thanks!

  • @redmeeko
    @redmeeko 3 года назад

    I could not open your website. When are you going to share the code?

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад +1

      I shut down the web page at the end of December due to issues with the provider. Another one will be up in the near future.

    • @anatoliidudko7029
      @anatoliidudko7029 3 года назад

      @@TomsTrainsandThings Really hope we will get your website soon. I am very new into this hobby but it looks like nobody else explains how to control servos with 9685 + LED's and toggle switches. Everybody else use JMRI directly. So I desperately waiting for your new website to get wiring diagram and other info to build same system. Thank you again for your great youtube channel.

  • @arthurhouston3
    @arthurhouston3 5 лет назад

    Tom Thanks but I got NCE figured out, to old to go make changed.

  • @anatoliidudko7029
    @anatoliidudko7029 3 года назад

    Ok. Thank you. But where is the most important part that explains wiring and for control panel? To be honest everything else is pretty easy to find online. I would be appreciated if someone could explain me how to wire control panel with this setup and where to find code for it. Thank you in advance.

  • @gabriellangelier5731
    @gabriellangelier5731 2 года назад

    Thanks

  • @federicosarnico
    @federicosarnico 4 года назад

    Hello Tom, How many Farad is capacitor on PCA9685

  • @ks1ngh27
    @ks1ngh27 5 лет назад

    With Arduino mega I dont need this extra accessory? Can I control Kato turnouts with this?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      Yes you do. The PCA 9685 can handle the extra amperage needed for additional servos, the Mega can not handle more than 1 servo safely even though it has many more output pins. It's still limited to the available total amperage. If you can use servos with a Kato turnout .

  • @gedtoon6451
    @gedtoon6451 15 дней назад

    Although the PWM is set with a 12 bit value, it does not mean there are 4096 steps of control. At a frequency of 50hz you get 25MHz/(50Hz * 4096) ≈ 122 steps. This is a far cry from the advertised 4096 steps!

  • @johnmartin1740
    @johnmartin1740 5 лет назад +1

    How do I use JMRI with this? Thanks

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      Haven't tried this with JMRI. This is a solution without JMRI.

  • @mikepatatas6144
    @mikepatatas6144 2 года назад

    ok what about the power supply? why do no one says what kind of power supply use for this.

  • @njsurf1973
    @njsurf1973 3 года назад

    is your web page coming back?

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад +1

      As soon as I get my new house in order and have time to search for a new provider.

    • @njsurf1973
      @njsurf1973 3 года назад

      @@TomsTrainsandThings thanks!

  • @amelliamendel2227
    @amelliamendel2227 5 лет назад

    Where do you get the min/max numbers?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      The min & max adjusted value have to be calculated. I show how in one of my Arduino Made Easy videos.

    • @amelliamendel2227
      @amelliamendel2227 5 лет назад

      @@TomsTrainsandThings calculated how? All I got is the spec sheet that says limit angle 200°+/-1° and centering divisions 1°. I tried random numbers and it just sounded like it was grinding so I stopped messing with it before I broke it. Where are you getting numbers to "calculate"? PLEASE

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      @@amelliamendel2227 have you watched my servo video in the series Arduino Made Easy? It explains it there.

    • @amelliamendel2227
      @amelliamendel2227 5 лет назад

      @@TomsTrainsandThings I found it thank you for making these videos

  • @martinhilvers1213
    @martinhilvers1213 3 года назад

    Why do you use #define instead of const?

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад

      That code is from Adafruit as noted in the header. A lot of her older code uses Define, probably because of "C"

    • @martinhilvers1213
      @martinhilvers1213 3 года назад

      @@TomsTrainsandThings const is preferred
      www.arduino.cc/reference/en/language/structure/further-syntax/define/

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад

      The good thing about Arduino is the availability of code especially from other manufacturers, all one has to do is copy & past instead of writing your own code. If it works, don't knock it. I see Define and other terms used all the time in code. It works either way!

  • @peterwhiting6303
    @peterwhiting6303 5 лет назад

    How long can you make the servo cable?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      I haven't tested the cables for the servos but I did a test on a 30+ ft length of Cat 5 cable for Tortoise switch machine and there was no issues.

    • @peterwhiting6303
      @peterwhiting6303 5 лет назад

      @@TomsTrainsandThings I have never used a tortoise what is the drive signal?

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      Tortoise uses an independent power source or operated through DCC devices not compatible with this subject. The point was the length of the cable tested.

    • @peterwhiting6303
      @peterwhiting6303 5 лет назад

      @@TomsTrainsandThings I should have asked if the waveforms used to drive the Tortoise and the servo are similar to each other. This would make your tortoise test result useful.
      Perhaps I should try some tests. Thanks.

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      The tortoise takes DC, the servos take PWM

  • @chazco
    @chazco 5 лет назад

    I need to strengthen my base. Then I can safely build my layout

    • @TomsTrainsandThings
      @TomsTrainsandThings  5 лет назад

      I need to rebuild mine. I'm going to build me a module or two!

  • @dzungnguyenviet7368
    @dzungnguyenviet7368 2 года назад

    Have you got software training..

  • @gamepad3173
    @gamepad3173 2 года назад

    oh boy, for the project that I'll be working on yeah this is going to come in handy for building 193 countries (in G scale, O and OO/HO).

  • @6thgearup
    @6thgearup 3 года назад

    Has anyone tried adding Bluetooth to this?

  • @darrenwilliamsrichardsonva394
    @darrenwilliamsrichardsonva394 5 лет назад

    Tom thank you your videos are a great resource especially for the beginners or the technical and programming challenged like myself. This is a great video I have been searching for this exact solution for my switch control! I am also looking at the 16 Channel Relay Board Module for Arduino as an option for controlling my switches up 32 I think. 00Rail made a video on this option but I am trying to work out how to put it together for more than 1 switch! The link to their video is ruclips.net/video/-ATOKGPQgkk/видео.html. Again thank you for the great resources and keep up the fantastic work mate! Regards Darren from Australia!