Site Announcements

OUR NEW FORUM/BLOG IS NOW ONLINE IN BETA VERSION, WITH A SCHEDULED PUBLIC RELEASE NEXT WEEK. ANYONE WITH A USER ID FROM THE CURRENT FORUM HAS ALREADY HAD THEIR USERNAME IMPORTED TO THE NEW FORUM THOUGH PASSWORDS WERE NOT IMPORTED SO YOU'LL NEED TO USE PASSWORD RECOVERY TO GET A NEW PASSWORD. WHILE THE NEW FORUM IS NOT YET COMPLETE WITH ALL OF IT'S FEATURES IT IS FUNCTIONAL AND WE LOOK FORWARD TO SEEING YOU THERE.

fairwheelbikes.com/c/topics

Tuning Ultegra Di2

Discussion on bikes, and whatever...

Re: Tuning Ultegra Di2

Postby Jeffr » Thu Jan 05, 2012 1:39 am

It's possible that it's point to point and repeated rather than being a true, fully shared bus. In that case you may only be seeing a fraction of the communication. Sounds like the connection to the junction box must be special in some way in any case. Maybe it handles termination of some kind.

I would guess that they repeat the signal to tolerate errors introduced by voltage swings when the servos start. The di2 pos signal seems to repeat for over a second. Although it is clocked much slower.

http://people.freebsd.org/~jeff/bikes/shift1.jpg

I have a really crappy USB scope at home but if it's a 1mhz signal it should be easy to make a high pass filter and see if I can interpret it. If I want to do anything meaningful at that frequency without hogging battery I need to be able to use the bus from a micro clocked no faster than that so I can't bitbang it in software. If it's too far from actual CANbus spec it might require a custom IC.

Thanks for the update. I should have a kit in a couple of weeks to look at. I'll cut some wires and stick the probes in circuit and report back.
User avatar
Jeffr
The Man in Black
 
Posts: 717
Joined: Wed May 03, 2006 7:48 am
Location: Maui, HI

Re: Tuning Ultegra Di2

Postby Jeffr » Thu Jan 05, 2012 2:01 am

Also there are a few companies offering CAN over DC optimized for cars and none of them seem to do PSK. I hope not because that's kind of a pain to decode.
User avatar
Jeffr
The Man in Black
 
Posts: 717
Joined: Wed May 03, 2006 7:48 am
Location: Maui, HI

Re: Tuning Ultegra Di2

Postby Oilman » Fri Jan 06, 2012 10:34 pm

Jeffr wrote:It's possible that it's point to point and repeated rather than being a true, fully shared bus. In that case you may only be seeing a fraction of the communication. Sounds like the connection to the junction box must be special in some way in any case. Maybe it handles termination of some kind.

I would guess that they repeat the signal to tolerate errors introduced by voltage swings when the servos start. The di2 pos signal seems to repeat for over a second. Although it is clocked much slower.

http://people.freebsd.org/~jeff/bikes/shift1.jpg

I have a really crappy USB scope at home but if it's a 1mhz signal it should be easy to make a high pass filter and see if I can interpret it. If I want to do anything meaningful at that frequency without hogging battery I need to be able to use the bus from a micro clocked no faster than that so I can't bitbang it in software. If it's too far from actual CANbus spec it might require a custom IC.

Thanks for the update. I should have a kit in a couple of weeks to look at. I'll cut some wires and stick the probes in circuit and report back.


I'd cracked a junction box open (without destroying the electronics :wink: ). That wasn't really helpful since the top of the micro-controller is blacked-out, all parts are so freak-in small, the PCB is at least 4 layers, etc. But there is a direct connection (both for ground and power/communication) between the shifters and the wire going to the battery and derailleurs.

The SM-JC40 junction isn't necessary, it just connects the wires, nothing more. I cutted 2 long wires and connected these 4 'half' wires together and it works fine. Hopefully I can do some measurements with better equipment next week.
Oilman
Cat 3
 
Posts: 40
Joined: Wed Aug 04, 2010 10:10 pm

Re: Tuning Ultegra Di2

Postby Jeffr » Fri Jan 06, 2012 10:38 pm

Can you take a high resolution photo of it? The passive components will give us some clues.
User avatar
Jeffr
The Man in Black
 
Posts: 717
Joined: Wed May 03, 2006 7:48 am
Location: Maui, HI

Re: Tuning Ultegra Di2

Postby Oilman » Fri Jan 06, 2012 11:43 pm

Here you go:
http://img109.imageshack.us/img109/2194/openedjunctionbox1.jpg
http://img109.imageshack.us/img109/9884/openedjunctionbox2.jpg
http://img687.imageshack.us/img687/2025/openedjunctionbox3.jpg

I could identify a couple of components, but since I don't know what micro-controller it is I am missing the overview.
Oilman
Cat 3
 
Posts: 40
Joined: Wed Aug 04, 2010 10:10 pm

Re: Tuning Ultegra Di2

Postby Jeffr » Sat Jan 07, 2012 3:20 am

How can you tell that there is a direct connection from the shifters and the wire to the derailleurs? I can't see that on the PCB.

Can you tell me what frequency that oscillator is?

There is some print on the 4-8 pin surface mount components. Can you tell what they are? Probably just FETs or something?
User avatar
Jeffr
The Man in Black
 
Posts: 717
Joined: Wed May 03, 2006 7:48 am
Location: Maui, HI

Re: Tuning Ultegra Di2

Postby chiva » Sat Jan 07, 2012 8:39 pm

Oilman, you are legendary:) Very impressive electronics skillz!
chiva
Cat 5
 
Posts: 11
Joined: Thu Jan 27, 2011 4:57 am

Re: Tuning Ultegra Di2

