Closed conaito closed 3 years ago
Hi. I am yet to decide what buttons do, so now the buttons don't do much. BT1 sends a LocoNet message about sensor change for debugging purposes and prints LocoNet statistics (packets sent/received/lost) on Serial. BT2 turns track power on/off.
As for CV programming, that should be straightforward.
Other software that supports LocoNet command stations (Rocrail?) might work, but I have not tried.
Here is screenshot of connection window on my setup
thx! i will try that. In that way.. is it also possible to add a ~15v transformator instead of a 12V DC? Anyway 12V is max. supported?
Did you also test a Booster attached? Am 1. Nov. 2021, 17:06 +0100 schrieb Paul Melnikov @.***>:
Hi. I am yet to decide what buttons do, so now the buttons don't do much. BT1 sends a LocoNet message about sensor change for debugging purposes and prints LocoNet statistics (packets sent/received/lost) on Serial. BT2 turns track power on/off. As for CV programming, that should be straightforward.
• Power up the board, wait for it to connect to your WiFi. (Upon first launch and when it cannot connect, it will use WiFiManager library to create an AP called "ESP32CommandStation AP". Access it with your phone to set ESSID and password of your WiFi). • Launch JMRI and create a connection to CS, select LocoNet over TCP, DCS52 as Command interface and enter the IP address of the board (if it does not work, you might try putting "esp32server.local". Beware that a correct IP will definitely work, while mDNS might not work at all, depending on your OS, router and other stuff). Ensure that JMRI connects to CS correctly. • then use usual programming interface of JMRI to read/write CVs (Whether you chose paged/bit/byte mode does not seem to matter).
Other software that supports LocoNet command stations (Rocrail?) might work, but I have not tried. Here is screenshot of connection window on my setup — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
AC transformer will definitely not work. DC voltage only. 15V DC should work, though you might want to add a radiator to 7805, it is hot to touch already.
I don't have a booster, but 3rd LocoNet jack should provide DCC signal for a LocoNet booster (the jack is labeled BOOSTER)
Ok thx. Today i have try the Uhlenbrock Hand control Daisy 2. Plugged into the Loconet and it also starts but nothing more.. i can´t control or use it. Any idea why? Its a Loconet Hand control and should work. :(
Am Di., 2. Nov. 2021 um 12:37 Uhr schrieb Paul Melnikov < @.***>:
AC transformer will definitely not work. DC voltage only. 15V DC should work, though you might want to add a radiator to 7805, it is hot to touch already.
I don't have a booster, but 3rd LocoNet jack should provide DCC signal for a LocoNet booster (the jack is labeled BOOSTER)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-957358563, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILF6WIDSIFURYLLSBGLUJ7EQTANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi. Sorry, I've no idea what that throttle should do and why it doesn't. Most probably it does not receive the response it wants. What might help you is connecting to the ESP32 via USB, opening Serial monitor and looking at LocoNet messages that the station receives. But you need to understand what they mean. Also if you post them here, I might help. Hope the throttle does not require some proprietary vendor-locked messages to be sent.
Also, the best way to decypher a proper way to communicate with the throttle is to connect it to a working command station (e.g. Digitrax one?) and dump all the LocoNet communucation to study.
Hm.. i monitor serial (also plugged DC12V). If i plug the throttle into it does nothing view on the serial console. May i must turn on any function into the code? I soldered the back side byself with components (only backside).. may its possible that i solder something wrong there? If you think its possible can you view me a image from yours to double check it?
Am Mi., 3. Nov. 2021 um 05:55 Uhr schrieb Paul Melnikov < @.***>:
Hi. Sorry, I've no idea what that throttle should do and why it doesn't. Most probably it does not receive the response it wants. What might help you is connecting to the ESP32 via USB, opening Serial monitor and looking at LocoNet messages that the station receives. But you need to understand what they mean. Also if you post them here, I might help. Hope the throttle does not require some proprietary vendor-locked messages to be sent.
Also, the best way to decypher a proper way to communicate with the throttle is to connect it to a working command station (e.g. Digitrax one?) and dump all the LocoNet communucation to study.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-958655259, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILCRBVWOFQO4WWYIS7DUKC6ELANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi. You started this thread by stating that the board works well. Can you elaborate on what exactly works well? Because if you soldered components only on back side, there most probably is something missing that prevents the board from functioning properly. DCC components are on top side, power components are on both sides (3.3V regulator on bottom, 5V regulator and caps on top) and LocoNet components are on both sides.
Here is my board. It has minimal set of components for DCC and LocoNet to work.
On my first tests i used Engine Driver and Locomotive drive. So i was think it works all well. On my board both sides soldered complete with components but only the backside i soldered byself :) I just be worry to may soldered the U2 LM317 in wrong direction to the board since it was the only i not be sure in which rotation i have to solder it. How can i be sure its correct soldered?
Am Mi., 3. Nov. 2021 um 18:40 Uhr schrieb Paul Melnikov < @.***>:
Here is my board. It has minimal set of components for DCC and LovoNet to work. [image: IMG_20211104_002132] https://user-images.githubusercontent.com/2095278/140162907-734bd440-6e5f-4731-8393-3c8863610a2a.jpg [image: IMG_20211104_002159] https://user-images.githubusercontent.com/2095278/140162926-642b31f3-2aa4-4a1d-a496-5fd1362891b8.jpg
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-959769282, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILAA2NVHBSWU6XTT263UKFXYJANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Also i see you have briged the jumper on LNPU.. is that required to may get it work?
Am Do., 4. Nov. 2021 um 12:45 Uhr schrieb MicroSquad FPV < @.***>:
On my first tests i used Engine Driver and Locomotive drive. So i was think it works all well. On my board both sides soldered complete with components but only the backside i soldered byself :) I just be worry to may soldered the U2 LM317 in wrong direction to the board since it was the only i not be sure in which rotation i have to solder it. How can i be sure its correct soldered?
Am Mi., 3. Nov. 2021 um 18:40 Uhr schrieb Paul Melnikov < @.***>:
Here is my board. It has minimal set of components for DCC and LovoNet to work. [image: IMG_20211104_002132] https://user-images.githubusercontent.com/2095278/140162907-734bd440-6e5f-4731-8393-3c8863610a2a.jpg [image: IMG_20211104_002159] https://user-images.githubusercontent.com/2095278/140162926-642b31f3-2aa4-4a1d-a496-5fd1362891b8.jpg
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-959769282, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILAA2NVHBSWU6XTT263UKFXYJANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
After double check datasheet i found VCC is correct of the LM317 (U2).. so this can´t be the issue. What about the briged LNPU (Pullup).. is it required? If i add a Loconet Device to the socket must be there any serial debug viewing? Or must i tun on into code something ??
Am Do., 4. Nov. 2021 um 12:53 Uhr schrieb MicroSquad FPV < @.***>:
Also i see you have briged the jumper on LNPU.. is that required to may get it work?
Am Do., 4. Nov. 2021 um 12:45 Uhr schrieb MicroSquad FPV < @.***>:
On my first tests i used Engine Driver and Locomotive drive. So i was think it works all well. On my board both sides soldered complete with components but only the backside i soldered byself :) I just be worry to may soldered the U2 LM317 in wrong direction to the board since it was the only i not be sure in which rotation i have to solder it. How can i be sure its correct soldered?
Am Mi., 3. Nov. 2021 um 18:40 Uhr schrieb Paul Melnikov < @.***>:
Here is my board. It has minimal set of components for DCC and LovoNet to work. [image: IMG_20211104_002132] https://user-images.githubusercontent.com/2095278/140162907-734bd440-6e5f-4731-8393-3c8863610a2a.jpg [image: IMG_20211104_002159] https://user-images.githubusercontent.com/2095278/140162926-642b31f3-2aa4-4a1d-a496-5fd1362891b8.jpg
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-959769282, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILAA2NVHBSWU6XTT263UKFXYJANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Good to know that the soldering is correct!
Yes, pullup is essential for LocoNet bus to work. One pullup (which is usually provided by a command station) is needed to drive the bus voltage high, neither decoders nor throttles drive the bus high during communication, only low. LM317 is what is doing the pullup on the board, so it must be present, as well as the jumper.
LocoNet messages should be dumped to Serial without changing the code. One reason you don't see anything (and one reason the throttle does not work) is the lack of pullup.
BTW, concerning the booster. For the booster to work you need to close smd jumpers JD1 and JD2 on the bottom, they connect DCC signal to the 3rd LocoNet jack.
1) Can you please check if the Lm317 are correct soldered? (image attached)
2)on the jumpers you mentioned i soldered components as the design mentioned. thats correct? (because you say bridge it on booster usage)
3) The Loconet LED shine always currently on my board (no pullup jumper set yet) Am 4. Nov. 2021, 15:54 +0100 schrieb Paul Melnikov @.***>:
Good to know that the soldering is correct! Yes, pullup is essential for LocoNet bus to work. One pullup (which is usually provided by a command station) is needed to drive the bus voltage high, neither decoders nor throttles drive the bus high during communication, only low. LM317 is what is doing the pullup on the board, so it must be present, as well as the jumper. LocoNet messages should be dumped to Serial without changing the code. One reason you don't see anything (and one reason the throttle does not work) is the lack of pullup. BTW, concerning the booster. For the booster to work you need to close smd jumpers JD1 and JD2 on the bottom, they connect DCC signal to the 3rd LocoNet jack. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
1) you forgot to attach the image. But on the silkscreen the first pin is marked with a dot. Just check in the datasheet how 1st pin of the the IC is marked (it's either a dot etched near it or a bevel along one of the edges).
2) Yes, that's correct
3) This is expected when there is no pullup. When the bus is functioning, the LED only shines when there is activity on the bus. When there is no pullup, the LED shines constantly. Same is true for my decoders.
Well, i soldered yesterday night another new board :)) Now, set the pull up jumper loconet looks like working as you described. RED LED is works as you described. I think now its a good start.
Hand Control.. as soon i plug the hand control inside i get a reboot of command stadion. It repeat 3 times or so then i see error on display of the hand controller. Thats the serial output i get:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8 Ultimate LocoNet Command Station WM: [1] AutoConnect WM: [2] ESP32 event handler enabled WM: [2] Connecting as wifi client... WM: [3] STA static IP: WM: [2] setSTAConfig static ip not set, skipping WM: [1] Connecting to SAVED AP: XXX WM: [3] Using Password: XXX WM: [3] WiFi_enableSTA enable WM: [3] Mode after delay: STA WM: [1] connectTimeout not set, ESP waitForConnectResult... WM: [2] Connection result: WL_CONNECTED WM: [3] lastconxresult: WL_CONNECTED WM: [1] AutoConnect: SUCCESS WM: [1] STA IP Address: 192.168.188.23
WiFi connected. IP address: 192.168.188.23 [I][DCC.h:158] setPower(): setPower(1) [I][DCC.h:158] setPower(): setPower(1) *WM: [3] unloading onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception) Debug exception reason: Stack canary watchpoint triggered (LocoNetPhy) Core 1 register dump: PC : 0x4008cf43 PS : 0x00060036 A0 : 0x4008c92a A1 : 0x3ffb84e0 A2 : 0x3ffb8550 A3 : 0xb33fffff A4 : 0x00000035 A5 : 0x3ffbfe30 A6 : 0x3ffc2598 A7 : 0x00000001 A8 : 0x0000000e A9 : 0x4008ca18 A10 : 0x00000029 A11 : 0x00000000 A12 : 0x40087710 A13 : 0x3ffbfe10 A14 : 0x00000aaa A15 : 0x3ffb8ae0 SAR : 0x00000016 EXCCAUSE: 0x00000001 EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffff2
ELF file SHA256: 0000000000000000
Backtrace: 0x4008cf43:0x3ffb84e0 0x4008c927:0x3ffb8544
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8 Ultimate LocoNet Command Station WM: [1] AutoConnect WM: [2] ESP32 event handler enabled WM: [2] Connecting as wifi client... WM: [3] STA static IP: WM: [2] setSTAConfig static ip not set, skipping WM: [1] Connecting to SAVED AP: XXX WM: [3] Using Password: XXX WM: [3] WiFi_enableSTA enable onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 WM: [3] Mode after delay: STA WM: [1] connectTimeout not set, ESP waitForConnectResult... onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 WM: [2] Connection result: WL_CONNECTED WM: [3] lastconxresult: WL_CONNECTED WM: [1] AutoConnect: SUCCESS WM: [1] STA IP Address: 192.168.188.23
WiFi connected. IP address: 192.168.188.23 [I][DCC.h:158] setPower(): setPower(1) [I][DCC.h:158] setPower(): setPower(1) *WM: [3] unloading onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception) Debug exception reason: Stack canary watchpoint triggered (LocoNetPhy) Core 1 register dump: PC : 0x4008ca0c PS : 0x00060936 A0 : 0x40087710 A1 : 0x3ffb8530 A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000 A6 : 0x00000000 A7 : 0x00000001 A8 : 0x00000000 A9 : 0x00000001 A10 : 0x3ffb8600 A11 : 0x3ffb8aae A12 : 0x000000ff A13 : 0x0000ff00 A14 : 0x00000036 A15 : 0xff000000 SAR : 0x00000004 EXCCAUSE: 0x00000001 EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffff2
ELF file SHA256: 0000000000000000
Backtrace: 0x4008ca0c:0x3ffb8530 0x4008770d:0x3ffb8900 0x40108c5a:0x3ffb8990 0x400e6052:0x3ffb89d0 0x400d6ca3:0x3ffb8a70 0x400e508d:0x3ffb8b00 0x400e55f1:0x3ffb8b30 0x400e562d:0x3ffb8b50 0x401665c9:0x3ffb8b70 0x400d2f2a:0x3ffb8b90 0x400d32b7:0x3ffb8be0 0x400d32d1:0x3ffb8c20 0x401665c9:0x3ffb8c40 0x400e4ff1:0x3ffb8c60 0x400e59f2:0x3ffb8c80 0x400e5a01:0x3ffb8cb0 0x4008a332:0x3ffb8cd0
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8 Ultimate LocoNet Command Station WM: [1] AutoConnect WM: [2] ESP32 event handler enabled WM: [2] Connecting as wifi client... WM: [3] STA static IP: WM: [2] setSTAConfig static ip not set, skipping WM: [1] Connecting to SAVED AP: XXX WM: [3] Using Password: XXX WM: [3] WiFi_enableSTA enable WM: [3] Mode after delay: STA WM: [1] connectTimeout not set, ESP waitForConnectResult... onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 WM: [2] Connection result: WL_CONNECTED WM: [3] lastconxresult: WL_CONNECTED WM: [1] AutoConnect: SUCCESS WM: [1] STA IP Address: 192.168.188.23
WiFi connected. IP address: 192.168.188.23 [I][DCC.h:158] setPower(): setPower(1) [I][DCC.h:158] setPower(): setPower(1) *WM: [3] unloading onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception) Debug exception reason: Stack canary watchpoint triggered (LocoNetPhy) Core 1 register dump: PC : 0x400876f5 PS : 0x00060f36 A0 : 0x00060f30 A1 : 0x3ffb8570 A2 : 0x3ffb8a78 A3 : 0x3f406de0 A4 : 0x0000000a A5 : 0x3ffbfe60 A6 : 0x400d6d18 A7 : 0x3ffb8b30 A8 : 0x00000000 A9 : 0x3ffb8b30 A10 : 0x3ffc29a0 A11 : 0x3ffb8bac A12 : 0x80088d11 A13 : 0x3ffbfe30 A14 : 0x3ffc2598 A15 : 0x00000001 SAR : 0x00000004 EXCCAUSE: 0x00000001 EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffd
ELF file SHA256: 0000000000000000
Backtrace: 0x400876f5:0x3ffb8570 0x00060f2d:0x3ffb8650 0x4010644e:0x3ffb8680 0x40102e86:0x3ffb8990 0x400e4fa9:0x3ffb8a50 0x400d6c98:0x3ffb8a70 0x400e508d:0x3ffb8b00 0x400e55f1:0x3ffb8b30 0x400e562d:0x3ffb8b50 0x401665c9:0x3ffb8b70 0x400d2f2a:0x3ffb8b90 0x400d32b7:0x3ffb8be0 0x400d32d1:0x3ffb8c20 0x401665c9:0x3ffb8c40 0x400e4ff1:0x3ffb8c60 0x400e59f2:0x3ffb8c80 0x400e5a01:0x3ffb8cb0 0x4008a332:0x3ffb8cd0
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8 Ultimate LocoNet Command Station WM: [1] AutoConnect WM: [2] ESP32 event handler enabled WM: [2] Connecting as wifi client... WM: [3] STA static IP: WM: [2] setSTAConfig static ip not set, skipping WM: [1] Connecting to SAVED AP: XXX WM: [3] Using Password: XXX WM: [3] WiFi_enableSTA enable onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception) Debug exception reason: Stack canary watchpoint triggered (LocoNetPhy) Core 1 register dump: PC : 0x4008ca0c PS : 0x00060f36 A0 : 0x40087710 A1 : 0x3ffb8530 A2 : 0x00000001 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x3f402286 A6 : 0x00000036 A7 : 0x00000001 A8 : 0x3ffb8600 A9 : 0x00000000 A10 : 0x00000000 A11 : 0x3ffb8900 A12 : 0x00000036 A13 : 0x00000010 A14 : 0x00000036 A15 : 0x3ffb8824 SAR : 0x00000004 EXCCAUSE: 0x00000001 EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffff2
ELF file SHA256: 0000000000000000
Backtrace: 0x4008ca0c:0x3ffb8530 0x4008770d:0x3ffb8900 0x40108c5a:0x3ffb8990 0x400e6052:0x3ffb89d0 0x400d6ca3:0x3ffb8a70 0x400e508d:0x3ffb8b00 0x400e55f1:0x3ffb8b30 0x400e562d:0x3ffb8b50 0x401665c9:0x3ffb8b70 0x400d2f2a:0x3ffb8b90 0x400d32b7:0x3ffb8be0 0x400d32d1:0x3ffb8c20 0x401665c9:0x3ffb8c40 0x400e4ff1:0x3ffb8c60 0x400e59f2:0x3ffb8c80 0x400e5a01:0x3ffb8cb0 0x4008a332:0x3ffb8cd0
Rebooting... ets Jun 8 2016 00:22:57
Anyway thank you for your great support!
Am Fr., 5. Nov. 2021 um 07:01 Uhr schrieb Paul Melnikov < @.***>:
1.
you forgot to attach the image. But on the silkscreen the first pin is marked with a dot. Just check in the datasheet how 1st pin of the the IC is marked (it's either a dot etched near it or a bevel along one of the edges). 2.
Yes, that's correct 3.
This is expected when there is no pullup. When the bus is functioning, the LED only shines when there is activity on the bus. When there is no pullup, the LED shines constantly. Same is true for my decoders.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-961647404, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILE5XYSAOPUP344SSWTUKNXMNANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Good that you've attached the logs and the stacktrace, I'll be able to look into it soon.
Great! In this way.. i played a bit with Engine Driver and found out that if i not make anything for a while (lets say 5 minutes) the it looks like the connection lost (or lost the locomotive slot?).. then the throttle activity make nothing (only after set again the Address of locomotive). I also tested it with another WiThrottle device.. same here. Any idea here?
Am Fr., 5. Nov. 2021 um 12:03 Uhr schrieb Paul Melnikov < @.***>:
Good that you've attached the logs and the stacktrace, I'll be able to look into it soon.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-961802901, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILBELJNSSKWHGJ5R4WDUKO2YDANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Concerning JD1 and JD2. The components on the schematic are 0 Ohm resistors, so they are basically same as solder bridges.
Concerning EngineDriver - could you create another issue for that, to keep things separate?
You might want to try an updated version to see if your throttle now works.
will do as first on monday! nice Am 5. Nov. 2021, 16:25 +0100 schrieb Paul Melnikov @.***>:
You might want to try an updated version to see if your throttle now works. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
I tested today the updated code. Now the remote starts but seems to be still a problem. After some seconds it view me a error on the remote. Here the serial output:
WiFi connected. IP address: 192.168.188.23 [I][DCC.h:158] setPower(): setPower(1) [I][DCC.h:158] setPower(): setPower(1) [I][WiThrottle.cpp:91] begin(): WiThrottleServer::begin *WM: [3] unloading onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10
Am Fr., 5. Nov. 2021 um 20:44 Uhr schrieb MicroSquad FPV < @.***>:
will do as first on monday! nice Am 5. Nov. 2021, 16:25 +0100 schrieb Paul Melnikov < @.***>:
You might want to try an updated version to see if your throttle now works.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-961989200, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILER5RHOVPLUXJ7A2ALUKPZQJANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Well, the good news are that the command station does not crash anymore. The bad news are that the logs provided don't tell what needs fixing. The throttle just does not accept the answer to OPC_LOCO_ADR and sends it over and over again (receiving the same answer). I'm afraid I cannot do anything in this situation unless you figure out somehow what the throttle expects.
main.cpp:23
to something else, e.g. 19, which is a LED2).id1(0),id2(0)
to id1(10),id2(10)
in LocoNetSlotManager.h:31
). Also you can play with ss2 value on the same line, e.g. set it to 8 or 16, the standard is pretty gibberish here and I am wild-guessing.I have make the step with sniffer as you mentioned and got follow serial output. Can you see how we can fix it?
[I][DCC.h:158] setPower(): setPower(1) [I][WiThrottle.cpp:91] begin(): WiThrottleServer::begin *WM: [3] unloading onPacket: LOCO_ADR(BF) 00 03 43 [I][LocoNetSlotManager.cpp:120] processMessage(): OPC_LOCO_ADR for addr 3, found slot 1 [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=23(Idle) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 23 03 00 20 07 00 00 00 00 00 10 onPacket: SL_RD_DATA(E7) 0E 01 12 03 00 00 07 00 00 00 00 00 01 onPacket: IMM_PACKET(ED) 0F 01 49 42 0D 00 03 00 00 00 00 00 00 19 onPacket: MOVE_SLOTS(BA) 01 01 45 [I][LocoNetSlotManager.cpp:129] processMessage(): OPC_MOVE_SLOTS NULL MOVE for slot 1 [I][CommandStation.h:182] setLocoSlotRefresh(): slot 1 refresh Y [I][LocoNetSlotManager.cpp:223] sendSlotData(): Sending slot 1: ADDR=3 STAT=33(In-Use) ID=0000 onPacket: SL_RD_DATA(E7) 0E 01 33 03 00 20 07 00 00 00 00 00 00 onPacket: SL_RD_DATA(E7) 0E 01 32 03 00 00 07 00 00 00 00 00 21 onPacket: LOCO_SPD(A0) 01 02 5C
Am So., 7. Nov. 2021 um 13:23 Uhr schrieb Paul Melnikov < @.***>:
Well, the good news are that the command station does not crash anymore. The bad news are that the logs provided don't tell what needs fixing. The throttle just does not accept the answer to OPC_LOCO_ADR and sends it over and over again (receiving the same answer). I'm afraid I cannot do anything in this situation unless you figure out somehow what the throttle expects.
- The best case is if you have access to a working LocoNet command station. Then you can connect the throttle, the working CS and our ESP32 CS together, and reprogram ESP32 CS to work as a sniffer and only dump LocoNet messages to Serial and not send any messages to the bus. (The quickest way to do that seems to change LOCONET_PIN_TX in main.cpp to something else, e.g. 19, which is a LED2).
- Otherwise you can just change the CS's response randomly and check if the throttle will accept it. For example, you can change the ID field to non-zero value (i.e. change id1(0),id2(0) to id1(10),id2(10) in LocoNetSlotManager.h:31 ). Also you can play with ss2 value on the same line, e.g. set it to 8 or 16, the standard is pretty gibberish here and I am wild-guessing.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/positron96/LocoNetControlStation/issues/8#issuecomment-962601222, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRDILFXZAIH53MRDKRI6RTUKZVTNANCNFSM5HACVS5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Ok, the only difference I see in the first SL_RD_DATA response is different slot status (IDLE instead of COMMON), speed steps (128 steps vs 14 steps) and direction (Fwd vs Rwd). To check if this is the cause, you can change LocoNetSlotManager.cpp
, starting from line 78 to something like that:
const CommandStation::LocoData &d = CS.getSlotData(slot);
uint32_t fns = d.fn.value<uint32_t>();
sd.stat = speedMode2int(SM::S14);
if(d.refreshing) sd.stat |= STAT1_SL_ACTIVE;
sd.adr = addrLo(d.addr);
sd.spd = d.speed;
sd.dirf = d.dir == 0 ? DIRF_DIR : 0;
sd.dirf |= fn15swap(fns);
sd.adr2 = addrHi(d.addr);
sd.snd = (fns & 0b111100000)>>5;
(2 lines changed) With this you can check if the throttle moves further in negotiating with ESP32. Don't forget to revert LOCONET_PIN_TX.
Ah, one more thing to check is to see whether the ESP32 can actually send anything to the bus (this would explain throttle resending the same command). Can you check that? Or have you seen the devices on the bus successfully receive LocoNet data from the ESP32? (maybe try to control a LocoNet switch decoder from EngineDriver).
I tested code change as explained but no changes. Now as last i attached another Loconet Sniffer to the command station (LRJ1) and as it looks there is no outgoing loconet messages on the ports (try both). Oh.. so it looks like may thats the problem. I tested it with engine driver and simple played with switches from there. On serial i see there are process some loconet messages but on attached (LRJ1) Loconet Sniffer nothing comes on. Any idea how it can be fixed?? :(
First let's rule out the hardware issues. Write a Blink sketch that toggles LOCONET_PIN_TX (i.e. 17) high and low. Does L_ACT LED shine accordingly (on when low, off when high)? If no, there is a problem with tx circuitry, i.e. LR7, LQ1, LR8. What are those components on your board? Are they functional? You also can take a multimeter and check that the tracks on the PCB connect what should be connected.
Does the ESP32 pin work? Extract Lolin32 from the motherboard, connect a LED with resistor to tx pin and run that blink sketch. Does the LED blink? (If no, then the pin is broken) If yes, then flash the command station program again, connect EngineDriver to it and try to control some switches. The LED should blink when the packet is being sent.
Oh.. can you may give me the Blink sketch? i not be very familar with it. With multimeter.. what exactly should i measure? (which tracks as example) Sorry to bother you with it but i really want to get it work. I wait a long time to can get this board :)
here another image of the U2 (there is no dot as you can see but a line.. ). is that correct?
LR8 looks suspicious. Could you measure its resistance? Should be 47 Ohm, but the marking seems to show it's 47000.
U2 seems fine.
Blink sketch is from examples of Arduino IDE. Something in the line of this:
void setup() {
pinMode(17, OUTPUT);
}
void loop() {
digitalWrite(17, HIGH);
delay(1000);
digitalWrite(17, LOW);
delay(1000);
}
I also check the Part list from your drawing (on LCSC part C253468) on LR8 and as i think to see is its 47k
Yep, here is an error. It should be 47 Ohm (the multimeter shows 47K, as is the BOM). The BOM is wrong and that needs to be fixed on my side. Sorry about that.
You need to replace that resistor. 47k is way too large for it to pull the bus down when transmitting.
Oh :/ I checked my stock but at this moment i just have 10 or 100 ohm resistors here.. may one of them is ok too for tests?
100 should be fine. Also, stacking 2 100 Ohms on top of one another in parallel will give you 50 Ohm.
i just replaced it with a 100 ohm and now it works with the sniffer as well with throtte :D I hope 100 ohm is ok because its not a SMD part (normal bigger one) and space is a bit limited to not catch other contacts. Or must it be better 50ohm? i made also some tests with throttle and engine driver... as i see it not really update each other? Only what i see is that if i do some switch actions on engine driver the loconet throttle view me changed switches. In other direction it does not update the engine driver? also locomtives driving as well not?
Glad it started to work! I think the bus will tolerate 100 Ohm quite fine.
EngineDriver updates are not implemented in the firmware and I don't know whether WiThrttole protocol allows pushing data to phone without it asking. Need to check if JMRI it does it. Have you seen EngineDriver picking up actions from other throttles?
Also, could you explain the question about locomotives?
I updated now as you mentioned to stacked 100ohm to 50ohm.. cool :) Its the first time that i play as well with WiThrottle like EngineDriver. So i not have see any others until yet. I was think EngineDriver should as well see Loconet switch changes...
Same on Locomotives.. if i drive with my Loconet Throttle i was think that EngineDriver should also updated (speed as example). Seems to be not.. not in both directions (Loconet Throttle <> EngineDriver Throttle).. should it not?
I see. Need to check if it at all possible and if it's implemented in JMRI, which is my kind-of reference implementation of things. As for driving the locomotives, the whole concept of LocoNet slots is that only one throttle can allocate a slot for a particular locomotive at given time. That includes an EngineDriver throttle as well. It's done so that noone can easily steal another one's locomotive. Hence I don't think two throttles can be connected to one locomotive and one throttle can be updated with data from another. Well, It seems possible for LocoNet throttle and EngineDriver to control same locomotive in the current firmware, but the system was not designed for that.
Meanwhile, can you tell me about your PCBA ordering experience? How expensive/long was it? There are components on the board that are sold in packages of, like, 50, as I remeber. Did you pay for the whole 50 or just the required amount? Did they solder one a and sent the remaining 49 to you?
Any news here?
Ordering boards was simple. Only harm that they only offered only one side soldering service. components was just per board, not any more as you say. there was several emails with questions regarding of position but waa easy to fix so far. prices strongly depends on amount of boards. 1 or 2 are not a good idea.
can you tell me how much ampere the command station can handle without booster? also for what are the 3 pins (+ - etc) in near of pullup ?
What are the real limits of the station, such as locomotives, turnouts etc it can handle stable?
Any idea when you have turnout roster complete? Am 10. Nov. 2021, 06:48 +0100 schrieb Paul Melnikov @.***>:
I see. Need to check if it at all possible and if it's implemented in JMRI, which is my kind-of reference implementation of things. As for driving the locomotives, the whole concept of LocoNet slots is that only one throttle can allocate a slot for a particular locomotive at given time. That includes an EngineDriver throttle as well. It's done so that noone can easily steal another one's locomotive. Hence I don't think two throttles can be connected to one locomotive and one throttle can be updated with data from another (It seems possible for LocoNet throttle and EngineDriver to control same locomotive in the current firmware, but the system was not designed for that). Meanwhile, can you tell me about your PCBA ordering experience? How expensive/long was it? There are components on the board that are sold in packages of, like, 50, as I remeber. Did you pay for the whole 50 or just the required amount? Did they solder one a and sent the remaining 49 to you? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
L298N is rated for 2A continuous per channel, but a radiator must be mounted to pass this much current (the chip will get hot if run at this current for long. Actually, it will get pretty hot long before that. 1 or 2 locomotives will probably run fine without radiator, anything more will need a radiator). Peak current is 3A, but current sensing in the firmware should cut off power at around 2A.
There are maximum 10 slots for locomotive in the firmware, but it can be easily changed to hundreds, I guess. I have not tried, I only have 2 locomotives.
The command station does not need to store turnouts data to operate them, it only resends the commands from LocoNet to DCC. So there can be any number of turnouts on the layout, when controlled via LocoNet throttles or LbServer. The only time when turnouts state is need to be stored is when EngineDriver requests to toggle turnout state (only toggle). States of 15 turnouts can be stored. Again, this limit is artificial and can be easily raised.
3 pin header is gnd, power and LocoNet data. Can be used for debugging, to attach an oscilloscope and to connect LocoNet devices that lack an RJ11 jack (mostly arduinos and other devboards).
thx for the detailed answer. can you give me a idea about the radiator? which one as example and how and where to place? Am 12. Nov. 2021, 17:23 +0100 schrieb positron96/LocoNetControlStation @.***>:
radiator
Just google for L298N boards, they come with a radiator. You need something this size, made of aluminum or copper. However, there is no space for that particular COTS radiator, so you'll have to find a suitable replacement or invent something DIY.
As for turnout roster, what do you expect from it? I have no idea what it needs to do, whether this feature exists in other command stations and how it works there. So at the moment I don't have any plans for it.
First of all.. it works well :) can you pls explain for what the buttons currently used?
also, how can i read cv and/or program it? may a small example would be great