DCC-EX / Support-Planning

DCC++EX Repo to hold project planning documentation and processes
1 stars 1 forks source link

IBT_2 not reading CVs #669

Open fire-bot opened 2 months ago

fire-bot commented 2 months ago

Sent by Dirk Wetzel (@dalex1st). Created by fire.


Dear friends,

Thank you for publishing this nice project.

I have tried to implement the Arduino project in the variant for a garden railroad G scale with the two IBT_2 motor board (without external current sensor) following the replacing version from your website:

https://dcc-ex.com/reference/hardware/motorboards/IBT_2-motor-board-setup.html#gsc.tab=0

This also works wonderfully on Main. I can control the locomotive via your web-throttle and trigger the function keys.

Only on PROG it is not possible to read out the CV values at all. That's why I'm taking advantage of your offer to help.

IBT_2 is supplied with 24V / 4.2 A. The measured track voltage is approx. 0-25 V for both IBT_2s.

The locomotive decoder is a mXion Drive XL from a small German company.

https://micron-dynamics.de/sitecake-content/mXion%20DRIVE-XL.pdf

As there are no standard drivers for the combination with 2 IBT_2, I have configured my own drivers:

new MotorDriver(4, 5, 6, UNUSED_PIN, A5, 0.85, 4200, UNUSED_PIN), \

new MotorDriver(11, 12, 13, UNUSED_PIN, A4, 0.30, 1500, UNUSED_PIN)

I am admittedly an IT engineer, but not an electrical engineer, and perhaps I have completely misunderstood something. I would be very grateful for your support

Kind regards from Berlin

Dirk

Here are the logs for the call

<* LCD2:Power On *> <* Opcode=C params=0 *> <* LCD0:Retry 17 2 Sum=1 *> <* LCD0:Retry 17 1 Sum=2 *> Ack diag on <* ACK baseline=295/87mA Threshold=463/137mA Duration between 2000us and 20000us *> <* VB cv=19 value=0 *> <* NO-ACK after 145mS max=401/119mA pulse=0uS samples=117 gaps=0 *> <* VB cv=19 value=128 *> <* NO-ACK after 147mS max=331/98mA pulse=0uS samples=140 gaps=0 *> <* V0 cv=19 bit=7 *> <* NO-ACK after 144mS max=392/116mA pulse=0uS samples=71 gaps=0 *> <* V0 cv=19 bit=6 *> <* NO-ACK after 146mS max=387/114mA pulse=0uS samples=107 gaps=0 *> <* V0 cv=19 bit=5 *> <* NO-ACK after 144mS max=379/112mA pulse=0uS samples=70 gaps=0 *> <* V0 cv=19 bit=4 *> <* NO-ACK after 147mS max=379/112mA pulse=0uS samples=107 gaps=0 *> <* V0 cv=19 bit=3 *> <* NO-ACK after 145mS max=378/112mA pulse=0uS samples=106 gaps=0 *> <* V0 cv=19 bit=2 *> <* NO-ACK after 148mS max=384/114mA pulse=0uS samples=143 gaps=0 *> <* V0 cv=19 bit=1 *> <* NO-ACK after 147mS max=382/113mA pulse=0uS samples=106 gaps=0 *> <* V0 cv=19 bit=0 *> <* NO-ACK after 147mS max=383/113mA pulse=0uS samples=143 gaps=0 *> <* VB cv=19 value=255 *> <* NO-ACK after 142mS max=329/97mA pulse=0uS samples=33 gaps=0 *> <* V0 cv=29 bit=5 *> <* NO-ACK after 143mS max=327/97mA pulse=0uS samples=71 gaps=0 *> <* V0 cv=17 bit=6 *> <* NO-ACK after 146mS max=328/97mA pulse=0uS samples=107 gaps=0 *> <* V0 cv=17 bit=5 *> <* NO-ACK after 146mS max=394/116mA pulse=0uS samples=106 gaps=0 *> <* V0 cv=17 bit=4 *> <* NO-ACK after 147mS max=389/115mA pulse=0uS samples=142 gaps=0 *> <* V0 cv=17 bit=3 *> <* NO-ACK after 146mS max=384/114mA pulse=0uS samples=107 gaps=0 *> <* V0 cv=17 bit=2 *> <* NO-ACK after 147mS max=386/114mA pulse=0uS samples=142 gaps=0 *> <* V0 cv=17 bit=1 *> <* NO-ACK after 147mS max=384/114mA pulse=0uS samples=142 gaps=0 *> <* V0 cv=17 bit=0 *> <* NO-ACK after 151mS max=381/113mA pulse=0uS samples=178 gaps=0 *> <* VB cv=17 value=255 *> <* NO-ACK after 141mS max=329/97mA pulse=0uS samples=33 gaps=0 *> <* LCD0:Retry 17 2 Sum=3 *> <* ACK baseline=312/92mA Threshold=480/142mA Duration between 2000us and 20000us *> <* VB cv=19 value=0 *> <* NO-ACK after 146mS max=395/117mA pulse=0uS samples=146 gaps=0 *> <* VB cv=19 value=128 *> <* NO-ACK after 149mS max=329/97mA pulse=0uS samples=140 gaps=0 *> <* V0 cv=19 bit=7 *> <* NO-ACK after 143mS max=393/116mA pulse=0uS samples=70 gaps=0 *> <* V0 cv=19 bit=6 *> <* NO-ACK after 145mS max=389/115mA pulse=0uS samples=106 gaps=0 *> <* V0 cv=19 bit=5 *> <* NO-ACK after 145mS max=384/114mA pulse=0uS samples=70 gaps=0 *> <* V0 cv=19 bit=4 *> <* NO-ACK after 145mS max=385/114mA pulse=0uS samples=106 gaps=0 *> <* V0 cv=19 bit=3 *> <* NO-ACK after 145mS max=384/114mA pulse=0uS samples=106 gaps=0 *> <* V0 cv=19 bit=2 *> <* NO-ACK after 149mS max=379/112mA pulse=0uS samples=143 gaps=0 *> <* V0 cv=19 bit=1 *> <* NO-ACK after 145mS max=383/113mA pulse=0uS samples=105 gaps=0 *> <* V0 cv=19 bit=0 *> <* NO-ACK after 148mS max=387/114mA pulse=0uS samples=143 gaps=0 *> <* VB cv=19 value=255 *> <* NO-ACK after 142mS max=330/97mA pulse=0uS samples=32 gaps=0 *> <* V0 cv=29 bit=5 *> <* NO-ACK after 145mS max=395/117mA pulse=0uS samples=106 gaps=0 *> <* V0 cv=17 bit=7 *> <* NO-ACK after 143mS max=330/97mA pulse=0uS samples=71 gaps=0 *> <* V0 cv=17 bit=6 *> <* NO-ACK after 147mS max=329/97mA pulse=0uS samples=107 gaps=0 *> <* V0 cv=17 bit=5 *> <* NO-ACK after 145mS max=399/118mA pulse=0uS samples=107 gaps=0 *> <* V0 cv=17 bit=4 *> <* NO-ACK after 149mS max=391/116mA pulse=0uS samples=143 gaps=0 *> <* V0 cv=17 bit=3 *> <* NO-ACK after 146mS max=385/114mA pulse=0uS samples=106 gaps=0 *> <* V0 cv=17 bit=2 *> <* NO-ACK after 147mS max=388/115mA pulse=0uS samples=142 gaps=0 *> <* V0 cv=17 bit=1 *> <* NO-ACK after 148mS max=384/114mA pulse=0uS samples=142 gaps=0 *> <* V0 cv=17 bit=0 *> <* NO-ACK after 150mS max=384/114mA pulse=0uS samples=178 gaps=0 *> <* VB cv=17 value=255 *> <* NO-ACK after 142mS max=330/97mA pulse=0uS samples=34 gaps=0 *> <* Callback(-1) *>
Ash-4 commented 2 months ago

