Help to connect an openservo

Comments, suggestions, complaints and compliments regarding the OpenServo web site.

Moderators: jharvey, Secondary Admin, Admins

Post Reply
tolkien12
Posts: 1
Joined: Mon Jun 22, 2009 12:34 am

Help to connect an openservo

Post by tolkien12 » Mon Jun 22, 2009 12:46 am

I buyed an openservo v3 and a OSIF interface. How is the connection diagram between the openservo and OSIF pin to pin?.
Thanks.

jharvey
co-admin
Posts: 362
Joined: Sun Mar 15, 2009 12:06 pm
Location: Maine USA
Contact:

Post by jharvey » Tue Jun 23, 2009 12:21 am

As luck has it, I'm doing the same thing right now. For the OSV3, the schematic shows the pinout and can be found here.

http://www.openservo.com/Schematic3

Look to the middle left. For the OSIF, look at this link.

http://www.robotfuzz.com/OSIF_guide#pinout

Also remember, the 5V from the USB port probably isn't enough to run the OSV3. Most regulators will drop a volt or two, so the 5V reg on the OSV3, will likley not allow an output voltage of 5V with an input voltage of 5V.

jharvey
co-admin
Posts: 362
Joined: Sun Mar 15, 2009 12:06 pm
Location: Maine USA
Contact:

Post by jharvey » Tue Jun 23, 2009 1:06 am

So I've run into a small problem. Right now I'm doing a straight connector from the OSIF to the OSV3. Here's my pin-out for the OSV3

red = 9 = GND
org = 7 = GND
yel = 5 = GND
grn = 3 = RESET
blu = 1 = VBAT
pur = 10 = GND
wh = 8 = SDA(MOSI)
gry = 6 = SCK(SCL)
blk = 4 = INTn(MISO)
brn = 2 = vbat

I starting crimping the connectors for the OSIF side, here is what I've got

1 = SDA = WH
2 = +V = BRN
3 = GND = RED
4 = SCL = GRY
5 = +5V =
6 = RESET = GRN
7 = MISO = WH
8 = MOSI = BLK

When I see MISO and SDA both want WH. A quick look seems to indicate they aren't bonded on the PCB. So what one do I make WH? I'm guessing SDA as that it what I recognize as I2C.

[edit] changed color scheme such that OSIF connector uses red as ground
Last edited by jharvey on Tue Jun 23, 2009 9:42 am, edited 1 time in total.

ginge
Site Admin
Posts: 1031
Joined: Sat Jan 14, 2006 2:34 pm
Location: Manchester, UK
Contact:

Post by ginge » Tue Jun 23, 2009 8:05 am

You should only need 4 pins between the OpenServo and the OSIF for normal operations...

OSIF OpenServo
1 (SDA) 8
2 (+V) 2
3 (GND) 5,7,9,10
4 (SCL) 6

All of the GND pins should be red cable, the rest are up to you.

MISO and MOSI pins are shared with the I2C pins on the OpenServo, and are only used for initial bootloading. For normal operation you should connect the above 4 pins.

The reason for the disparity in the colour codes is that you can wire the OpenServo & OSIF in a different configuration to allow SPI updating the bootloader firmware. You shoul dnot need to do this.

jharvey
co-admin
Posts: 362
Joined: Sun Mar 15, 2009 12:06 pm
Location: Maine USA
Contact:

Post by jharvey » Tue Jun 23, 2009 10:02 am

I'd bet those 4 wires would work just fine for tolkien12. I'm in a bit of a different boat and I'm not sure if that will work for me. I'm sure I'll have to upload new firmware to get open-encoder working. Unfortunately, I haven't studied the boot loader as much as I would like, I also know your working on a new version of the boot loader, so some things may change. At this time I'm fairly oblivious about how the firmware is uploaded via I2C.

You note initial boot-loading, does that mean just the first upload where the bootstrap capabilities are installed, or does it mean all firmware uploads, and after the first upload, you shouldn't have to upload again.

My understanding is that the MOSI and MISO lines are only required for the first firmware, and that updates and similar changes can happen with the above noted 4 wires. It's also my understanding that a DIY OSV3 w/ fresh AVR and no firmware, can be programed via OSIF and separate cable that is very similar to the I2C cable. The difference is the programming cable connects OSIF pin 8 to OSV3 pin 8. Once the initial firmware is uploaded, then you now have the ability to bootstrap, and program via normal I2c cable and above noted 4 wire connections. The OSV3 I have came from you and had that initial firmware done, so I don't need that special cable at this time. Is that right?

I updated the above pin-out color scheme to better match your red wire note for ground. Unfortunately, I only have one red wire in my bundle, so I'll have to improvise for the other grounds.

ginge
Site Admin
Posts: 1031
Joined: Sat Jan 14, 2006 2:34 pm
Location: Manchester, UK
Contact:

Post by ginge » Tue Jun 23, 2009 10:47 am

I'd bet those 4 wires would work just fine for tolkien12. I'm in a bit of a different boat and I'm not sure if that will work for me. I'm sure I'll have to upload new firmware to get open-encoder working.
Firmware is uploaded to the OpenServo via the built in bootloader. If you want to change the firmwware, you can upload it via the normal I2C method. i.e using the 4 wires within 3 seconds of powerup.

We have a special method where we can update the firmware on the bootloader assuming you already have it bootstrapped.


