Weird S.Bus focus behavior on BMMSC

The place for questions about shooting with Blackmagic Cameras.
  • Author
  • Message
Offline

Hellcco

  • Posts: 2
  • Joined: Mon Oct 18, 2021 3:23 pm
  • Real Name: Hermann Noll

Weird S.Bus focus behavior on BMMSC

PostMon Oct 18, 2021 3:48 pm

Hello,

I have bought a Blackmagic Micro Studio Camera 4K with the intention of doing shots where amongst other the focus would be controlled by a PC (which also post-processes the video for live display). The S.Bus seemed to be the best solution for this as there are multiple posts of people who managed to at least control the focus smoothly over S.Bus with an Arduino (although I have also seen one project claiming success using a .NET app on a PC).
I even got myself an original Futaba CIU-3 (so USB -> S.Bus) adapter which presents itself as a serial port to a computer to send the commands.

My problem now is that no matter what I try only the three least significant bits change the focus at all (over the range) but 8 stops of focus is of course way too less to be useful. In the process of trying things out I have
- updated the camera to 4.7.1
- used two different bit packing algorithms (one from the arduino BMC_SBUS library)
- sweeped the entire 11-bit range keeping the first three bits the same (focus stayed the same)

I have not seen any post describing a similar behavior and it seems to be directly reverse to what a Blackmagic staff (viewtopic.php?f=2&t=67024) said.
Could it be the lens I am using? (only available to me is a Olympus M.Zuiko 8mm, but in an article multiple Olympus lenses were recommended for smooth focus using S.Bus)
Am I missing some other error source and how would I debug that?

I would be very grateful for any advice you could give me with this problem.
Offline

Hellcco

  • Posts: 2
  • Joined: Mon Oct 18, 2021 3:23 pm
  • Real Name: Hermann Noll

Re: Weird S.Bus focus behavior on BMMSC

PostFri Oct 22, 2021 12:36 pm

Thanks, what a bit of time off and a good advice can do to help is always great :)

I was too focused on the bit packing that I did not notice the project I was reusing did not implement the S.Bus header correctly, adding another byte after the magic number (0x0F), thus shifting the actual servo data by eight bits.

Thanks again!
Offline

kin0shkin

  • Posts: 1
  • Joined: Thu Nov 18, 2021 9:36 pm
  • Real Name: Кирилл

Re: Weird S.Bus focus behavior on BMMSC

PostThu Nov 18, 2021 9:53 pm

Greetings!

Could you share your sketch or at least help me by telling me more about the extra byte?

after all, then the length of the total packet will become not 25, but 26 bytes, which does not coincide with the protocol!

In my sketch (which also does not work with the camera, but the receiver on the pc reads the data successfully), the conversion of 16 control variables (channel_data[16]) into 25 bytes of the protocol (packet[25]) is implemented as follows:

Code: Select all

    packet[0] = SBUS_FRAME_HEADER; // #define SBUS_FRAME_HEADER 0x0f
   
    packet[1] = (uint8_t) (channel_data[0] & 0x07FF);
    packet[2] = (uint8_t) ((channel_data[0] & 0x07FF)>>8 | (channel_data[1] & 0x07FF)<<3);
    packet[3] = (uint8_t) ((channel_data[1] & 0x07FF)>>5 | (channel_data[2] & 0x07FF)<<6);
    packet[4] = (uint8_t) ((channel_data[2] & 0x07FF)>>2);
    packet[5] = (uint8_t) ((channel_data[2] & 0x07FF)>>10 | (channel_data[3] & 0x07FF)<<1);
    packet[6] = (uint8_t) ((channel_data[3] & 0x07FF)>>7 | (channel_data[4] & 0x07FF)<<4);
    packet[7] = (uint8_t) ((channel_data[4] & 0x07FF)>>4 | (channel_data[5] & 0x07FF)<<7);
    packet[8] = (uint8_t) ((channel_data[5] & 0x07FF)>>1);
    packet[9] = (uint8_t) ((channel_data[5] & 0x07FF)>>9 | (channel_data[6] & 0x07FF)<<2);
    packet[10] = (uint8_t) ((channel_data[6] & 0x07FF)>>6 | (channel_data[7] & 0x07FF)<<5);
    packet[11] = (uint8_t) ((channel_data[7] & 0x07FF)>>3);
    packet[12] = (uint8_t) ((channel_data[8] & 0x07FF));
    packet[13] = (uint8_t) ((channel_data[8] & 0x07FF)>>8 | (channel_data[9] & 0x07FF)<<3);
    packet[14] = (uint8_t) ((channel_data[9] & 0x07FF)>>5 | (channel_data[10] & 0x07FF)<<6); 
    packet[15] = (uint8_t) ((channel_data[10] & 0x07FF)>>2);
    packet[16] = (uint8_t) ((channel_data[10] & 0x07FF)>>10 | (channel_data[11] & 0x07FF)<<1);
    packet[17] = (uint8_t) ((channel_data[11] & 0x07FF)>>7 | (channel_data[12] & 0x07FF)<<4);
    packet[18] = (uint8_t) ((channel_data[12] & 0x07FF)>>4 | (channel_data[13] & 0x07FF)<<7);
    packet[19] = (uint8_t) ((channel_data[13] & 0x07FF)>>1);
    packet[20] = (uint8_t) ((channel_data[13] & 0x07FF)>>9 | (channel_data[14] & 0x07FF)<<2);
    packet[21] = (uint8_t) ((channel_data[14] & 0x07FF)>>6 | (channel_data[15] & 0x07FF)<<5);
    packet[22] = (uint8_t) ((channel_data[15] & 0x07FF)>>3);

    packet[23] = stateByte; //  0xFF;
    packet[24] = SBUS_FRAME_FOOTER; // #define SBUS_FRAME_FOOTER 0x00




question! control variables (int type) should have thresholds of values ​​44-128-212, as in the manual for the camera? or should they be like 0-1000-2000 protocol standard? or other?

I noticed that you are an experienced programmer since you started this topic. I also have experience, but not enough to understand this thing =)

Return to Cinematography

Who is online

Users browsing this forum: No registered users and 107 guests