Arduino uno and pololu motor shield Not reading loco

jfcastiglia Oct 18, 2018

  1. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4
    Here is what I have going on Arduino UNO and Pololu motor shield JMRI running on a raz PI. All seems well track power turns off and on by using the buttons inside of JMRI. When I set my train on the track and turn track power on it starts moving I get movement and sound when I try to see if I can program the loco in JMRI gives me an error no acknowledge from locomotive (308) I get the same using my MacBook instead of the raz pi.

    I Have checked my pins and soldering I get 3.99v on the track moves my Bachmann loco nicely lol just no control lol N Gauge set up.

    Any insight would be greatly appreciated.
     
  2. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    You need to go into JMRI under Preferences, defaults and check to see if the DCC++ options are all checked, especially being ablbe to program. JMRI sometimes goes back to "INTERNAL" on installs and updates.
    This has been an ongoing issue with JMRI and easy to forget that your defaults may change.
     
  3. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4
    Yes I have double checked that and it all checks out and set to dcc++ :(


    Sent from my iPhone using Tapatalk
     
  4. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Does the power shut off if you briefly short the track out?

    Make sure any locos are removed from the track first, and then switch the track power on. Shorting the track for no longer than about 1 - 2 seconds should cause the track power to switch off and stay off. If it doesn't then it suggests that your current sensing circuitry or pin assignments are incorrect. This would also explain why you don't get data readings back from the loco.
     
  5. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4

    I will check that tonight when I get home tonight!!!

    Thank you!!


    Sent from my iPhone using Tapatalk
     
  6. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    Are you trying to read CV's on the main track or the program track?
     
  7. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4

    I have tried both


    Sent from my iPhone using Tapatalk
     
  8. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4


    So when I do this the shield shuts down power to the track led notifier on the shield turns off. Inside jmri the power switch stays on does not switch to off. Track power is restored once I turn the track power off and back on again using the Throttle that’s inside of JMRI


    Sent from my iPhone using Tapatalk
     
  9. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    That's odd. It seems like the dcc base station is detecting the over current and shutting off, but JMRI isn't receiving the overload message. I don't use JMRI, but I think you can monitor serial data that it receives. Does that monitor windiw show anything when you short the power?
     
  10. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4

    I will try look at that here in a in a bit!

    Thank you




    Sent from my iPhone using Tapatalk
     
  11. Pieter

    Pieter TrainBoard Member

    152
    46
    10
    Have you selected the right shield when programming the Uno? Setting is in Config h. Also for n scale your power input should around 12 to 14 V which should give you 1 to 2 V AC less than your input. Check if you have cut through your traces. Apparently the traces on the Pololu is quite thick.
     
  12. NScaleKen

    NScaleKen Permanently dispatched

    157
    128
    5
    Same setup as you for the most part, arduino Uno and Pololu motor shield, running on windows though. I have had JMRI not change the power button in the interface when the track shorts out and the Arduino/Pololu shut off the track power. I am interested in the cause as well. I have had some decoders read and others refuse to be read, but will be written to. The later is a pain but JMRI will remember the CV entries in a roster loco and one can rewrite them and change them OK, its workable. I am not sure what is going on there. 2 Digitrax decoders for a Kato P42s read OK, 3 TCS for a Kato AC4400cw and ES44AC do not read but will take a write and allow changing of ID, speed tables, etc. Digitrax for a micro trains SW1500 will not read. I have 3 unreadable locos speed matched for consists by just ignoring that I can't read them and writing the CV's as needed. Not sure any of that helps, just more data on the same hardware, hopefully it adds to thought process and resolution.
     
  13. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Okay, so the failure for JMRI to see the power overload may be a problem with JMRI itself. It does look as though your current sensing hardware is ok though.

    N-Gauge locos generally draw less current, which could be why you can't successfully read the CVs.

    You could try tweaking the value of ACK_SAMPLE_THRESHOLD which is in PacketRegister.h The default value is 30, apparently 15 or even less might be a good value to try.

    Also see this post:
    http://www.trainboard.com/highball/...e-but-not-alike-problems.116315/#post-1052960
     
    NScaleKen likes this.
  14. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4
    I do have the correct shield selected and I have checked my traces now the odd part is that with an ohm meter all traces show that they are cut as long as no pins are plugged in on top once I plug in the jumper from 5 to 8 trace 10 shows some connection with my meter. Take that jumper off and it goes back to no connection that’s with the shield not installed onto the uno.




    Sent from my iPhone using Tapatalk
     
  15. NScaleKen

    NScaleKen Permanently dispatched

    157
    128
    5
    Jimbo20 I think you're onto something, the decoders that I can read are sound decoders with a much higher draw, the ones I cannot are non sound decoders.

    Also I am getting a false short cut off from the power draw when I try to power up my layout with 2 of the sound equipped decoders trying to do startup sound routines, I have to remove them, start the main power, then place them one at a time on the track.

    I am starting to think JMRI or DCC++ or both have issues with decoders and power that makes some very hard to read.

    Will try to set the correct CV to have them start muted as a first step. Will look into the packet threshold setting as well. Huge list to do, my layout wiring is in parts and pieces right now so not sure when I can test.
     
  16. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4

    Changed the threshold down to 5 now when I search I get,

    Mfg 255 Version 255 no such manufacture defined

    That happens with both locos I have.

    [​IMG]


    Sent from my iPhone using Tapatalk
     
  17. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    What did you get when the setting was the default of 30?
     
  18. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    As well as the ACK_SAMPLE_THRESHOLD value that is to do with the Data reading (CV) software, there is also CURRENT_SAMPLE_MAX - which is the current overload trigger setting.

    By default this is set to 300, which equates to about 800mA. I guess it is quite possible that two sound decoders if powered up together may briefly exceed this current, and cause the overload cutout.

    You could increase this, the value is multiplied by 2.66 to give the cutout current in mA, so for example setting it to 752 would give a overload cutout of 752 x 2.66 or 2000mA (2 Amps) and is the maximum current that the standard Arduino motor driver board can safely provide. This is providing of course that your PSU can supply the 2 amps without it overloading itself!
     
  19. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    4

    I get the no acknowledgment from locomotive (308)


    Sent from my iPhone using Tapatalk
     
  20. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Then I would try settings somewhere between 5 & 30, Hopefully there will be a 'sweet spot' where it works.
     

Share This Page