DCC++ Arduino Track voltage question - Page 2 - Model Train Forum - the complete model train resource
Model Train Forum - the complete model train resource

Go Back   Model Train Forum - the complete model train resource > Model Train Workshop > DCC Forum (Digital Command Control)
Forgotten your password?


Reply
 
Thread Tools Display Modes
Old 11-21-2018, 01:44 PM   #11
BrokeCurmudgeon
Dispatcher
 
BrokeCurmudgeon's Avatar
 
Join Date: Feb 2016
Location: Riverton Utah
Posts: 1,519
Scales Modeled: American Flyer S Scale and some N Scale with a maginfier glass
Shdwdrgn, I found out why I could nolt see your diagrams and posts from sourpuss.com. For some reason Malwarebytes flagged it as a threat. I had to have your site "White Listed" and now all is good.
Also, I am wondering why you need a reg 5vdc and if you have a source of inexpensive boards similar to what you are using.
And, I assume that you are using WIFI and a program like JMRI Decoder Plus to control. Can you elaborate more?
Thanks!
__________________
"Take my advice because I don't use it!"
Fred
BrokeCurmudgeon is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 11-21-2018, 11:25 PM   #12
Shdwdrgn
Dispatcher
 
Join Date: Dec 2014
Location: Longmont, Colorado
Posts: 1,901
I've actually opened up a ticket with Malwarebytes to try and get that cleared up. It appears they've been listing my domain as a source of malware for over a year! Ugh.

