Тёмный

Push Button Servo Control using DCC EX 

South Park & Kenosha Pass Railroad
Подписаться 735
Просмотров 9 тыс.
50% 1

Опубликовано:

 

29 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@chrishodge8159
@chrishodge8159 Год назад
Tried to follow the instruction on the DCC Ex site but this series of videos are so much easy to follow,well explained, keep them coming 😊
@stephenwadsworth6972
@stephenwadsworth6972 11 месяцев назад
Hi Steve, Having implemented the Latched Switching version mentioned in the first method you describe, I noticed that power to the servos is constantly applied, which can lead to servo "chatter". Using the ideas mentioned in the second method, I have now solved the problem by using code in this form (spaces added for readability) for a servo that is thrown when the switch is "on" :- IF(SWITCH1) IFCLOSED(TURN1) THROW(TURN1) ENDIF ELSE IFTHROWN(TURN1) CLOSE(TURN1) ENDIF ENDIF This only moves the servo when the switch is changed, and then power to the servo is off until the switch position is changed again. This also has the benefit that the values of Thrown and Closed can be played with in the Android DCC-EX Toolbox App without having to disable the sequence. Hope this helps Thanks again for a very helpful video. Stephen
@SPKPRR
@SPKPRR 11 месяцев назад
Any additional suggestions is always appreciated. My intent was as a starting point but I always welcome improvements.
@stevejames1688
@stevejames1688 5 месяцев назад
Many thanks for these very useful videos. I'm sure they have save me hours of head scratching. Keep them coming!
@bretkuehn3348
@bretkuehn3348 Год назад
Steve, Great video tutorial, just what I need to help me convert from DCC++ to DCC EX. I look forward to the I/O expansion video you mentioned.... looks like I will have over 100 switches on my layout. Thanks!!
@ernsta.vahlbruch6191
@ernsta.vahlbruch6191 10 месяцев назад
Fabulous. You just added a whole new dimension to my plans. Merry Christmas!
@kennethoriel7463
@kennethoriel7463 9 месяцев назад
Really good description, thanks for putting these tutorials together. I'm looking forward to your tutorial on using an I/O expander.
@nutball7537
@nutball7537 Год назад
Thank you for these great videos on servo-controlled turnouts. The momentary button controls with LED indications is exactly what I want to do with my planned small switching layout. I may have been able to make a small amount of progress toward a solution on my own, but I don't think I would have ever been able to get there without a tutorial like you've now provided. Bravo!
@rosiespringer
@rosiespringer 11 месяцев назад
Exactly what I have been looking for, brillient vid, thank you. Easy to follow and very well explained. I will watch in here for sure, keep up the good work.
@stevencilento9819
@stevencilento9819 Год назад
excellent explanation, great tuitional, keep them coming.. ty
@williamlenhart4966
@williamlenhart4966 Год назад
lets see this all done with the expansion boards!! I'm trying to set up a switching panel myself using led's and momentary switches but it would be a cleaner look to have a few cables ran into the panel with a dedicated PCA9685 instead of running all the buttons and leds out of the panel to the Arduino itself. Loving this video and can't wait for more!!
@peterntraum9514
@peterntraum9514 Год назад
Thanks for your really great Video, that will i gonna do!! Kind Regards from Germany.
@nigelbadley1004
@nigelbadley1004 Год назад
Test ing complete all good, thank you Steve. Next I have 22 points to sort out 😳, so where do I start with all those switches and LED's 🤔
@SuperSpuddo
@SuperSpuddo 8 месяцев назад
Great video clearly explained
@mattw9667
@mattw9667 11 месяцев назад
Great video! Where have you been? I finally figured this out last month but it was a struggle. Thanks for posting this vid for all of us 'noobs'!
@funkyx486
@funkyx486 Год назад
Excellent, another idea for servo control is semaphore signals, but how can you return the semaphore to danger after a train has gone past? Keep the videos coming, thank you.
@SPKPRR
@SPKPRR Год назад
There are SIGNAL_TURNOUT functions, and I hope to get to that eventually
@funkyx486
@funkyx486 Год назад
So you would have to put sensors in the track to turn the signal back to danger?
@SPKPRR
@SPKPRR Год назад
@@funkyx486 I haven't looked at the sensor turnouts yet, but I would think track sensors would be one way
@ChrisPackham1
@ChrisPackham1 10 месяцев назад
This is a very helpful video, thank you for explaining the code and hardware so well. I have a question, in (SEQUENCE 02) you use IFTHROWN to test the position of the turnout, the servos do not return any positional data so how does DCC EX know where the turnout is when you initially power up the layout. I'd like to attach a small relay to switch a turnout's frog polarity when it is thrown or closed so it's important to know the servos position at power up to avoid a short circuit. Thanks again for the video, I look forward to the next one.
@SPKPRR
@SPKPRR 10 месяцев назад
DCC-EX defaults to the closed position of all servos on startup. You can add some Sequences or macros to run at startup if you want certain turnouts in the thrown position. To test, put a turnout in the thrown position then reboot your DCCEX. your turnout SHOULD close on startup. Anytime you throw or close a turnout. Dccex keeps track of this.
@KronicleProductions
@KronicleProductions 9 месяцев назад
When you have a chance, Can you show how to add a green light on the other side of the button to show when the servo is in the other state. I want to add the buttons and two LED's for each to a control panel. Ultimately I will have 16 servos, 16 red LED's and 16 green LED's on the control panel. This would be so cool to be able to control my layout through the control and/or through JRMI. Thanks!!
@SPKPRR
@SPKPRR 9 месяцев назад
To add the green LED, just duplicate the SET(x) command, but have it set when you CLOSE the turnout, and RESET the red LED, i.e. THROW(turnout_address) RESET(green_LED_address) SET(red_LED_address) and CLOSE((turnout_address) RESET(red_LED_address) SET(green_LED_address)
@gapadad2
@gapadad2 11 месяцев назад
Nice video. I was able to expand to the maximum digital pins for switches and LEDs but I fall seven short of what I need. Is there any way to use the ANALOG pins to light LEDs?
@SPKPRR
@SPKPRR 11 месяцев назад
Analog pins can be used hto drive LEDs, but a better method is to use PCA9685'S. I will have a video on this coming out soon.
@nigelbadley1004
@nigelbadley1004 Год назад
Excellent, just what I needed for my next development of my DCC-Ex, could you provide downloadable examples of the sketches involved to allow examining and being able to modify for my own requirements. Thanks you
@SPKPRR
@SPKPRR Год назад
I've got to coordinate a couple things, but I should be able to get you demo files
@nigelbadley1004
@nigelbadley1004 Год назад
Thanks, bits on order so looking forward to completing
@SPKPRR
@SPKPRR Год назад
Link added with files
@nigelbadley1004
@nigelbadley1004 Год назад
Hi Steve thank you for dropping the files, it's very good of you to assist the novice that I am. Unfortunately the myAliases.h is not shown and myAutomation dies not have the SEQUENCES included. I'd be grateful if you could add those for me/us and I hope it is not too much of an inconvenience. Thank you@@SPKPRR
@JoseMiguelRuizPalenzuela
@JoseMiguelRuizPalenzuela 10 месяцев назад
Los sensores se identifican como los descios con servos o solo con conectarlos a uno de los pines digitales se reconocen automaticamente??
@SPKPRR
@SPKPRR 10 месяцев назад
The pins on Arduino are set to be input signals. The command AT(pin#) Automatically watches the pin# for a signal (HIGH or LOW). Commands like ONTHROW(turnout) or IFTHROWN(turnout) use "Counters" set up by DCCEX to monitor the state of a turnout, not the status of a pin.
@stephenwadsworth6972
@stephenwadsworth6972 Год назад
Hi Steve, thank you for this - I was just at the point of using DCC-EX to control points on my friend's layout, and had already wired the latching switches to pins 22-34, and tried this and it worked! However, I was expecting to have to declare the pins as sensors or as INPUT_PULLUP to make sure they didn't drift. So I guess DCC-EX has already defined this somewhere - I have tried reading the code but it is complex! Also, I saw you have used pins 61 - 63 for your virtual pins, but pins 54-69 are used as the digital definition for pins A0 to A15 on the Mega, so would it be better to use numbers in the range 70 - 99 instead? Similarly I was a bit puzzled as to where the LED output pins are defined as outputs? But as you have shown it works, and is so simple to program! Thank you too for showing how to create and use the "myTurnouts.h" and aliases - it really does make identification so easy!
@SPKPRR
@SPKPRR Год назад
I wasn't even thinking about the Analog pins as digital, so yes it would probably be a good idea to shift the Virtual pins up to 70 or higher. DCC EX takes care of all the defining for you, so you don't need to worry about setting up pins as sensor or output, the command IF(pin#) tells DCC EX to treat it as INPUT, and the SET(pin#) tells it to treat the pin as an output. Yes it really is easy to program, once you get the gist of it.
@gapadad2
@gapadad2 11 месяцев назад
I just had a DOOH moment... I needed more led pins and I just found them
@mattlawson7779
@mattlawson7779 10 месяцев назад
I am wondering, how many digits can be used for the alias turnout ? I think it would simplify things, if turnout 01, could be alias turnout 1001. You could have 999 turnouts, and match names to 1999
@SPKPRR
@SPKPRR 10 месяцев назад
According to the DCCEX team, route, sequence and automations can be anywhere in the range of 1- 32767
@SPKPRR
@SPKPRR 10 месяцев назад
Turnouts should be in that range too
@joseluistrujillo2087
@joseluistrujillo2087 10 месяцев назад
Hola, me podrías proporcionar el comando que usas para poder usarlo en mi maqueta de trenes
@SPKPRR
@SPKPRR 10 месяцев назад
EXAMPLES of the code are in the video. You will need to write the code specific to your needs and can use the examples given as a guide
@rickcald1661
@rickcald1661 Год назад
Steve are you located in Colorado?
@SPKPRR
@SPKPRR Год назад
Yup
@rickcald1661
@rickcald1661 Год назад
are you anywhere close to Cheyenne? @@SPKPRR
@SPKPRR
@SPKPRR Год назад
@@rickcald1661 Northern Colorado, Loveland area
@gapadad2
@gapadad2 11 месяцев назад
HELP PLEASE.......I HAVE ENTERED THE CODE FOR ONLY 3 SWITCHES AND NONE OF MY HARDWARE WORKS. LEDs DO NOT CHANGE STATE, THEY STAY ON), NOR DO ANY SWITCHES. HOWEVER ENGINE DRIVER THROWS THE SERVOS ONLY. Am I missing something???????? I hate codeing
@SPKPRR
@SPKPRR 11 месяцев назад
Without seeing the code, I don't know where to start. Post your code for the three switches or put it in a Dropbox file so I can see it.
@gapadad2
@gapadad2 11 месяцев назад
I found the problem. you use SERVO_TURNOUT(116, 116, 300, 450, Fast, "Test1") instead of SERVO_TURNOUT(116, 100, 300, 450, Fast, "Test1") This changed the pin number on the PCA9685 to 116 instead of 100.....@@SPKPRR
@evovanner
@evovanner 8 месяцев назад
Can you do all this on the UNO
@SPKPRR
@SPKPRR 8 месяцев назад
The UNO doesn't have much memory. You definitely won't be able to do the WiFi connection, you would have to connect through jmri. Even then, there is very little memory for automation and you would not be able to add much. That's why the Mega is the choice.
@Madmaximuss
@Madmaximuss 11 месяцев назад
How did you set up the WiFi throttle to the Arduino?
@SPKPRR
@SPKPRR 11 месяцев назад
I use the ESP-01 WiFI module, there are others that work. see this link for WiFi boards. dcc-ex.com/ex-commandstation/advanced-setup/supported-wifi/wifi-config.html#gsc.tab=0 I know there are issues with the firmware on current boards that may need to be updated. I have not needed to, my boards still have the good firmware.
@martinbzm
@martinbzm 8 месяцев назад
Thanks for the excellent explanation. Maybe next time lubricate your throat a little bit 😊
Далее
Cheap and Amazing!  DCC-EX 2 Years Later
10:46
Просмотров 26 тыс.
skibidi army returns (skibidi toilet 77)
00:49
Просмотров 1,1 млн
Control 16 Servos Using A PCA9685
18:22
Просмотров 74 тыс.
Using Servo Motors with Arduino
43:06
Просмотров 1,4 млн
Push Button Servo Control using DCC EX
5:42
M4 Mac mini - 10 MAJOR Reasons to Upgrade!
10:08
Просмотров 105 тыс.
063. Setting up a DCC-EX EX-IOExpander
25:51
Просмотров 2,8 тыс.