If you have a completely blank board, then you will require that you build a 5/6 pin SPI cable.
You note initial boot-loading, does that mean just the first upload where the bootstrap capabilities are installed, or does it mean all firmware uploads, and after the first upload, you shouldn't have to upload again.
I mean bootstrap. When you turn on an OpenServo it starts the bootloader. You get 3 seconds in order to issue the command to upload the firmware. You don't need any speciasl cables for this, and an upgrader can be done using the same bus cable in normal operations.
My understanding is that the MOSI and MISO lines are only required for the first firmware, and that updates and similar changes can happen with the above noted 4 wires. It's also my understanding that a DIY OSV3 w/ fresh AVR and no firmware, can be programed via OSIF and separate cable that is very similar to the I2C cable. The difference is the programming cable connects OSIF pin 8 to OSV3 pin 8. Once the initial firmware is uploaded, then you now have the ability to bootstrap, and program via normal I2c cable and above noted 4 wire connections. The OSV3 I have came from you and had that initial firmware done, so I don't need that special cable at this time. Is that right?
yes :) Thats all perfectly described.
I updated the above pin-out color scheme to better match your red wire note for ground. Unfortunately, I only have one red wire in my bundle, so I'll have to improvise for the other grounds.
Colour is not important. I actually meant BLACK for ground as per convention.

jharvey
co-admin
Posts: 362
Joined: Sun Mar 15, 2009 12:06 pm
Location: Maine USA
Contact:

Post by jharvey » Tue Jun 23, 2009 3:24 pm

ginge wrote:Colour is not important. I actually meant BLACK for ground as per convention.
Oh, I thought the red wire allowed the electrons to move faster. ;)

Do I also recall black can be used basically anywhere, and red is typically hot or powered (under the right constraints that is)? I think those conventions also typically apply to higher voltages as well. The company I work for, has shipped CE machines, and we've lightly touched some of those EU requirements, but I still don't fully understand the scope of the rules or the details of how they rules apply.

Fairly common practice here in the USA is for red or black as hot, white as common, blue for DC, and green or bare for ground. On occasion you'll see a green / yellow for ground if the wire vendor was looking for an international color scheme. Generally under 50V is unregulated.

jharvey
co-admin
Posts: 362
Joined: Sun Mar 15, 2009 12:06 pm
Location: Maine USA
Contact:

Post by jharvey » Wed Jun 24, 2009 1:48 am

[edit] Appears I got it going. A reboot fixed it. Below is post I did when I was having a problem. I'm leaving this as reference in case some one else has the same problem [edit]

I'm having a bit of a problem. Here's my log from the OSV3 software.


Welcome to OpenServo test application v0.61
OSIF initiased! Now run a bus scan...
scanbus: found adapter

scanbus: found -1 adapters

No adapters found, but got this far regardless. Something went horribly wrong.


It went well up until this point. Shows I'm connecting via USB, ect. however I'm having a bit of a problem with communicating with the OSV3. I checked the soldered side of the connector for the OSV3. I get 7.25V on the brown wire, about 2.2V on black, grey and white. All relative to the purple. This to me seems about right. This should indicate I have good crimps, and contacts.

I think I have the pins correct. Perhaps I've buggered that. Here are some pictures that show what pins are connected where.

Image

Image

Image

I don't have reason to believe my OS is buggered, but I'll try a standard windows fix and reboot the machine. Thoughts?

ginge
Site Admin
Posts: 1031
Joined: Sat Jan 14, 2006 2:34 pm
Location: Manchester, UK
Contact:

Post by ginge » Wed Jun 24, 2009 2:31 pm

Looks good.... I noticed before I posted this that you fixed it, but I will leave this reply for anyone else to use

Pin 6 on the OSIF (Reset) is not to be connected at any cost. This is purely used for updating the OSIF's firmware. With this connected, you might end up pulling the OSIF into a reflash cycle.

I2C Wiring

Code: Select all

OSIF                          OpenServo

1) SDA/RESET (out) - 3) 8 SDA (MOSI)
2) +V                         - 1,2) VBatt            -  +6V
3) GND                     - 5,7,9,10)              -  GND
4) SCL/SCK             - 6) SCK (SCL)
5) +5V                      - Not connected
6) RESET                  - Not connected
7) MISO                   -  Not connected
8) MOSI                   - Not connected



SPI programming wiring
OSIF                           OpenServo
1) SDA/RESET (out)   -  3) Reset
2) +V                       -  1,2) VBatt            -  +6V
3) GND                     -  5,7,9,10)              -  GND
4) SCL/SCK              -  6) SCK (SCL)
5) +5V                     -  Not connected
6) RESET                  -  Not connected
7) MISO                   -  4) MISO
8) MOSI                   -  8) SDA (MOSI)

OSIF 1 to OSv3 3 is the important one for flashing as it pulls the OpenServo into reset mode.

This really belongs int he wiki somewhere.

jharvey
co-admin
Posts: 362
Joined: Sun Mar 15, 2009 12:06 pm
Location: Maine USA
Contact:

Post by jharvey » Thu Jun 25, 2009 9:59 am

I don't think that page existed yet, so I started it.

http://openservo.com/OSIF_programmer

I added a link to it from here.

http://www.openservo.com/moin.cgi/StepByStep

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests