DRB III Reverse Engineering Project

OP
OP
MoparMap

MoparMap

VCA National President
VCA Officer
Joined
Jan 7, 2013
Posts
2,091
Reaction score
151
Location
Kansas
A little progress and a little setback on this one. I ended up bricking one of my sensors somehow in all of the testing I was doing. Must have shorted some pins or put too much voltage on the wrong one or some weird command sent. Especially weird since the sensor is after the splitter box and the splitter box manages voltages and stuff like that, so seems even more unlikely that the problem would have been a bad connection. I guess I could have just insulted it in computer language with some message I sent that messed things up. I still have the second one, but am a bit more gun-shy about just throwing random code at this one now.

That being said, I think I've finally got the start of a program going to read signals on a Windows based computer. I have something that will send a command and read a response to a text box, but at the moment I'm just testing a closed loop where I'm wiring the Tx line directly to the Rx line of the port on my computer, so no sensors involved at all right now. It also doesn't continually update just yet as I'm trying to remember how to code all over again and I never really interfaced with hardware ports to begin with. I can get it to update a text box with a button click though, and I have user selectable ports, so at least that's something. Might try plugging a sensor in again to see if it's actually doing what I want. From there I'd like to get it to the point where you click "start" and it just constantly updates the box as you tilt the sensor. Seems like something within my reach at least, just have to find the right code online to help me figure out how to run background tasks like that.
 
OP
OP
MoparMap

MoparMap

VCA National President
VCA Officer
Joined
Jan 7, 2013
Posts
2,091
Reaction score
151
Location
Kansas
Well, a little more progress and a little less at the same time. I've got a program going now that will constantly update the readout and works when the cable is looped back on itself at least, but I'm not having any luck actually getting a response from the sensor yet. So assuming I can figure out what is going on there I think there is still some promise in this endeavor. Guess I just have some more signal snooping to do so I can see if I can figure out where the communication is breaking down.
 
OP
OP
MoparMap

MoparMap

VCA National President
VCA Officer
Joined
Jan 7, 2013
Posts
2,091
Reaction score
151
Location
Kansas
Success! After all this time trying to figure out why it wasn't responding it was something as dumb as me sending it the wrong commands. It was looking for 03 04 58 02 5E in hex and I was sending it 04 05 58 02 5E. I know the sensors responds with 04 05 58 and thinking back I was originally sending a fake response just to see if my readout was working right. I stared at this stupid thing and tested it so many times I'm not sure how I missed something that simple.

All that said, I think I've got just a little more work to do. I was playing with the DRB III some more today to double check that it didn't have some kind of startup signal or something and while I was there I decided to give the "zero" function a try to see what it did. As it turns out, it does send a unique message to the inclinometer, so it would appear the inclinometer is the one that stores the zero, not the DRB III itself. Looks like it should be easy enough to mimic this behavior with some buttons, but I know the zeroing process is a two step one where you rotate the sensors 180 degrees between. I want to double check and make sure that it doesn't send a unique signal for each step of the process.

The other issue I'm having is debatable about whether it's really a problem or not. At the moment, with the math and outputs I've taken, the readout goes a little wonky above 45 degrees and jumps up to 180. So I'm guessing what I should probably be doing is adding some kind of offset to the value if I want it to read more true through the whole rotation, but that should hopefully just be as simple as taking some more raw readings with the sensor at various angles and working out the math. Realistically you'd probably never need more than 10 degrees out of a sensor if you're just using them to measure caster, but in the long run it is just a sensor and might as well be able to use it for more than that. You could probably use them to measure camber as well if you had a fixture to attach them to, though again those are going to be some small values.

Total side note, but I'm pretty sure I have a good idea why the sensors are oriented 45 degrees. Kind of like if you are using a tape measure and you start on 1" instead of the end. Since we're talking small angles to begin with, it's likely measuring in the middle of the sensor's useful range so that you aren't balancing on the edge of zero / 180 all the time when you are level. Having it rotated all the time means you'd never flop the output drastically.

Also, the one sensor I thought I might have killed is apparently not entirely dead. It still seems to not respond very well to a computer, but I plugged it into the DRB III the other day and it came alive again after a few tries. Thinking I must just have a bad connection somewhere, but glad to see it's not totally dead. Was kind of thinking it would have been hard to **** since the vast majority of testing I've done is with the switch box in front of it, so if anything would have broken from an incorrect connection I would have expected it to be in there.
 
Last edited:

deyan

Enthusiast
Joined
Sep 20, 2019
Posts
23
Reaction score
0
Location
Royal Oak, MI
Very cool! Yeah for what they are used full range is probably not needed but yeah would be great to unlock the full capability. I would be totally happy with 45 degrees
 
OP
OP
MoparMap

MoparMap

VCA National President
VCA Officer
Joined
Jan 7, 2013
Posts
2,091
Reaction score
151
Location
Kansas
I also found out the zero function is way more complicated than I was originally hoping. The first step is straightforward enough and only 3 commands, but the second step is a lot more data being sent that I'm still trying to understand. I think I know what is going on in a big picture perspective, but trying to decode that in raw hex values isn't quite as intuitive. The sensor is in fact the one that carries the zero I am quite sure. Ideally I need to be logging the traffic both ways between the sensor and the DRB, but I don't really have a good way to do that and keep timestamps with my setup right now. I'm basically just splicing wires and tee'ing the signal off to feed into my computer right now, but I can only pick the Rx or Tx line at one time. If I had a second USB serial adapter (which I might somewhere, need to dig around as I could have sworn I did), I could put one line on each adapter, but it would still be a little bit of a guessing game on figuring out when each signal was coming in relative to the other.