Postby Oilman » Sun Jan 08, 2012 2:15 pm

Jeffr wrote:How can you tell that there is a direct connection from the shifters and the wire to the derailleurs? I can't see that on the PCB.

Can you tell me what frequency that oscillator is?

There is some print on the 4-8 pin surface mount components. Can you tell what they are? Probably just FETs or something?


I measured the impedance between the 2 wires going to the shifters and the 2 wires going to the derailleurs. The resistance is zero.

I can't identify the other components. Some components have markings, but I can't find information about them. I'll try to measure the frequency of the oscillator. It is tiny, but with a SMD-tweeter it might be doable.
Oilman
Cat 3
 
Posts: 40
Joined: Wed Aug 04, 2010 10:10 pm

Re: Tuning Ultegra Di2

Postby Jeffr » Mon Jan 09, 2012 1:58 am

I wonder if the signal isn't a lower frequency with a 1mhz carrier. That would explain why you see little variation in the 1mhz signal but repetition in the khz range. The original di2 is a very very low speed interface. Clocked in the 1khz range.
User avatar
Jeffr
The Man in Black
 
Posts: 717
Joined: Wed May 03, 2006 7:48 am
Location: Maui, HI

Re: Tuning Ultegra Di2

Postby Oilman » Mon Jan 09, 2012 11:30 am

That was what I was trying to suggest with on-off keying. But I couldn't see any changes in the duration of the 1 MHz signal or in time between the 1 MHz signals. The 1 MHz signal could be generated by simply switch one of the output pins of the micro-controller, when the uC is busy with something else slightly too long the phase shift could occur.

I hope this theory is right, it would be a lot easier to decode and reverse engineer.
Oilman
Cat 3
 
Posts: 40
Joined: Wed Aug 04, 2010 10:10 pm

Re: Tuning Ultegra Di2

Postby whichway » Sat Feb 04, 2012 3:19 am

I am in awe of what you guys know, and only have a vague idea of what you are saying, but here is my take on things.

I'm not all that concerned about where the battery goes, but I really like the idea of sequential shifting. I can't see why the right hand shifter would move you up or down one gear (including changing the rear deraileur and when the system starts to cross chain, change the front and rear deraileur) and the left hand shifter would more you up or two two gears (again changing one or two deraileurs as necessary). I don't know why Shimano don't offer this at least as an option.

It would seem that this would be easier with DA Di2, where the Shifters are pretty much dumb switches as far as I can tell. All of the shifting logic is done in the brain which then sends the signals to the relevant deraileurs.

If Ult Di2 is a networked system, then DIY sequential shifting will be much harder. The right shifter will send a signal onto the network, which will be picked up by the rear deraileur and the left shifter will send a signal which will be picked up by the front deraileur. It would take a major piece of hardware and software to allow the right shifter to control both deraileurs.

If that is not correct, then by all means, please correct me - I am a bit clueless about all of this.

With the new version of DA Di2 being mooted for 2013, it would seem that it will follow the networked path that Ult Di2 has taken. It is hard to see how it would include sequential shifting because of the one to one communication between a shifter and a deraileur.

So maybe the original DA Di2 offers a unique opportunity to hack and provide sequential shifting.

Anyway, hopefully this is not hijacking the thread, but I am curious to know what people think about this.
whichway
Cyclotourist
 
Posts: 1
Joined: Sat Feb 04, 2012 3:04 am

Re: Tuning Ultegra Di2

Postby Jeffr » Sat Feb 04, 2012 9:03 pm

whichway, you would simply make two busses with a proxy in the middle that includes the intelligent electronics. It would receive the switch inputs and create the appropriate impulses on the 'real' network according to the desired action.

It means more complexity in the part that does the proxying. The hard part from my perspective will be dealing with a 1mhz signal in microcoded firmware without eating tons of power. 1mhz is too fast to really do in software on one of these parts.
User avatar
Jeffr
The Man in Black
 
Posts: 717
Joined: Wed May 03, 2006 7:48 am
Location: Maui, HI

Re: Tuning Ultegra Di2

Postby Oilman » Sat Feb 04, 2012 9:04 pm

With the current DA DI2 it is quite easy to make, since it is already completely reverse engineered. A microcontroller has to be programmed with custom firmware to replace the junction box.

With Ultegra DI2 it could be done too, with just a micro controller and some passive components. The trick is that you would have to split it into 2 networks with a custom junction box. But first someone needs to find out how the groups works exactly? We didn't had any progress the last weeks. We did a few measurements with a better scope, but nothing useful came out. Jeffr did you already receive an Ultegra group?
Oilman
Cat 3
 
Posts: 40
Joined: Wed Aug 04, 2010 10:10 pm

Re: Tuning Ultegra Di2

Postby Jeffr » Sat Feb 04, 2012 9:14 pm

I just received it while I was away on business. In the next few days I will look into it.

If I'm not able to crack it here I can take it to my company's hardware lab where we have high end scopes and logic analyzers. Not to mention much more experienced hardware guys who I can probably convince to help me. :) Unfortunately that would have to wait until I next flew stateside.
User avatar
Jeffr
The Man in Black
 
Posts: 717
Joined: Wed May 03, 2006 7:48 am
Location: Maui, HI

Re: Tuning Ultegra Di2

Postby Jeffr » Mon Feb 06, 2012 3:05 am

I scoped it with what I have on hand, which is really a low end logic analyzer with a scope thrown in. It was not useful. So I just ordered a reasonably nice scope with a much bigger sample buffer.
User avatar
Jeffr
The Man in Black
 
Posts: 717
Joined: Wed May 03, 2006 7:48 am
Location: Maui, HI

PreviousNext

Return to General cycling

Who is online

Users browsing this forum: Exabot [Bot] and 4 guests