hsanjuan / dccpi

A simple, easy to use, NMRA Digital Command Control (DCC) Python implementation for Raspberry Pi
GNU General Public License v3.0
54 stars 13 forks source link

How to test all the connections are correct? #3

Open Jim-etatech opened 8 years ago

Jim-etatech commented 8 years ago

I follow all the components connected to the drawings, run the program, but it did not work.

How can I test the connection is correct? Or my part is correct. I am a newbie.

hsanjuan commented 8 years ago

Hi,

to do proper testing you need a multimeter and very possibly an oscilloscope (one like http://www.seeedstudio.com/depot/dso-quad-4-channel-digital-storage-oscilloscope-p-736.html or similar works).

First check that you DC source is providing the right Volts and that the cables related are correctly connected. Then check that your RPi is running correctly, that the program is running, that there are 5V coming out of the RPi too. Make sure that all GND lines (for DC and Rpi) are wired so the ground is the same for all components.

Then with the oscilloscope, you can check that the RPi pin13 is producing the track signal (this one oscillates from 0 to 3.3v). Finally, you can do the same with the bridge output which oscillates between -18v and 18v.

One last note, some old analog tracks have a small [ceramic] capacitor in the segment where electricity is wired to the tracks, which is meant to smooth analog input to the track. This needs to be removed as it effectively breaks the digital signal on the tracks.

Good luck!

Jim-etatech commented 8 years ago

Thank you for your answer.

I found the cause of the problem, wrong wiring. Locomotive has now responded. However, the emergence of new problems in the Raspberry Pi does not start when the power is turned on LMD18200 locomotive will always go forward. After starting the program dccpi track is not powered. After conntrol start, Naruto locomotive will go back, and not continuous. # 3 address, unable to control locomotives. I am using a Raspberry Pi 3 Model B, the chip using LMD18201T. thanks for your help.

JasonRichey commented 7 years ago

It would be great if someone were willing to post a picture of their working setup... One question I have is regarding the colors on the schematic. Does red/green have significance? Should I be putting pull-up/down resistors accordingly?

hsanjuan commented 7 years ago

Hi @JasonRichey. No, colors don't have any significance. I can post some pics of my board next week.

hsanjuan commented 7 years ago

Hi,

@JasonRichey here are some pictures as promised: https://github.com/hsanjuan/dccpi/blob/master/prototype.jpg

I have fixed the diagram colors too, among a bunch of other things. Note that in the pictures there are resistors and a voltage regulator (LM7805). Those are not needed, they were just an attempt to power the Raspberry Pi from the 24v input to that board.

@Jim-etatech I am not sure what's your problem. Works for me with my Raspberry Pi 2 Model B. Maybe try the latest version.