So the 5V regulator... I found this board on ebay for about $2.50. It will take up to a 24V input and provide a regulated 5V output of up to 5 amps, so if you plan on running a number of arduinos this could be an easy way to get power to them all from your track supply (which is what I'm doing).

As for the rest, it's actually pretty straightforward. The DCC++ESP32 program uses the current DCC++ code as its core, but adds wifi functionality and a small status display. The ESP32 is also capable of creating its own web server, so once you know the IP address of the controller you can browse to it with a desktop or cell phone, and it provides a web page that acts as a throttle, function controller, and turnout controller. I have not yet had to mess around with JMRI or any of the other programs because it's all built in (albeit the web interface doesn't scale well to a cell phone, but it's still a work in progress).

So my entire setup currently consists of the following... A 16.5V DC power supply, the 5V regulator, an ESP32 running DCC++ESP32, the BTS board to provide the AC signal to the track, a small solderless breadboard to hold the ESP, transistor, and resistors, and a 'nano strong' arduino board which contains headers to plug in servo motors directly. Finally I have a raspberry pi 3 set up as a wifi access point, so it creates its own private network that the ESP talks to, and can also accept connections from my cell phone and other devices, but in the future I also intend to have it running scripts that control the locos over wifi.

I recently designed a small circuit board that carries the 6n137 chip to decode DCC signals for an arduino. My next electronics project will be working on a small board that holds an ESP32 and all the support chips to read signals from both DCC and wifi, control the loco motor, provide an expandable interface for controlling lights and other features, and will have a micro-SD card to load sound effects on. Basically a full-featured loco decoder card, except I think I can build these for around $30. I'm hoping to have a couple of these board made and assembled by the end of this Winter, then I'll have to work on the software.

So yeah, a great big pile of DIY, but I'm working towards a fully-automated layout.
Shdwdrgn is online now   Reply With Quote
Old 11-25-2018, 07:54 PM   #13
BrokeCurmudgeon
Dispatcher
 
BrokeCurmudgeon's Avatar
 
Join Date: Feb 2016
Location: Riverton Utah
Posts: 1,519
Scales Modeled: American Flyer S Scale and some N Scale with a maginfier glass
Hopefully someone can answer this. I have JMRI and DCC++ working on my Raspberry Pi. I am using a Fundumoto motor shield. The perplexing question is why if I am powering the motor shield with 12.4 vdc but the output voltage on the motor output terminals reads 4.7 vac? Not enough for the engine motors.My understanding is it should be the same potential as the input. I was expecting to see something around 12vac. Any ideas?
__________________
"Take my advice because I don't use it!"
Fred
BrokeCurmudgeon is offline   Reply With Quote
 
Old 11-25-2018, 08:09 PM   #14
Shdwdrgn
Dispatcher
 
Join Date: Dec 2014
Location: Longmont, Colorado
Posts: 1,901
Limited experience with DCC troubleshooting here, but the first question that comes to mind is whether you are sure your meter reads true RMS? Mine claims to, then only reads 1.6VAC across my rails. I would assume you've actually tried a loco on the tracks to see if it will run?

If that all looks good except the loco runs slow (as expected for a 4.7V supply) then I would think this indicates that your power supply voltage is not being put to the tracks, but rather only the 5V source from the arduino... in which case it's going to come down to the specifics of your motor shield. Are there traces to cut to allow for a separate voltage source? Is there a set of jumpers to select the source? Since I've never used a shield I can only relay suggestions I have seen on the DCC++ board which were given to others, and of course this may be things you have already gone through and checked. Sorry I can't be of more help here.
Shdwdrgn is online now   Reply With Quote
Old 11-25-2018, 09:41 PM   #15
BrokeCurmudgeon
Dispatcher
 
BrokeCurmudgeon's Avatar
 
Join Date: Feb 2016
Location: Riverton Utah
Posts: 1,519
Scales Modeled: American Flyer S Scale and some N Scale with a maginfier glass
My meter sa7y it reads RMS. I read17.4 at my layout so I assume the meter reading is good. An engine on the RPi track just sits there with no response with 4.7vac. I don't have access to a O Scope so I don't know if I am even getting PCM at the test track. All reviews on this motyor shield are bad and there is a lack of documentation to boot! I am about to give up and buy another NEC PowerCab. The trouble is, I don't like to admit defeat. Maybe after a break, I will try a different motor controller.
__________________
"Take my advice because I don't use it!"
Fred
BrokeCurmudgeon is offline   Reply With Quote
Old 11-30-2018, 04:50 PM   #16
Rabman
Brakeman
 
Rabman's Avatar
 
Join Date: May 2018
Location: Toronto
Posts: 222
Scales Modeled: HO
I am using this motor shield with a 19 VDC Laptop power supply. It feeds in to a Buck Converter that steps the voltage down to 15VDc. Here are the amazon links of the Motor shield and buck converter.

I have operated 4 HO DCC locomotives at the same time with this setup.

https://www.amazon.ca/gp/product/B07...?ie=UTF8&psc=1

https://www.amazon.ca/gp/product/B07...?ie=UTF8&psc=1

I did bump up the setting in DCC++ for the short circuit cutout from 400 to something higher (about 1.5 amps I think), don't recall off hand. The motor shield hasn't burned out yet.
Rabman is offline   Reply With Quote
Old 11-02-2019, 07:58 PM   #17
train4fun
Hobo
 
Join Date: Dec 2018
Location: Clinton, MO.
Posts: 6
Scales Modeled: O Scale
Quote:
Originally Posted by Shdwdrgn View Post
I've actually opened up a ticket with Malwarebytes to try and get that cleared up. It appears they've been listing my domain as a source of malware for over a year! Ugh.

So the 5V regulator... I found this board on ebay for about $2.50. It will take up to a 24V input and provide a regulated 5V output of up to 5 amps, so if you plan on running a number of arduinos this could be an easy way to get power to them all from your track supply (which is what I'm doing).

As for the rest, it's actually pretty straightforward. The DCC++ESP32 program uses the current DCC++ code as its core, but adds wifi functionality and a small status display. The ESP32 is also capable of creating its own web server, so once you know the IP address of the controller you can browse to it with a desktop or cell phone, and it provides a web page that acts as a throttle, function controller, and turnout controller. I have not yet had to mess around with JMRI or any of the other programs because it's all built in (albeit the web interface doesn't scale well to a cell phone, but it's still a work in progress).

So my entire setup currently consists of the following... A 16.5V DC power supply, the 5V regulator, an ESP32 running DCC++ESP32, the BTS board to provide the AC signal to the track, a small solderless breadboard to hold the ESP, transistor, and resistors, and a 'nano strong' arduino board which contains headers to plug in servo motors directly. Finally I have a raspberry pi 3 set up as a wifi access point, so it creates its own private network that the ESP talks to, and can also accept connections from my cell phone and other devices, but in the future I also intend to have it running scripts that control the locos over wifi.

I recently designed a small circuit board that carries the 6n137 chip to decode DCC signals for an arduino. My next electronics project will be working on a small board that holds an ESP32 and all the support chips to read signals from both DCC and wifi, control the loco motor, provide an expandable interface for controlling lights and other features, and will have a micro-SD card to load sound effects on. Basically a full-featured loco decoder card, except I think I can build these for around $30. I'm hoping to have a couple of these board made and assembled by the end of this Winter, then I'll have to work on the software.

So yeah, a great big pile of DIY, but I'm working towards a fully-automated layout.
Do you happen to have a schematic or a sketch of this setup that you can share?
Thank you
train4fun is offline   Reply With Quote
Old 11-03-2019, 07:18 AM   #18
Severn
Engineer
 
Join Date: May 2016
Location: Annapolis, Maryland
Posts: 548
curmudgeon ... what do you mean you have dcc++ on a raspberry pi? surely you don't mean you ported the arduino base station code to some kind of Linux pi driver? I mean maybe that could work. even some kind of user level port perhaps could ... maybe... although with Linux in the way this all seems hard.
Severn is offline   Reply With Quote
Old 11-03-2019, 09:04 AM   #19
BrokeCurmudgeon
Dispatcher
 
BrokeCurmudgeon's Avatar
 
Join Date: Feb 2016
Location: Riverton Utah
Posts: 1,519
Scales Modeled: American Flyer S Scale and some N Scale with a maginfier glass
Quote:
Originally Posted by Severn View Post
curmudgeon ... what do you mean you have dcc++ on a raspberry pi? surely you don't mean you ported the arduino base station code to some kind of Linux pi driver? I mean maybe that could work. even some kind of user level port perhaps could ... maybe... although with Linux in the way this all seems hard.
Sorry I find it difficult to answer. Since I originally posted this my memory has slipped a bit. I will try to remember why I said that and respond but I have little hope...
__________________
"Take my advice because I don't use it!"
Fred
BrokeCurmudgeon is offline   Reply With Quote
Old 11-03-2019, 09:46 AM   #20
Severn
Engineer
 
Join Date: May 2016
Location: Annapolis, Maryland
Posts: 548
That's ok. I built the arduino dcc++ base station. I used the pololu motor control board. But I also have the pi version of the same board and a pi b.
Severn is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


» Visit These Sites:
LGB World

Or Our European Train Website ModelRailForum




All times are GMT -5. The time now is 03:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.