Это видео недоступно.
Сожалеем об этом.

Arduino SBUS decoder with OLED display and CPPM output

Поделиться
HTML-код
  • Опубликовано: 21 июн 2020
  • Any normal 8-bit Arduino (UNO, NANO, Pro Mini, ...) with one transistor to invert the incoming SBUS signal. OLED display is optional. Provides 8-channel CPPM output which can be used for buddy boxing, or to drive a transmitter module. See also the update video: • Arduino SBUS decoder u...

Комментарии • 27

  • @technick_m
    @technick_m 4 года назад

    Хотелось бы увидеть код который просто выводит значения SBUS каналов в виде переменных, максимально простой, думаю это очень пригодится новичкам для различных проектов. Спасибо за видео!

  • @Leafyfpv
    @Leafyfpv 2 года назад

    Props!

  • @sergecensini4458
    @sergecensini4458 3 года назад +1

    Hello ceptimus, this is very usefull but why the values are around +/-1020 instead of +/-1520 for neutral position and not +/- 1000 to +/-2000 in full stick positions? Should it be impossible to get real values in µs of stick positions ? Again congratulations for the code. Thanks.

    • @ceptimus
      @ceptimus  3 года назад +1

      The SBUS protocol sends 11-bit numbers (range 0 to 2047). The middle of the range (1024) is centre-stick position and corresponds to what would be 1500 µs on a standard PPM encoding system. Most manufacturers choose to make one bit of SBUS correspond to 0.5 µs on a normal PPM signal, so to convert SBUS numbers to µs the formula is:
      µs = 1500 + ((SBUS - 1024) / 2)

    • @kalle123
      @kalle123 3 года назад

      @@ceptimus
      Hi, would be helpful for a 'normal' user to have the PPM values instead of that 11-bit number displayed on the OLED.
      br Karl

    • @ceptimus
      @ceptimus  3 года назад +1

      @@kalle123 You could easily modify the sketch to display the PPM values, using the formula I gave above: µs = 1500 + ((SBUS - 1024) / 2)

    • @fpvrc9829
      @fpvrc9829 3 года назад

      Some radios are better than others, a good radio will alow you to set endpoints, and center point, and are extremely accurate, others are not accurate and can't be adjusted

  • @adilsongoliveira
    @adilsongoliveira 3 года назад +1

    Hi there. I found your project and I was wondering if the CPPM output could allow for 12-16 channels. Thanks in advance!

    • @ceptimus
      @ceptimus  3 года назад +1

      It's easy to modify the sketch to output 12-16 CPPM channels. But there is a reason that CPPM normally stops at 8 channels: the channel pulses are spaced between 1ms and 2ms apart to represent each channel position, plus there has to be a final marker pulse greater than say, 3ms, to mark the end of the frame. So if all eight channels happen to be at their 2ms position, that makes the whole frame 19ms long. The same situation with 16 channels would make the frame 35ms long, which would mean it could only be sent 28 times per second, instead of the normal 50 times per second.
      So if you want to pack in more than 8 channels, you either have to accept increased latency (lag between moving a control stick, and the servo responding), or use non-standard (shorter) pulse spacing. Most people probably wouldn't notice an extra 1/50 of a second delay, so the longer frame would probably be the best way to go - especially if you plan to use standard servos. But do you have a receiver, transmitter buddy box, or flight controller, that works with more than 8 CPPM channels?

    • @adilsongoliveira
      @adilsongoliveira 3 года назад

      @@ceptimus Thanks for the reply. Actually, the idea is to use it in a relay for long-range FPV. The TX module I want to use does not support SBUS but it does support more than 8 CPPM channels. OTOH, the receiver that will connect this module with the radio won't output more than 8 channels in CPPM but does in SBUS so the idea is to use your project between those 2 so I can have more than 8 channels for my long range airplanes.

    • @ceptimus
      @ceptimus  3 года назад +1

      @@adilsongoliveira I see. Have you looked at the Mode Zero forum thread where this project has been discussed? If you wish, I'll modify the code to support more than 8 channels, but it might be best if you join the Mode Zero forum (it's free) where we can attach files and post code examples more easily than in RUclips comments.

  • @michalisstrouthos8677
    @michalisstrouthos8677 3 года назад

    Hi! Great project there. Would this work with D8 FrSky Sbus receivers? Trying this with a Radiomaster R81 using a Pro Mini and it doesn't seem to receive packets.

    • @ceptimus
      @ceptimus  3 года назад +1

      It should work with any sbus receiver, but I've not tried it with a Radiomaster R81 yet. So far, I've tested it with Orange, Futaba, and X-Boss receivers. Have you watched the 'update' video about this project? ruclips.net/video/XBsLfIQPxf4/видео.html

    • @michalisstrouthos8677
      @michalisstrouthos8677 3 года назад

      @@ceptimus I'm using an S8050 transistor I had but I dont seem to be getting healthy packets as it never enters the If statement there. Was just wondering whether the code only supports 16 Channel SBUS and that's why it thinks the packet isnt healthy :) Thanks for your response!

    • @ceptimus
      @ceptimus  3 года назад

      @@michalisstrouthos8677 As far as I know, the SBUS format always transmits the same number of bytes, regardless of the number of channels - for example, my Orange receiver only sends 8 'real' channels - which is why channels 9 to 16 all display at the default, 'zero' value. An S8050 transistor should be okay. What resistor value(s) are you using, if any, for the pull-up on the collector, and the input/pull-up resistor on the base? Do you have access to an oscilloscope, so you can look at the output signal from the receiver, and the resulting inverted signal after the transistor?

    • @michalisstrouthos8677
      @michalisstrouthos8677 3 года назад

      @@ceptimus Thanks again for your reply. I am using a 10k between base and SBUS signal and a 4.7k on the collector following this diagram www.ernstc.dk/arduino/pic/inverter_sbus.jpg

    • @michalisstrouthos8677
      @michalisstrouthos8677 3 года назад

      @@ceptimus oh i've also identified a transistor on the receiver and I assume the single leg side is the uninverted signal, if i solder a wire from there it should be able to go onto the arduino RX directly without the external transistor and resistors for inversion i assume

  • @podunkis
    @podunkis 4 года назад

    Nice. Did you write the code, and if so, do you have it posted somewhere?

    • @ceptimus
      @ceptimus  4 года назад +3

      Yes, I wrote the code, and you can download it from the Mode Zero forum (link below). You may have to join the forum (it's free) to see the thread. There are lots of other similar projects available on that forum as well: mode-zero.uk/viewtopic.php?f=42&t=1010

  • @gaminglegend6700
    @gaminglegend6700 2 года назад

    Hello sir How I can get PWM output?

    • @ceptimus
      @ceptimus  2 года назад

      Do you want to retain the display, or just have a dedicated SBUS to PWM converter? How many channels of PWM output? There are sufficient pins to output all 16 channels, plus the two 'switch' channels, if no display is attached. It should be possible to get the PWM outputs accurate and jitter-free to within a microsecond with some clever coding. That would deliver servo accuracy as good as any modern receiver.

    • @gaminglegend6700
      @gaminglegend6700 2 года назад

      @@ceptimus I just want dedicated SBUS to PWM converter . I Need Only 8 Chnannels Output including two 3 way switches and 2 potentiometer

    • @ceptimus
      @ceptimus  2 года назад

      @@gaminglegend6700 Okay, I'll work on it. Will likely take me a few days to complete, test, and document. Of course, you know you'll still need an inverter (a transistor or FET) between your SBUS receiver and the Arduino input, unless you have a receiver can be switched to outputting inverted SBUS.

    • @gaminglegend6700
      @gaminglegend6700 2 года назад

      @@ceptimus Thanks

    • @gaminglegend6700
      @gaminglegend6700 2 года назад

      @@ceptimus will wait for your reply