-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Won't Activate - New Firmware? #2
Comments
If you have one, your best bet would be to hook up an oscilloscope on the LIN bus and see that there's traffic (it should look similar to normal RS-232 traffic). Trying an Arduino Mega is also an excellent debugging idea; but in addition to changing the pins ( https://github.com/trainman419/bekant/blob/master/bekant.ino#L22-L23 ) you'll also need to change the serial port used by the LIN library: https://github.com/trainman419/bekant/blob/master/bekant.ino#L26 |
Having issues as well. Still troubleshooting... not sure if you've made any progress @joeljacobs ? My first lead... if I put a logic analyzer on the RX/TX of my MCP2003B, I can see when it polls ID 8 and 9. ID 8 does not respond, 9 does. So this confirms the LIN interface is talking at least. I'm not sure why that motor doesn't try to move. |
Solved the issue. @joeljacobs not sure if you are still working on this. The schematic in the project is missing two key diodes. (The MCP2003B reference diagram is also wrong). The official LIN spec is where I figured it out. Here's the correct way : You MUST have these two diodes in serial tapped in this manner to provide the proper voltage drop. I think otherwise, the behaviour is erratic - we can assume @trainman419 had a fully functional setup without them. I had a half functional setup, with one motor responding and the other not. Probably depends on if other parts of the circuit induce some voltage drop. |
I never saw any signal integrity issues without the diodes that you're mentioning, and I don't remember seeing them in the LIN bus specification. Can you provide a link to documentation about these diodes, or measurements that demonstrate why they're necessary? I do know that there is some setup that is performed by the desk's original controller that I haven't emulated yet, and I remember trying to power my desk on without the original controller would result in only a single working motor. Usually I power on the desk with the original controller, then unplug it and plug in my Arduino. |
Damn, I just tried it out - indeed, does not work without initially having the IKEA controller plugged in first. Sigh. Time to figure out the initialization routine! |
@gcormier Any luck on figuring out the initialization routine? I presume "power desk on" is referring to plugging in the desk. That is, the following should work:
However, reversing steps 2 & 1 will make it fail. |
Yes I got it going. I started a project with memory functions, PCB and functional controller. |
Oh and looking back at this issue, the diodes might not have been the root cause as I was unaware of the initialization routine. However still good to include them. |
Is that starting sequence now brought back into this arduino project or only available at megadesk one? If I read @gcormier's code correctly, that's the part of https://github.com/gcormier/megadesk/blob/39d9ab13acb1d6baa30617af4301626e288f1aac/Code/megadesk.ino#L472-L565, yes? |
I haven't ported @gcormier 's changes back to this repository. I'd be happy to accept a pull request if someone else wants to do it. |
Hello, The desk does not respons to and button press. I see the Arduino Led lightning up when I press a button. I have also connected a logic analyser to the RX and TX pin (0 and 1) and I see LIN protocols going by. I think I even see LIN respons to ID 0x08 and LIN respons to ID 0x09. So I guess the LIN part and the MCP2003 transceiver are working ok. And idea what i might be doing wrong or how I can do further debugging? |
As noted before, there's an initialization sequence for the motors that I haven't reverse-engineered or implemented, but it looks like @gcormier has. I suggest you copy that init code over into this project and give it a try: https://github.com/gcormier/megadesk/blob/39d9ab13acb1d6baa30617af4301626e288f1aac/Code/megadesk.ino#L472-L565 |
Thank for your response, but I read everywhere that starting up with the original controller and then switch to the new controller should do the trick. I am not a (real) programmer so adding the startup code is not trivial for me, but I will give it a try. |
You write code? That makes you a programmer. I'll tell you a little secret. I have a very fancy title at my day job and I still look things up on google and stack overflow all the time. I tried my controller with a new desk, maybe a year or two ago, and ran into the same problem here. Couldn't get it to sync and didn't have the tools to look into it at the time. I don't have one of these desks handy at the moment so you're probably in a better position to fix it than I am. It looks like you've got a nice logic analyzer there. I'd probably start by trying to copy or modify @gcormier's code into the arduino setup() function here. If that doesn't help, you could use your logic analyzer to capture the power-on command sequence from the original controller and modify the code here until it produces the same power-up sequence. |
I have followed your example and schematic as perfectly as possible. Quntuple-checking every connection, but the desk never moves. I have switched back and forth to the built-in controller, and it always works, but the Arduino never does. Is it possible the firmware changed on the desk?
I am also using an MCP2003 (not 2003B.) It doesn't seem like that should make a difference, but could it? The B supports LIN 2.2, and the one I have supports up to 2.1, but I can't imagine that's an issue.
Any hints? I can't troubleshoot it the way I understand, because the serial port is in use for the LIN chip.
I tried switching (using an arduino mega) to other serial pins using the constants, but it always outputted on the usb serial when connected.
I also ensure the usb serial is disconnected before testing.
Any advice would be great.
The text was updated successfully, but these errors were encountered: