the only problem I have had with the ACS712 so far is getting a stable reading. I have a bunch of the 5A version of the boards. Please do post what you have figured out with these as more info is a good thing
Gentlemen, I have some notes on my web page about such sensors. My experience with the ACS712 has been disappointing, as well. See: http://www.trainelectronics.com/DCC_Arduino/Current_Sense/index.htm dave
Hmm.. good to know, thank you for that. as I am a stubborn experimenter, I will proceed with my experimentation, just to see if I get different results. but wouldn't you agree that a "standardized" current sensor of some sort would help? that way somebody could use any MD they wanted, as long as it was compatible. but current sensing is important, as it is used for reading CV's. I just refuse to think "inside the box". ~Travis
something I thought of Dave, have you considered a load resistor hidden in a box-car? it may raise the current enough for block detection. just a thought I had as my coffee kicks in. ~Travis
Hi all, I have the best experience with this detection principle: http://www.fucik.name/masinky/zv/#DETECT It is cheap, simple, reliable, safe.
didn't know they existed, thanks for that. not sure I follow the schematic. why are there full-bridge rectifiers that are only connected on two sides? ~Travis
Look better: the other diagonal of the bridge is short-connected, so that the bridge creates voltage drop around 1.4 V for both polarities of the supplying current. I was surprised how small current can be detected this way (of course, depends on the optocoupler sensitivity).
Well, I got DCC++ to drive my loco, but it has no current sense. through diagnosis, I established my ACS712 module is dead. happens sometimes with ebay. I already have a couple 5A ones on order, so maybe those will work better. I haven't tried my second ACS712-30A yet, but I am browsing for ideas right now. looking for a reliable current sensor. Dave, on your page you linked to in reply #1462, I see you had a coil sensor. AC I assume? do you think one of those would work well for a universal track current sensor, and still be able to read CVs? I am basically looking for a universal solution that will work with any MD board. I am pleased that I can drive my loco now, though I discovered my headlight LED was wired incorrectly, as I seem to have stupidly reversed the polarity. though as I still don't have suitable track yet, I just clipped test leads to the pickup wires of my loco. I don't want to play around with CVs yet until I get the current sense situated. still waiting for my new MD boards to come before I finalize anything yet. ~Travis
Travis - the coils do a great job of detecting DCC current - keep in mind that DCC is really AC, not DC If you read over the web page you will see that I used them to detect when a trolley entered an isolated part of track so that the DCC controller would stop & reverse the trolley - an easy point-to-point dave
Yes, I was aware DCC is AC. the measuring I was doing was on the high-side of the DC power entering the MD board. I found the page interesting, but I am wondering how to apply them to sense the track current with analog output. I have never used current coils before, with the exception of the one built into my clamp multi-meter. ~Travis
i know they are not the same thing, but I bought a couple of these to play with. http://www.ebay.com/itm/5A-SCT-013-...-Split-Core-Current-Transformer-/141906861845 I am still wrapping my head around how to use them though. I know one end clips over one of the DCC++ track wires, but I am not sure how to interface it with the Arduino ADC. ~Travis
while I await delivery of my various current sensors to come from China, I was browsing the nmra.org page, and found this: http://www.nmra.org/sites/default/files/s-9.3.2_2012_12_10.pdf in particular, page 6. it shows what I believe to be a detector of the decoder read-back signal. if I understand it correctly, it uses a shunt resistor and two comparators to produce a digital signal. this is interesting as DCC++ detects with a analog signal, and uses software to decode it. I am not saying either way is right or wrong, but I just found it to be interesting. ~Travis
I tinkered a bit with the code. Made some parts which are not essential for me to only compile conditional (#define EESTORE #define NOSHOWCONFIG). Then I reduced the RAM footprint of the refresh register by 5 bytes per register. So now with more than 500 bytes free, I could set MAX_MAIN_REGISTERS to approx 40 on the UNO. That will give me the possibility to refresh funcons s well in the future. The speedTable and regMap will probably be the next "big" datastructures that will have to go in the slimming process. A snapshot is at http://www.stacken.kth.se/~haba/slamra/dcc/dcc++/BaseStation-20160907.tar.gz Forgive me that I'm not doing the GIT dance yet, but if this is of interrest, I could convert this to seperate pull requests and so on. Harald.
Well, I found (and bought) this power supply. http://www.ebay.com/itm/272274974670 it is 18Vdc @ 20A. should be enough for lots of accessories pulling from track power, such as Arduino DCC stationary decoders. ~Travis
Travis - a word of caution - make sure you fuse that output with something under 20 amps! That is more than enough power to do some welding! dave
Yes, thank you for the reminder, as the thought didn't actually cross my mind. I will fuse the main track for 15A and the programming for 2A. I was under the assumption that the over current in the programming would take care of it, but you are absolutely right. it would still weld before triggering the shutdown. ~Travis
Revision on my last message: I think it would be better to have a large fuse for the track power to the motor drivers, but to also have 5A fuses (or less) for every track feeder per block, as the track itself does not need that much current, but the accessories may. I will just put fuse blocks around the front edge of the layout for ease of access. ~Travis
Hi, I have a question, to be honest, I'm looking for help, I hope this is the correct thread. I'm using a Mega running a slightly modified DCCpp_Uno sketch and a shield, everything is working fine, I have my control console with 4 pots, 4 direction switches and 4 emergency stop buttons. The Walthers GP9 loco came with its decoder already installed and works ok. When throttling forward, it turns its headlight according to how I programmed it in JMRI (Mars effect). Then I have a spare decoder still not installed in the (still analog) F7. It was identified by JMRI as a "Bachmann 2-function decoder (36-552)". Now, in the Lights tab, the only option is Headlight Dimming Intensity (0-255) and Headlight Dimmed by (Always Dim - F1..F8). Somehow I managed to make the light turn on (measuring the positive common and headlight wire voltage) when running forward. But that works from JMRI interface (a throttle) and if the Light button in the throttle window was pressed. If I just send <t1 loconumber speed 1> from the Arduino, the light wont't turn on, as if some DCC command is missing. I tried with DCC traffic monitor window in JMRI but nothing changes when pressing the Light button in the JMRI throttle window. The Arduino and JMRI are running at the same time, if the Light button in JMRI throttle remains pressed, then the light will turn on when using my throttle (a potentiometer read by the Mega), but if I get rid of the JMRI interface, the light will never turn on. As said, only a few options in Lights tab for this decoder; instead, in the GP9 there is a Digitrax DZ123PS and there are many options, like Mars effect and Forward Light FOF behaviour. So, in short, what do I have to do from my Arduino for turning the EZ Command 2-function decoder headlight on? Thanks! Robert