Can ya help me NOT throw 250$ into the trash? Circuit repair help request.!



  • Duane DegnDuane Degn Posts: 10,262
    edited 2020-08-24 - 08:28:11
    Clock Loop wrote: »
    Like I mentioned, a rfid tag system would make adding "zones" to your layout as cheap as a pair of tags, one for the entry of the zone, and one for the exit,

    There are lots of inexpensive RFID options. I wrote a driver for the MFRC522 MIFARE 13.56MHz RFID Readers. Besides the normal credit card size targets, they also sell small key fob targets. These things are really inexpensive.

    I don't think an inexpensive RFID tag could be read from within a train car when the tag is under the track. I won't promise, but I'll try to break out some of my track and test this in the next few days.

    Besides RFID, you could also use an IR signal with a tube to limit the area it covers. A small IR receiver could pick up the data from the IR transmitter. I don't think it would be very hard to limit the broadcast area of an IR transmitter. I think IR would be easier to use for this application than RFID but I'm not sure about this.

  • There are several threads about the nRF24L01+ modules here's one which has some of my code in it. Follow the link in my signature for some more info on these modules.
  • So far I have:

    Motor Driver for the engines motors. Gonna have to heat sink that one. I own a northwoods logger engine made by bachmann.
    Dual Motor Driver MC33926 $29.99

    RFID reader/writer $49.99

    RFID 25 mm Disk Tag x 50 = $61.50 (25 zones)

    Single Relay Board (for the smoke generator in the engine) $9.99

    Propeller Activity Board WX $79.00 (i already own one of these) (and it has an audio jack for the engine sounds plus a SD card slot for the wave file storage)

    Parallax WX ESP8266 WiFi Module - DIP $24.99 (i already own one of these) I can make a website on the esp to display all the engine controls.

    Total: 255.46
    (about the same price as JUST the DCS240 device that I am trying to REPAIR, )
    which died in less than 2 seconds after making the mistake of driving a engine onto the programming track.
    (not even including the fried decoder and sound decoder)

    I would have included a LED pack but parallax is getting out of the led business? lol. I have tons of smt rgb leds from my Mimms Mirror projects.

    The parallax lipo battery is only 3.7v so I would need to get 4 of them in series them to get 14.8v or 5 to get 18.5v.
    And they only have 1 lipo battery charger left, so that can't be added to the list,,

    Track DC power seems the best way to go. I suppose I could try to find an old laptop power supply if it has enough amperage.
    I can also just use my digitrax PS2012 power supply to power the tracks.

    What else....

    A wireless tablet to access the esp webpage. (already have this)

    The esp devices aren't the greatest for reliable connection though....

    Hey, those are some hellla cheap RFID devices, the MIFARE ones, duane! Nice!

    How reliable are the NORDIC devices? Im guessing their range is the same or better than esp8266's?

    I really do like rfid for zone detection, I should try one out.. Since I am outside, I like that the tag is passive since it will sit on the GROUND, in the elements...
    I could probably mount the reader under the tender but the parallax ones are kinda large..

    If I cannot do passive zone detection with rfid, I would be forced to go back to track zoning. (its easy to run outdoor sealed solid copper wire under the track)
    Using IR not so good with outdoor sun.
  • Clock Loop wrote: »
    From what I understand, right to repair, and the laws that protect Hayes manuals (complete tear down and documenting of cars).
    Posting this pcb teardown and documentation is legal, due to the right to do product reviews, repair, and the like,,, am I right?

    I am doing nothing with the firmware, nor will it be posted or disassembled, basically this circuit is useless without the firmware.
    If I understand correctly, is encrypted and the encryption is custom to each chip. (so if i were to replace the pic, the firmware wouldn't work due to fuses not set?)

    I don't want to step on any toes here, in posting this information due to my need for help with this repair.

    In the meanwhile, I took a break from the analysis of the pcb.
    I installed some LGB rail brush cleaners on my caboose, I had to trim a little bit of plastic to fit it in between the frame of the bachmann northwoods logger caboose.
    It now fits perfectly, the spring loaded pads have up and down play still. I won't run with them all the time... just when needed.

    G-scale is much easier to work with.

    A lot of the right to repair is country specific. As far as I know, you could do whatever you wanted to your device. Of course you may have agreed to not reverse engineer and a whole lot of other restrictions just by your use of the product. You can not extract their code, modify and redistribute it without running afoul of copyright laws etc. Right to repair is an area that is a pain in the @$$ in the medical equipment field. In the US, the manufacturer of a device must provide certain information regarding Assembly, Install, Adjustment and Test (AIAT) under 21CFR1020.30 but only if it emits ionizing radiation, so it will not apply to any device such as MRI, Ultrasound, etc. Only X-ray and CT (xray based) system.

    Right to repair is a misnomer. It should rightly be referred to as right to obstruct owners and third parties ability to repair devices they have purchased from a manufacturer. While I won't name names here, some manufactureres are worse than others and one in particular which has made being in violation of the FDA AIAT regulations an art form. But this is only one area for this subject. In the case of the medical imaging devices a significant part of the revenue stream over time comes from repair of systems. Whether T&M or as they would prefer, contracts. Some will offer drastic discounts on the devices knowing the service revenue will make up for it. For other companies, the idea is to just sell you another device, and no parts or docs will be available. Pain to maintain a library and give access, have to keep and sell custom parts (which costs them in multiple ways). If the device is below some given pain threshold, you will simply buy the next version of the dead products line of succession while saying omni domni adios old device in the dustbin. Or depending on the device, they may be afraid of the liability of making repair materials available to someone who really should not be doing anything inside the device. Just because the materials are available doesn't mean someone can safely repair something. But an argument could be made that by providing the materials, an attempt was made by an unqualified person because said materials led them to think they could. (just a byproduct of the times I guess...)

  • The way I would do the ESP system is have the station set up a server and have all the locos contact like clients. Use TCP, but not necessarily HTTP. uPython on the ESP32 is nice and would be the perfect setup. I don’t know how one would inform the locos of the command stations IP address, though.
  • Oh thought on that! Host a network on the command station, while simultaneously signing on to your home network if you want it to do so for phone/tablet/laptop communication.
  • Duane DegnDuane Degn Posts: 10,262
    edited 2020-08-24 - 16:48:37
    Have you figured what sort of PCB you'll add to the train?

    These are my small boards of choice.


    I based my design on Jazzed's TetraProp.

    There are lots of great small Propeller PCB designs out there. If you're interested the board I made, I could share the Gerber files with you so you could make your own.
  • Clock LoopClock Loop Posts: 1,900
    edited 2020-08-24 - 19:29:11
    I would probably use the Propeller Activity board for a schematic and pcb reference when it comes to making a protoype pcb that included, a sd card slot, all the necessary propeller hardware, voltage regulator, fuse, etc...

    I have already worked with the esp devices when it comes to making them be able to upload a program to the prop chip wirelessly, so that is similar to programming CV's in decoders.

    The activity board also has a MCP6004 ic on it for audio, I am not sure if this can push a 8ohm, 1/2 watt speaker.

    I do not know about the MCP6004's capabilities so I might need to choose a different chip for the speaker if it can't handle a 1/2 watt speaker at 8 ohm.

    The esp device can just be given a static IP by any wifi router, i can just use a dedicated one for the railroad,
    NOT connected to the internet, then security isn't any issue.

    Now I just need to see if RFID tags can be reliably read from under the track and sleepers.
    Ordering a motor board is needed, to get the engine rolling again.

    Unlike ALL the digitrax stuff, I DO plan to use circuit protection fuses, not just ones that are for FIRE prevention, AMAZING CONCEPT, I know..
    SUPER radical, clearly fuses have no use at all for the profiteers. ;)

    And naturally, why even use TVS devices?, i mean motors, pulsed current, audio, intermittent track connections..
    What could go wrong? Surely no high voltage spikes could ever occur with all this voltage and amperage flying around everywhere. (sigh)

    Does anyone even teach impulse, anymore?
    Cmon guys, get out those static generators and start hardening your crap!!!! (waves at Digitrax..)
    Take a cue from this guy!

    I worked at a location where 3 phase motion controllers were designed, and I helped pick, test and install, TVS diodes across the IGBT's
    And they worked EXCELLENTLY.

    During testing, forcing a motor to hit a dead stop, everyone in the office kept coming to my office room thinking I had died or gotten electrocuted by the 400v 100amp 3 phase power service, that I requested to be wired into my office.

    Nope, I am not dumb, my pc was ground isolated, so was all test equipment, the o-scope, etc... I used one hand, kept my feet off the floor, used heavily insulated boots without metal in the toes, etc...

    I just smiled, and said, TEST SUCCESSFUL, IGBT's fully functional, and only 3 of the 6 TVS diodes popped like firecrackers!
    TVS devices are like 0.10 CENTS a piece. IGBT's are like 8$ a piece, and usually take other parts out with them.
    The TVS devices didn't let any other IC get damaged. These things should be the LAW, lol.

    Trying to control that much stray voltage and amperage with a dead stopped 3 phase motor was super impossible, its inevitable that something would pop and so the tvs devices were made to be the sacrificial lamb.

    The boss didn't like that if a customer dead stopped their motor, they would hear a pop pop pop..
    Then I said, yea, but they will find that their motor drive still works, and if you install enough TVS devices, they can just keep working, at least untill they pop all of their TVS's and then they would just need to pay the shipping cost to get more installed, instead of 50$ in IGBT replacement, plus the OPTO isolator drivers for the igbts.

    But at least the IGBT PACK or the 6 discreet IGBT's survived fine, plus the opto drivers for them.

    Repeated tests showed this method to be very reliable for protection of sensitive IC's.
    The IGBT's also had freewheeling diodes built into them that were TOTALLY USELESS. (at least as far as protecting the igbt)

    With out the TVS diodes, the IGBTs would pop like a firecracker and throw pieces across my office.

    Thanks to the 2008 MELTDOWN, I no longer have that once in a lifetime opportunity job. (tenure priority SUCKS)
    I even lost my house over that one.
    Still haven't recovered, and no one cares, the banks got bailed out, and I got wiped out,.... and no one STILL cares.

    You can see in the picture, the board will not fit inside the G-scale tender WITH the 1/2 watt speaker installed, so during prototyping, I will need to remove the speaker and use a externally mounted one until a smaller pcb setup is made.
    1022 x 769 - 188K
  • Clock LoopClock Loop Posts: 1,900
    edited 2020-08-24 - 19:16:27
    A part of this project, or more like, the source project, was my other thread to do track DCC diagnostics.

    So I ordered a 68$ D&RGW Engineering car. Now I need to replace the plastic wheels with metal ones and give them electrical pickups.
    And then design some kind of battle hardened DCC / DC track diagnostic circuitry. (reference design, none other than the PROPSCOPE!!!!)

    So many projects, so little money and available space. Im pretty sure life is some kinda semi-tragic comic strip.
    I eat once a day, just so I can afford all my crazy projects, and its totally worth it. Who wants more toilet time? Not me!
    1024 x 768 - 182K
  • Clock Loop wrote: »
    Dual Motor Driver MC33926 $29.99

    I have several of the Dual MC33926 boards and they seem to work fine. Do you have two motors you need to control with a single board. There are single MC33926 boards out there if you only need one h-bridge.

    The single MC33926 boards have an advantage of requiring few I/O pins to control. The dual board share the "reverse" pins between the two h-bridges which limits their usefulness.
    Clock Loop wrote: »
    How reliable are the NORDIC devices? Im guessing their range is the same or better than esp8266's?
    This depends a lot on which modules are being used.

    iforce2d has done some range testing with these modules. Here's a video of him attempting 14km transmission. I think he has other range test videos on his channel.

    I found two of the cheap modules would communicate just fine from any two locations in our home as long as there wasn't a major appliance between the two radios. The refrigerator, oven and water heater would block the signal but nothing else in the house seemed to present a problem.

  • Duane Degn wrote: »
    Clock Loop wrote: »
    Dual Motor Driver MC33926 $29.99

    I have several of the Dual MC33926 boards and they seem to work fine. Do you have two motors you need to control with a single board. There are single MC33926 boards out there if you only need one h-bridge.

    The single MC33926 boards have an advantage of requiring few I/O pins to control. The dual board share the "reverse" pins between the two h-bridges which limits their usefulness.

    My current steam engine has a single motor, but many of the G-scale engines have dual motors in them. I could just use Two MC33926 seperate pcb boards, and this might be better so they can be mounted near the engines top housing, kept apart they can have their own heatsink that can sit below the fan holes or fans that most engines have at the top.

    Many engines have their own control pcb's but I would probably order used engines that don't have them or have basic DC only stuff that would be ripped out.

    And even if they have nice electrics, I would REALLY like to be able to roll my own, with my own custom sounds, lights, effects, etc...
    Thats tons of FUN! I guess I could use the dual boards and just make one of the h-bridges push a DC fan... since that would be needed, but i don't think most dc fans like more than 12v, so the dual boards actually might not be so good, they probably have tied power inputs. (the motors need around 14-16v) (sometimes even more if you want to go fast)
  • For what it's worth, the last version of LEGO track to have metal rails had track spaced about 37.8mm apart. According to Google, your g-scale track is spaced at 45mm. I think this is close enough that a lot of the electronics developed for one scale will likely work for the other.

    Of course LEGO train cars are made from LEGO bricks so there's likely not nearly as much room for electronics as the g-scale trains.

    IIRC, the LEGO trains controlled the speed by varying the voltage to the track. With a radio controlled train, I'd just leave the power on full and let the onboard electronics regulate the speed.
  • If you want a really tiny prop board, take a look at my P8XBlade2 - link in my signature

    Keep an eye out for the new mems speaker ics to hit the market. No moving coils so really tiny!
  • Cluso99 wrote: »
    If you want a really tiny prop board, take a look at my P8XBlade2 - link in my signature

    Keep an eye out for the new mems speaker ics to hit the market. No moving coils so really tiny!

    Hey, that pcb has a sd card reader on it, nice.

    Im not sure if the overclock would be a good idea inside a g-scale train engine tho, those heat up quite a bit, when you run them in the sun, do you think that would matter?

    Thanks for the tip on the mems speaker ICs, now i need to look into mems speakers and the ics for them.

    For now I will probably just order the parallax motor board, and some rfid readers + tags, and protoype with my activity board plus esp8266 wifi, im not sure about the rfid though, as many tags say 2 inch read distance not 3.

    I have the typical box of junk electronics, and many old pc speakers that i can change out the huge speaker in the tender with in the mean time, while I am using the huge activity board pcb.

    Pics will be posted.
  • Cluso99Cluso99 Posts: 16,570
    edited 2020-08-25 - 06:18:02
    Overclocking the P1 doesn't hurt. Chip underrated the P1 a lot. I could always build them with 10MHz xtals or there is provision to use a 5MHz watch can using the provided vias. But there is no need for this.

    The mems speaker chips are really new - they have only just been announced. Not sure what will be inside those chips but likely and amplifier at least. The manufacturing process is the same as normal ICs, just like they use for mems gyros, accelerometers, etc. Up until now, all speakers including headphones used moving coils and these are gone with mems.
    See well down the page in this article

    There seems to be some confusion as there are speakers that are claimed to be mems but seem to be just a speaker added to a silicon wafer.
  • Clock LoopClock Loop Posts: 1,900
    edited 2020-08-25 - 13:22:39
    I like those current specs, very low. I wonder how loud they are.

    HEY! HOLD MY (root)BEER!

    Im going to do something revolutionary, unheard of, radical, crazy, stupid, anti-profiteering, and just down right insane.... using some of these parts on my circuits and pcb's.

    2423 x 1300 - 716K
  • Is that to make sure you clamp those railway spikes?
  • Clock LoopClock Loop Posts: 1,900
    edited 2020-08-25 - 13:17:30
    Is that to make sure you clamp those railway spikes?


    Actually, I do need to order the proper rated TVS for my rail and motor voltage (plus 1 volt) (so a TVS around 17 - 20v or so).
    Some of those will work for the 3.3v and 5v supplies (logic).
    And 1 amp won't cut it, (perhaps for logic supplies and the like it will, but I will need to get some 5amp for the motor drive.

    If I ever repair the dcs240 I will be installing a handful of tvs in strategic locations.
    The programming circuit isn't supposed to draw more than 1 amp, (i think much less actually)(based on NMRA DCC specs, if I read it right.
    So i could put a few 1 amp fuses between the PA and PB connectors and the rest of the circuitry.

    Those PNP and NPN transistors in the programming circuit that went up in smoke, were only rated for 1A and 600ma.
    That would have probably saved most of the pcb, and only killed the first set of 22ohm resistors if even them.

    That PA and PB programming circuit could have actually used 1/2 amp fuses for sure.
    Even slow-blow 1/2amp fuses would have been an option if initial powerup of decoders were an issue.
    IMO, that is just blatant neglect to not include them, they know people mistakenly bridge the main rail to the programming rail, all the time,
    That's clearly planned future servicing business income.

    But I almost don't even care to repair it anymore, their transponder system totally sucks smoke stack.

    If I can't get wireless plus rfid to work for what I want, then its back to making a custom DCC system and a custom Transponding system.
  • Clock LoopClock Loop Posts: 1,900
    edited 2020-08-25 - 16:39:42
    Hmm, I might just bring my rail voltage up to 18v... i need to look into that.

    My PS2012 power supply has 3 voltage settings.
    The ‘G’ setting configures the supply to output 23 volts at 12 amps max.
    The ‘HO’ setting configures the supply to output 18 volts at 15 amps max.
    The ‘N’ setting configures the supply to output 13.8 volts at 20 amps max.

    I will have to plan for multiple voltages and test how all work with the motor IC I choose.

    Ok I looked at the NMRA guidelines on rail voltages and the above settings by DIGITRAX's PS2012 ARE ALL WRONG.

    The baseline method for providing the power to operate locomotives and accessories, 
    which shall be supported by all Digital Command Stations and Digital Decoders, 
    is by full-wave rectification of the bipolar NMRA digital signal within the Digital Decoder
    7. In order to maintain power to the Digital Decoders, gaps in bit transmission are only allowed at specified times (see S-9.2, Section C).  
    The RMS value of NMRA digital signal, measured at the track, shall not exceed by more than 2 volts
    8 the voltage specified in 55 standard S9 for the applicable scale
    9.  In no case should the peak amplitude of the command control signal exceed +/- 22 volts.  
    The minimum peak value of the NMRA digital signal needed to provide power to the decoder shall be +/-7 volts 
    measured at the track.Digital Decoders intended for "N" and smaller scales shall be designed to withstand 
    a DC voltage of at least 24 volts as measured at the track.  
    Digital Decoders intended for scales larger than "N" shall be designed to withstand a DC voltage of at least 27 volts as measured at the track. 

    This site shows more detail.
    This section picks up where the S-9 DC standard left off.   
    All this section says is the DCC track voltage is to be no more than 2V higher 
    than the DC track voltage to compensate for the voltage drop in the decoder for the given scale.
    The calculated typical DCC voltages are actually shown in Section C's voltage graphs 
    plot lines showing the typical voltage for each scale.  You can read the typical DCC track voltage from the graph. 
     It is the same in both the booster and decoder graphs.
    So for the scales shown:
    Large Scale = 16VDC + 2V = 18V DCC.
    HO & O = 12VDC + 2V => 14V DCC.  
    N scale = 10VDC + 2V => 12V DCC.

    I would go by the above suggestions. Those voltages are NOT what the digitrax PS2012 puts out.

    So my initial suggestion of 16V DC (my raw track voltage with NO dcc, was pretty good for G-SCALE motors.)

    Do you all, have any comments on RAIL VOLTAGES?
  • Clock Loop wrote: »
    Do you all, have any comments on RAIL VOLTAGES?

    24V is really common in the industrial world. Is there are reason not use 24V?
    If not 24V I'd think 12V would be the next common voltage to use. I think 12V usually means it can be as high as 15V (as in when a battery charges).

    Of course the higher the voltage, the lower the current needed to drive the motors.

    It sure seems like 24V is relatively safe. I just touched my 24 supply and couldn't feel anything. This is with dry skin. I'm not sure if an outdoor (and exposed) 24V system is considered safe or not.
  • Yes, 12V and 24V systems are common. Laptops seemed to mostly be ~19V but I don’t know why 19V was chosen, probably just to be different.
  • Clock LoopClock Loop Posts: 1,900
    edited 2020-08-25 - 23:58:35
    24v would technically be 2 volt ABOVE the max NMRA standard.
     In no case should the peak amplitude of the command control signal exceed +/- 22 volts. 

    If you purchase any model railroad engine, the engines are usually 18v and below for g-scale (dcc)...
    14v for HO (dcc) etc...

    I would really suggest sticking to the DCC standard.
    (yes I did ask for opinion, but going outside the standard will expose any engine to excessive motor voltage)
    Or you will need to down regulate the track voltage, which wastes power, and generates extra heat from regulators.

    The way most motor drives in dcc do it, is they run the motor at the voltage of the track DCC or DC.

    I ran my g-scale engine on the nscale and HO scale voltages and it worked fine. It still ran fast at max speeds.

    I wonder if the HO scale voltages would be best, because if someone were to make custom hardware, it could likely be easily adjusted to a bit higher and a bit lower depending on needs.

    So basically 14v. Do you guys think this would be an issue? I think HO would be a great target scale for all the electronics due to HO being the most common scale in the world, and HO is large enough to fit most reasonabe size pcb's into the engine without cursing about how the shell won't go back on.
    Large Scale = 16VDC + 2V = 18V DCC.
    HO & O = 12VDC + 2V => 14V DCC.  
    N scale = 10VDC + 2V => 12V DCC.
  • While I am awaiting the motor ic to arrive...

    I can now recompile the ESP8266 wx code so the interface page is my engine controller.

    Time to revisit this page and get a linux ESP compiler running again. Oh great what changed in the code, and what problems will I encounter..... can't wait to see.
  • Do they refer to the rail voltage? This is going to be around 1.2V-2.2V above the motor voltage because you have 2 rectification diodes in the path and they classically drop 0.6-1.1V each.

    Initially why not start with a 19V (typically around 3-4A) laptop supply? Plenty of these available (surplus etc) although they have different DC connectors so you would need to change these.

    So here is an idea...

    Use 19V laptop supplies. For a larger track layout, you would need multiple of these. Build a Booster that has a CAN interface on one side, a Booster (we would call it an H driver), and a splitter to drive a number of track sections, each with a detector (current sensor).

    Now you have a fully expandable DCC driver, controlled by CAN. Want a larger track, just add a power supply and box as required. Apart from the CAN connection, and AC power, each group is self-contained. If you don't want to use CAN, then you could use WiFi, or both as optional alternatives. This block is the most complex from a hardware point of view, and it could be common for all sets giving economies of scale.

    Next you build a CAN or WiFi controller to drive all the track groups. The CAN/WiFi controller can be controlled via USB from a laptop or RPi, or from a P2, or anything else really.
  • I don't understand what this problem with track voltage is all about since DC motors benefit from higher voltages with PWM, and track resistance becomes less of a problem too. I'm not sure from what you have been saying whether or not you are still using DCC signal but even if you used 22V max, the extra voltage with local PWM will benefit any of the motors. What am I missing?
  • Clock LoopClock Loop Posts: 1,900
    edited 2020-08-26 - 21:46:38
    I don't understand what this problem with track voltage is all about

    If you want to conform to NMRA DCC standards,

    Cluso99 wrote: »
    Do they refer to the rail voltage? This is going to be around 1.2V-2.2V above the motor voltage because you have 2 rectification diodes in the path and they classically drop 0.6-1.1V each.

    They do refer to DCC rail voltage.
    Large Scale = 16VDC + 2V = 18V DCC.
    HO & O = 12VDC + 2V => 14V DCC.  
    N scale = 10VDC + 2V => 12V DCC.

    From my experience with N scale model railroad DCC decoders, and motors, they didn't like high voltages (above 14 or so), I would run into issues, motors burning out, encoders burning out, leds burning out that were connected to the decoders... Yea, I used the proper resistor for the led too. It still burnt out the headlight output on the decoder after a while.

    So for backward compatibility, and to be safe with 3rd party decoders, I would use the HO & O = 12VDC + 2V => 14V DCC, track voltage.

    If you will never use a 3rd party decoder and don't care about NMRA standards, have at it, you could use a track voltage of MUCH.
Sign In or Register to comment.