Easily Add Sensors & Outputs To DCC++

  Рет қаралды 15,853

Toms Trains and Things

Toms Trains and Things

Күн бұрын

Пікірлер: 33
@DominicFawver
@DominicFawver 4 жыл бұрын
I just started messing with this part of DCC++, so perfectly timed :)
@TomsTrainsandThings
@TomsTrainsandThings 4 жыл бұрын
Glad it was helpful
@bernardc2553
@bernardc2553 4 жыл бұрын
What was I think N... OH YAH... Tom.. your the best teacher !!!
@TomsTrainsandThings
@TomsTrainsandThings 4 жыл бұрын
Thanks Bernard
@BillMastersMRR
@BillMastersMRR 7 ай бұрын
How long of a wire run can the sensor be from the arduino? Say the ir sensor is 20 feet away from the arduino? Will it keep enough signal for the Arduino to read on that far of a run?
@TomsTrainsandThings
@TomsTrainsandThings 7 ай бұрын
I think the developers at DCC-EX tested the length of leads for sensors and servos at 20 ft. also with success. Although they use a PCA9685 for the control with the Arduino. I personally kept my Arduino close to where I was using sensors and servos. I have used a 50ft+ 4 pair twisted pair telephone cable to operate Tortoise switch machines in the past. The best way to find out is to experiment to see if it will work in your case
@BillMastersMRR
@BillMastersMRR 7 ай бұрын
@TomsTrainsandThings , Thanks. After asking I got to reading about using cat6 cable for extending the distance between I2C devices. Seems to be the way to go.
@frightrisk7407
@frightrisk7407 4 жыл бұрын
Just wanted to let you know that this is not the way it works for outputs. The command is , the IFLAGS are not separate parameters, they are bitflags in a byte. You have to do some binary to decimal math. So you have bits 0,1 and 2 reading from right to left line this (2,1,0). Those are position numbers since a bit can only hold a 1 and a 0. So if bit 1(the rightmost bit) is a 0 or a 1, it is easy since the decimal value you would enter is the same, a zero or a one. But to compute the others, the easiest way is to use the power of 2 based on the position of the bit. So 2 to the 0 power is 1, 2 the the 1st power is 2, 2 to the 2nd power is 4. So you just add those numbers together if they have a 1 in them. So 001 is 1, 010 is 2, 100 is 4.. So to set bit 0 and 2 to one, you add 1 and 4 and get 5. To set the fist two bits on, which looks like 011 to the computer, you add 1 and 2 together and get 3. You are counting in powers of two instead of powers of 10. Those 3 bits can hold 8 possible combinations of 1s and 0s. There are free online calculators in addition to the one that comes with windows that let you just turn bits on and off and it will give you the number ;)
@TomsTrainsandThings
@TomsTrainsandThings 4 жыл бұрын
Thanks for your input! At least someone knows how to do it!
@JamesNortonJones
@JamesNortonJones 2 жыл бұрын
I'd wondering how you connect the power to the DF Robot Shield and the Motor shield, to they have their own power supplies or does the sensor shield power the motor shield? Thanks
@TomsTrainsandThings
@TomsTrainsandThings 2 жыл бұрын
You can see the barrel connector in the video and me explaining the switch to change from the Mega power or the external power. The motor shield is powered in the same way with external power which is explained in the DCC++ videos
@JamesNortonJones
@JamesNortonJones 2 жыл бұрын
@@TomsTrainsandThings That's great thanks for clarifying.It was just in the video it didn't show the power connector on the motor shield kzbin.info/www/bejne/ipWshJqOdt6chbs. I really appreciate the reply.
@ArenINMotion
@ArenINMotion 6 ай бұрын
So if I have a relais on pin 128 on my PCA9685 (#41) and I set it with 7 is bit 0,1,2 high. I store it in the eprom with But with what command can I set the relais?
@TomsTrainsandThings
@TomsTrainsandThings 6 ай бұрын
T= turnout, Z=relay, S=sensor. To set them in eprom, use E, this will set any sensor in. As shown at 7:15
@Chris-xh4hw
@Chris-xh4hw 6 ай бұрын
So this board will only take IR sensors which run on 3.3v. I have a IR sensor which is 5v.
@TomsTrainsandThings
@TomsTrainsandThings 6 ай бұрын
I have IR sensors and relays in this video, all 5vdc. This is an I/O sensor shield, that means any input or output that has 5vdc. The pins are clearly marked as Input or output, but they can be changed in code which I discussed in another video
@MomentumChaser0331
@MomentumChaser0331 10 ай бұрын
My Man knows his S ah Stuff 😁👌🏼👍🏼👍🏼🙏
@TomsTrainsandThings
@TomsTrainsandThings 9 ай бұрын
Thanks
@MomentumChaser0331
@MomentumChaser0331 9 ай бұрын
@@TomsTrainsandThings Yes Sir I like Train’s Specially Ho Style Sir and I am working on this system that you set up here for my very own set up and testing Sir and thank you for sharing with us
@whiiiz9410
@whiiiz9410 2 жыл бұрын
Is it possible to enable WiFi using the DFROBOT ESP8266 WiFi Bee since we are already using the DF IO Shield instead of the recommended MakerFabs ESP8266 WIFI Shield?
@TomsTrainsandThings
@TomsTrainsandThings 2 жыл бұрын
Not with DCC++ but you might want to check into DCC++EX to see if that is one of the compatible wifi devices
@whiiiz9410
@whiiiz9410 2 жыл бұрын
@@TomsTrainsandThings Sorry I forgot to mention that I'm using DCC++EX but it's not on the official list. As I'm using an UNO hooked up to JMRI via USB and wanted to add both Sensors and Wi-Fi, hence my question. It's very hard to get the MakerFabs Wi-Fi shield so I wanted to check with you since you already have the DF IO shield before ordering the Mega and other shields. Thank you for replying on such an old post, really appreciated.
@SheltonDCruz
@SheltonDCruz 3 жыл бұрын
Thanks Tom!
@TomsTrainsandThings
@TomsTrainsandThings 3 жыл бұрын
You are welcome!
@joelvale3887
@joelvale3887 4 жыл бұрын
Welcome to the oldtimer's club.
@TomsTrainsandThings
@TomsTrainsandThings 4 жыл бұрын
Been in that club for a while!
@DudeFrom1972
@DudeFrom1972 4 жыл бұрын
Video request: How to install a decoder in a railwagon to operate a feature like internal light.
@FBMRR
@FBMRR 4 жыл бұрын
Yeahhhhhh..... hmmmmmmm..... but,... right... ???????????????? Ill catch on sooner or later.
@TomsTrainsandThings
@TomsTrainsandThings 4 жыл бұрын
Easy as NCE. lol
@westwonic
@westwonic 3 жыл бұрын
'Easily add...' seriously?
@TomsTrainsandThings
@TomsTrainsandThings 3 жыл бұрын
Just enter the numbers and it's there!
Easily Add Sensors & Outputs To DCC++ Part 2
11:30
Toms Trains and Things
Рет қаралды 6 М.
Using an Arduino Mega with CMRI For JMRI
31:54
Lawrence Eggering (Creaky Chair Models)
Рет қаралды 11 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29
When mom gets home, but you're in rollerblades.
00:40
Daniel LaBelle
Рет қаралды 127 МЛН
DCC Ex - Amazing Digital Controller for Under £50 😮
13:40
Little Wicket Railway
Рет қаралды 43 М.
Sensors - which one to use
17:06
Electronoobs
Рет қаралды 1,4 МЛН
How I Built A DCC++EX CS For My Train Room
17:50
Toms Trains and Things
Рет қаралды 15 М.
Arduino, CMRI and JMRI - Part 1 - Combined Sensors and Servos
13:43
Little Wicket Railway
Рет қаралды 28 М.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
062. Express Build A DCC-Ex Ex-CommandStation with Arduino Mega and Engine Driver.
22:15
Model Railroading with Bill Masters
Рет қаралды 1,3 М.
DCC Block Occupancy Detection in JMRI for £3 per sensor!!! 😮
11:01
Little Wicket Railway
Рет қаралды 32 М.
Model Railway Automation using EXRAIL from DCC-EX
15:50
Little Wicket Railway
Рет қаралды 7 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29