Have you calibrated current sensing? The current factors are much less than I have seen.

Regarding your diagnostics. Without making other changes, try this:

<1 PROG> https://dcc-ex.com/reference/tools/diagnostic-d-ack-command.html Adding a capacitor can help for CV reading. ![connShield_24_zener_circuit](https://github.com/DCC-EX/Support-Planning/assets/81280775/0bde800b-48a9-4c2a-b0bc-3c7652c93948)
habazut commented 2 months ago

The respose of the IBT2 current sense might be too weak. In that case a standard shield or the EX8874 shield should work. Programmig is fine at say 16V and does not use high current.

Harald.

dalex1st commented 2 months ago

@Ash-4 calibration with limit 15 does the trick. I never expected to have to go so low. Thank you very much! (15 was only fine for the steam generator, which has an own decoder, the main decoder actually works only with 8 as setting).

dalex1st commented 2 months ago

No, sorry, me again. Strage. The steam generator works fine with limit 8 or limit 15. The locomotive decoder (steam decoder unplugged meanwhile) can be only read by using limit 8. However, this does only work with the arduino serial monitor and not with the web throttle. Now I am totally confused. Is there any difference in addressing? The log seems to be more or less the same.

Ash-4 commented 2 months ago

You are getting closer. <D ACK LIMIT 15> or whatever - - it may be compensating for the current sense factor not having been calibrated. It can also be needed if you have a decoder/loco which draws low current when programming.

To calibrate current sense, you can use a resistance source, such as an appliance with a heating element to place a load on the track. I have an old clothes iron which measures 15 ohms, and when connected to the programming track outputs and using a 15V power supply, it should register 1A.

<1> to turn on power to all tracks `` for current readings -- use repeatedly to get a feel for the range of current readings as there is no averaging. irrc On the programming track, you can try to read the resistance load as if it had a decoder. ``` <1 PROG> ``` RE: driving loco Use to see the existing loco ID which can be used to drive the train on the MAIN track. <1 JOIN> can be used to test driving the train on the programming track. For further discussion, the discord server is better suited for working thru issues. https://discord.gg/PuPnNMp8Qf Note that some IBT_2 motor boards do not register zero as expected. With power on, and no load on the tracks (nothing connected), measure the voltage on the A0, A1 pins. And/or see what is being reported, by attempting to read like a decoder. If you do not understand what is reported with zero amps, your current sense factor will not be as useful. If 0A is not being reported as 0 volts on the A0, A1 pins, it needs to be taken into consideration in both the calculation of the current sense factor and the overcurrent trip limit. ![IBT_2_2400mA_current_sense](https://github.com/DCC-EX/Support-Planning/assets/81280775/c2a4890d-e2f2-4f82-9510-e1fc8d93c940) ![IBT_2_differences](https://github.com/DCC-EX/Support-Planning/assets/81280775/7e8c89a1-9f17-4485-a616-71ede0c0d192)