Long story short, it looks like the zero process basically does exactly what the manual says. It looks like it's asking for the value in the first calibration orientation, rotating, asking for the value again, then doing some kind of what I presume is a write command. There are some portions of that write command that are always the same all the time, but the parts that are changing are changing very minimally, so it's hard to figure out exactly how much of that data is an actual value that is being written and how much of it might just be a command or memory address or something. I tried zeroing at a noticeable angle, but the values are still only changing by a few bits. I guess realistically even if you zero it at 45 degrees, the process has you flip the sensor 180 between measurements, so it would take the average between the two values and should theoretically still give you roughly the same actual zero. So at this point I can replicate the zero command easily enough, I just don't know what math is actually happening to be able to 100% replicate what the DRB does just yet.

The alternative option is a software zero that would just apply an offset to whatever the sensor spits out. That would be pretty easy to implement, though I feel like it might be missing something. In some of the testing I was doing yesterday when I finally got the sensor reading values out, it seems like my scale was just slightly off. Like it would read about 0.1 degrees more per 10 degrees as I was rotating it compared to my other digital inclinometer. So 10 deg on my digital one would read 10.1 on the DRB one and 50 on the digital one would be 50.5 on the DRB one. I'm not sure if the zero function might help with this or not, but I also haven't checked the output against my digital inclinometer after all the zero stuff I was messing with yesterday. I need to get some fixed wedges as well so I'm not trying to hold things with my hands since that could very well have something to do with it too.
 
OP
OP
MoparMap

MoparMap

VCA National President
VCA Officer
Joined
Jan 7, 2013
Posts
2,091
Reaction score
151
Location
Kansas
So I guess the main question right now is how comfortable are you with making your own cable? If you wanted to try I could just send you the cable diagram and the program as I have it now and can keep working on it in the meantime so you can actually use your sensors while I try to get things more fully featured. I think I could build in a software zero function pretty easily that would just offset the value, but it would mean you would have to zero the sensors every time you want to use them, assuming they aren't already reading level that is.

At the moment the cable design I have going is pretty simple, but will only read one sensor. I have a plan on how to include a switch that would let you swap between them, but it would still just be reading one at a time. Could also just swap between plugging in one or the other, but that might not be the best for the connectors in the long term if you did it a lot. If you don't have the equipment to build a cable (pretty much just a soldering iron), I can probably make one for you. Haven't priced anything out, but it's just two DB9 connectors and some wire, plus whatever you want for the power connection (could just be flying leads or some kind of connector if you want).
 

deyan

Enthusiast
Joined
Sep 20, 2019
Posts
23
Reaction score
0
Location
Royal Oak, MI
Yeah I would definitely be willing to try it, I can solder, I am not the greatest at it, but I can put few wires together lol. That would be awesome though! I don't think I have any db9 connectors but i am sure it'll be easy to source few
 
OP
OP
MoparMap

MoparMap

VCA National President
VCA Officer
Joined
Jan 7, 2013
Posts
2,091
Reaction score
151
Location
Kansas
Okay, I'll try to get a little schematic drawn up and you can test it and let me know if it works for you. It's pretty straightforward, three straight through cables, one jumper, and some flying leads for power.
 
OP
OP
MoparMap

MoparMap

VCA National President
VCA Officer
Joined
Jan 7, 2013
Posts
2,091
Reaction score
151
Location
Kansas
Here's a drawing of the adapter cable setup. You'll need one male DB9 and one female DB9. Pins 2, 3, and 5 go straight through from one connector to the other. On the inclinometer breakout box side pins 4 and 5 need to be jumpered (doing this will only allow you to read from the sensor plugged into the "left" port on the breakout box). If you wanted to read from the "right" port on the breakout box you need to put 5V on pin 4. Pin 6 on the breakout box connection is 12v power. You'll need another wire coming off of any of the ground connections for the negative side of the power supply. This just ensures that all devices are using a common ground for reference. You could take this off of pin 5 on either connector so you don't have too many wires stack on a single tiny pin. Let me know if this all makes sense. I can try to take a picture of the one I made as well, though it's not the prettiest as it was just spare stuff I had laying around.

My long term plan was to build a 5v regulator into the cable with a switch that would feed pin 4 either ground or 5v based on what position it's in, but that can come later. Thinking about trying to make one myself to see if I can make it look nice and potentially even sell it as a kit some day.
 

Attachments

  • Inclinometer Cable.jpg
    Inclinometer Cable.jpg
    60.8 KB · Views: 5

deyan

Enthusiast
Joined
Sep 20, 2019
Posts
23
Reaction score
0
Location
Royal Oak, MI
Awesome, thanks for the diagram and all the work on this, I'll try and order the parts this week, and I am sure I'll have a bunch of questions, but should be fun little project lol
 

deyan

Enthusiast
Joined
Sep 20, 2019
Posts
23
Reaction score
0
Location
Royal Oak, MI
So I got the db2 connectors but time has been at a premium, I am hoping I'll find some time soon to create the harness!
 
OP
OP
MoparMap

MoparMap

VCA National President
VCA Officer
Joined
Jan 7, 2013
Posts
2,091
Reaction score
151
Location
Kansas
No worries, I haven't really done much on my side either. I'll see about making a software zero function for the first "release" of the program for you. That should make it reasonably useable to start with I would hope. Haven't really played around with the real zero function in a while. I'm not sure how it handles zeroing two units at a time either. I got to thinking that maybe some of the wall of values I'm seeing come out of the DRB III might have something to do with that as well. I'm not sure it knows whether you have 1 or 2 sensors plugged in when you do the zero stuff, so that might explain some of the extra code.
 

Latest posts

Members online

Forum statistics

Threads
152,298
Posts
1,675,464
Members
16,698
Latest member
Hagen3great
Top