SuperRoach hobby hacker Thread OP

Mini-HowTo [GUIDE] Connecting SBus and Smartport to a Naze32 Rev 6



tl:dr; Get SBus for more channels and lower latency to control your multicopter, Smartport for Telemetry (battery monitoring, altitude and general health of it in the air) .



I tried to make the images self explanatory, but it needs a description to make sense of course, so here goes!





Hardware:

You may need some soldering skills, and a header/servo cable to make connections between some parts.

X4R-SB There are two kinds of X4R's currently, one with a white shell, one with a black shell. You want the Black one, as it lets you do SBus, which is what we want. This is a smaller version of the X8R, which for every multicopter I've built it would not need, and would be wasting space and weight with the larger shell. The X4R can be "depinned" and decased for even more savings if needed for micro builds.

Naze32 Rev 6 Next is the flight control. Naze 32 Revision 6. Also known as "Acro Funfly", or the Naze32 Budget version. Common now, and this was the first version to let you use the X4R in a "plug and play" state without hardware mods. Without getting too detailed, "Signal inversion" was an annoyance for Revision 5 and older boards.. A small bonus is the Rev 6 comes with a basic barometer, which you can use for altitude readouts when you are flying now.



There is a "full featured" version of the Naze 32 comes with more room for storing flight data and (better) barometer / compass sensors, which are not worth instead getting a more powerful flight controller.



So have a X4R-SB, and a Naze32 Rev 6, 6B or 6C? Lets go!





On your X4R:





The Smartport is on the bottom left of the image, with a small cable that plugs into it. The original one had all of it's cables there - You only need the smart port connection. Be brave, and use a tweezer to pull the plastic tabs up which hold each pin. With patience, you should not need to pull with force to take each pin out. Take all but the Yellow one out.



You can verify which pins you want to keep or leave by looking on the underside of the X4R - The funny looking "S" is the one we want to keep. +, -, and AIN are not needed.



The SBus connection is also going to power the X4R. On the image above, there are Four sets of three pins, each of them able to have a 3 Pin (Female) Header connector to it. We only care about the Red coloured one, which is the Sbus Connection. SB is the SBus (Serial/Data) connection, + is power, - is ground. The naze has connections available for all of these, so let's move on to connecting it.



On your Naze 32 Flight controller:

For reference, here is where the pins go. I decided to leave one side be removable and solder the other - because once it's in and working, do you really want to change it? Many micro builds can require you to think ahead and save weight and space by doing this. You can still do this by having header pins added of course, if you want. I cut a reasonable length of cable knowing that I will never need to move it much once it is mounted.



How the pins go between the X4R and Naze 32 (The money shot?)





Close up of the naze32.



Yellow - Smart Port

White - SBus

Black - Ground

Red - Power



If you look on the underside of the Naze32, the pins are roughly labelled for their purpose. Of note is the Power is 5v on the Naze here, perfect for the X4R - It can't take direct battery power (max 10v) or it will fry itself.



From right to left: The first two pins are power and ground, easy enough. Traditionally you would wire the next pin up - for PPM. We are not going to do that. Instead, go to the one labelled "4", which on the underside is labelled U2RX/4. Solder/Connect the White SBus to this one. Lastly, the Yellow Smartport wire connects to 5. With a catch. According to





Now your hardware setup should look like mine. At this point, it's a good time to setup your X4R and Transmitter! You can plug in the USB to the naze32 at this point, and have a functional Receiver (the X4r Should blink red) Do the binding, and Look at the manual for your X4R and setup your failsafe first. To bind your transmitter, I'm going to assume you have a taranis of some sort (Excellent transmitter and well worth the money).





Setting up the Transmitter

A rough guide to get you on your feet is from the home screen (you may need to press ENT on the bottom right to skip some warnings about switches) to press Menu, to get to the model selection. Press and hold ENT and create a profile and give it a name. Press Page to see basic information. There are so, so many cool option to change in here. Stay focused, and use the Minus button to scroll all the way down to "Internal RF" (it's far down!).



Change the Mode to D16, The channel range to CH1-16. Now the fun. There is a "Receiver No.". Select "Bind", and it should emit a piercing beep occasionally. You will need to power off your X4R/Naze (I bet you left it on right?) if you have not already. What you need to do is hold down the small "FS" button on the X4R, and power it (the Naze!) up. Instead of blinking, it should give a solid red now. Press Exit on the Taranis/Transmitter, and turn off and on again the X4R/Naze. You should have a green light turn on the X4R, indicating it connects ok to it! Again, please read up about setting a failsafe next in the



For the record, eventually you will map extra buttons and controls in your transmitter in page 5, and Page 6 ("Mixer") is what Cleanflight/Betaflight/Baseflight will see.







Software:

The frustrating part until you get it working. We want to now tell the Naze what those plugs we have connected do.



I recommend installing Cleanflight, or Betaflight if you are feeling a bit more confident. Baseflight does not support some of the features we want to do here. Although the Naze32 Warranty tells you that flashing anything but Baseflight invalidates your warranty - be brave and do it anyway.



Install chrome, choose your flight control software (cleanflight should let you get away with both betaflight and cleanflight). If you have not already, use the Firmware flasher tab, and the right port selection on the top right to flash cleanflight using Load Firmware [Online], or the



Quote: Note: Sometimes getting these settings to save can be buggy. They are all dependent on each other, and order is roughly important Always disconnect and connect again to check your settings have saved!



You may not see the soft serial options yet in this tab, if so save what you have and move into the Configuration Tab. Choose RX_SERIAL in Receiver Mode, Sbus as Serial Receiver Provider, and Soft Serial and Telemetry in the Other features in the bottom right. Click save and reboot, and verify those settings saved! I had trouble with at least RX_Serial staying on (which I ended up using the CLI to enter FEATURE RX_SERIAL to have it stick).



Almost done! Remember how I was talking about the X4R Signal being "Inverted" Before? Normally you would need a work around to get that to work. Now, we just need to enter a command and check which one works. First off, Check if your telemetry is working.



On your taranis, with a bound connection you can press page for a second to toggle into seeing data from your SBUS (or RSSI in the old days). You can add more data here and it is recommended to do so. You can set battery level warnings, altitude warnings, all kinds of alerts and displays in here.



To get Telemetry to work, you need to invert that signal! click on the CLI Tab, and at the bottom enter type: Code: set telemetry_inversion = on



Recommended things to do now - Connect Your battery to "VBat" on your naze for Battery monitoring, setting up the channels and arming on your Taranis/Cleanflight, read about failsafes.





Now that you have the barebones (which took longer than expected) written out, here is the why and how this works.





Why?

SBus is a well established protocol, that has noticeably less latency versus the previous king, PPM. It also gives you 16 Channels to use, rather than PPM's 8 (albeit it can stack for 16, at double the latency).



Smartport is an improved version of RSSI. In brief RSSI was a analog signal which could drop and give packet loss. It transmitted at a very slow speed. Smartport is digital, faster, and does not need to be "Calibrated" to get the right voltage readouts. Your Naze32 is free to send almost anything it wants over it, and your Taranis can read it! Telemetry is an important feature to have.



I wrote this because I ran into a fair bit of conflicting info, and missing tidbits of info that gave me a bit of grief figuring out. Hopefully this helps someone out there googling how to do this! Almost all Multicopter setups will need these stages done for them, and it gets easier over time.



How?

A UART is used for communication and is hardware accelerated. Having one of these lets you talk to the controller, and it can talk back to you (or a component) The Naze32 only has two uarts, and one of them is used for your USB Connection. All is not lost however, as a software controlled serial is possible by setting the options above.



Note that we use the "U2RX/4" pin for the SBus cable. That's because the Naze is Receiving data from the X4R. It is a one way connection, so we never need (or have) a wire to connect to the U2TX/5 .



Downsides No more Programmable LED Strips. Because we have used pins RC5 and RC6, we have no room left to use the LED Strips tab.

No OSD on the FPV Camera. If you are flying FPV, you might like to use a overlay of information including battery and your current flight mode. This traditionally uses the UART2 to do this, and in the MinimOSD's case, both talks to and gets data from the Naze32. This is not possible currently, with no known workaround yet.

.... Well, the workaround is to get a more powerful Flight controller. Naze32 is based on a STM32F1 Chip. Flight Controllers like Dodo use the STM32F3 Chipset, which has 3 Hardware UARTS. That gives you more processing power, and more connection options.



In the attachments is an example of how the Dodo Board can be wired up, with thanks to Addd1ct3dd for providing the Diagram.





Bonus

There are two (now three! argh!) kinds of the Naze32 Revision 6 - the 6, 6B and 6C. The latter two is made in a way that it does not power up the receiver while powered via usb. This makes it tricky to bind it before you wire everything up. No fear though! I recommend a handy little tool to power things - An XT60 to Alligator clips plug:



Another thing! Buzzers. Please always add one to your flight control board. These will beep loudly if something goes wrong, and will make it findable when you crash. I recommend 9mm x 5.5mm, 5v. Low Battery beep - if you disable VBatt Monitoring and click save and reboot, it will not check and find that your battery levels are too low (usb voltage is lower than what it expects)

Receiver Signal lost - This one was an aha and what fixed it for me. Power on your transmitter! if it is bound, and not getting a signal, your naze32 will think it has been lost and start beeping. So leave the transmitter on and you are saved!

Disable the Failsafe feature in Cleanflight - Apparently this disables the check above

Or finally for the hardcore: Turn off beeper usage in the CLI. Using "beeper_off_flags" as a reference, You can try (I havn't) beeper_off_flags = 256 to disable usb port checking beeps.



With all of this, you should be able to continue setting up your Multicopter! Please let me know if I missed anything I've found many differing guides on this, and also discovered that some can be a bit verbose. So I will document how I got it working, then talk about why it works.tl:dr; Get SBus for more channels and lower latency to control your multicopter, Smartport for Telemetry (battery monitoring, altitude and general health of it in the air) .I tried to make the images self explanatory, but it needs a description to make sense of course, so here goes!You may need some soldering skills, and a header/servo cable to make connections between some parts.There are two kinds of X4R's currently, one with a white shell, one with a black shell. You want the Black one, as it lets you do SBus, which is what we want. This is a smaller version of the X8R, which for every multicopter I've built it would not need, and would be wasting space and weight with the larger shell. The X4R can be "depinned" and decased for even more savings if needed for micro builds.Next is the flight control. Naze 32 Revision 6. Also known as "Acro Funfly", or the Naze32 Budget version. Common now, and this was the first version to let you use the X4R in a "plug and play" state without hardware mods. Without getting too detailed, "Signal inversion" was an annoyance for Revision 5 and older boards.. A small bonus is the Rev 6 comes with a basic barometer, which you can use for altitude readouts when you are flying now.There is a "full featured" version of the Naze 32 comes with more room for storing flight data and (better) barometer / compass sensors, which are not worth instead getting a more powerful flight controller.So have a X4R-SB, and a Naze32 Rev 6, 6B or 6C?The Smartport is on the bottom left of the image, with a small cable that plugs into it. The original one had all of it's cables there - You only need the smart port connection. Be brave, and use a tweezer to pull the plastic tabs up which hold each pin. With patience, you should not need to pull with force to take each pin out. Take all but the Yellow one out.You can verify which pins you want to keep or leave by looking on the underside of the X4R - The funny looking "S" is the one we want to keep. +, -, and AIN are not needed.The SBus connection is also going to power the X4R. On the image above, there are Four sets of three pins, each of them able to have a 3 Pin (Female) Header connector to it. We only care about the Red coloured one, which is the Sbus Connection. SB is the SBus (Serial/Data) connection, + is power, - is ground. The naze has connections available for all of these, so let's move on to connecting it.For reference, here is where the pins go. I decided to leave one side be removable and solder the other - because once it's in and working, do you really want to change it? Many micro builds can require you to think ahead and save weight and space by doing this. You can still do this by having header pins added of course, if you want. I cut a reasonable length of cable knowing that I will never need to move it much once it is mounted.How the pins go between the X4R and Naze 32 (The money shot?)- Smart Port- SBus- Ground- PowerIf you look on the underside of the Naze32, the pins are roughly labelled for their purpose. Of note is the Power is 5v on the Naze here, perfect for the X4R - It can't take direct battery power (max 10v) or it will fry itself.From right to left: The first two pins are power and ground, easy enough. Traditionally you would wire the next pin up - for PPM. We are not going to do that. Instead, go to the one labelled "4", which on the underside is labelled U2RX/4. Solder/Connect the White SBus to this one. Lastly, the Yellow Smartport wire connects to 5. With a catch. According to Oscars entry on doing this (which was the original inspiration), the X4R requires you to "Bridge", or solder between the gap to connect 5 and 6 Together on the naze. Look closely at my picture, you will see that it is in 5, with the gap between it and 6 containing solder to bridge it. You are welcome to try without it and report back with how it goes!Now your hardware setup should look like mine. At this point, it's a good time to setup your X4R and Transmitter! You can plug in the USB to the naze32 at this point, and have a functional Receiver (the X4r Should blink red) Do the binding, and Look at the manual for your X4R andfirst. To bind your transmitter, I'm going to assume you have a taranis of some sort (Excellent transmitter and well worth the money).A rough guide to get you on your feet is from the home screen (you may need to press ENT on the bottom right to skip some warnings about switches) to press Menu, to get to the model selection. Press and hold ENT and create a profile and give it a name. Press Page to see basic information. There are so, so many cool option to change in here. Stay focused, and use the Minus button to scroll all the way down to "Internal RF" (it's far down!).Change the Mode to, The channel range to CH1-16. Now the fun. There is a "Receiver No.". Select "", and it should emit a piercing beep occasionally. You will need to power off your X4R/Naze (I bet you left it on right?) if you have not already. What you need to do is hold down the small "" button on the X4R, and power it (the Naze!) up. Instead of blinking, it should give a solid red now. Press Exit on the Taranis/Transmitter, and turn off and on again the X4R/Naze. Youhave a green light turn on the X4R, indicating it connects ok to it! Again, please read up about setting a failsafe next in the X4R Manual For the record, eventually you will map extra buttons and controls in your transmitter in page 5, and Page 6 ("Mixer") is what Cleanflight/Betaflight/Baseflight will see.The frustrating part until you get it working. We want to now tell the Naze what those plugs we have connected do.I recommend installing Cleanflight, or Betaflight if you are feeling a bit more confident. Baseflight does not support some of the features we want to do here. Although the Naze32 Warranty tells you that flashing anything but Baseflight invalidates your warranty - be brave and do it anyway.Install chrome, choose your flight control software (cleanflight should let you get away with both betaflight and cleanflight). If you have not already, use the Firmware flasher tab, and the right port selection on the top right to flash cleanflight using, or the Betaflight firmware you downloaded using Load Firmware [Local]. To Clarify, this is the firmware that goes on the Naze32. We when talk to it over usb using Cleanflight. When you first connect your naze, you should place it on a flat surface and click "Calibrate Accelerometer". This is so it knows it's bearings to move around.Like the transmitter, there are so, so many options to use and read up on. To do finish this subset of tasks for the X4R Setup... (See image attachment at bottom for exact buttons) Click on Ports, and set UART2 to be Green (on) for Serial RX. This is for your SBUS. You should also have a few Soft Serial selections available. For SOFTSERIAL1, Change Telemetry to Smartport. this is for your smartport.You may not see the soft serial options yet in this tab, if so save what you have and move into the Configuration Tab. Choose RX_SERIAL in Receiver Mode, Sbus as Serial Receiver Provider, and Soft Serial and Telemetry in the Other features in the bottom right. Click save and reboot, and verify those settings saved! I had trouble with at least RX_Serial staying on (which I ended up using the CLI to enter FEATURE RX_SERIAL to have it stick).Almost done! Remember how I was talking about the X4R Signal being "Inverted" Before? Normally you would need a work around to get that to work. Now, we just need to enter a command and check which one works. First off, Check if your telemetry is working.On your taranis, with a bound connection you can press page for a second to toggle into seeing data from your SBUS (or RSSI in the old days). You can add more data here and it is recommended to do so. You can set battery level warnings, altitude warnings, all kinds of alerts and displays in here.To get Telemetry to work, you need to invert that signal! click on the CLI Tab, and at the bottom enter type:. Save your code, reboot and check how your Taranis should be giving you all kinds of data now! Battery voltage, and especially the AccX, AccY, AccZ numbers should be moving all over the place when you move your flight control board.Recommended things to do now - Connect Your battery to "VBat" on your naze for Battery monitoring, setting up the channels and arming on your Taranis/Cleanflight, read about failsafes.Now that you have the barebones (which took longer than expected) written out, here is the why and how this works.SBus is a well established protocol, that has noticeably less latency versus the previous king, PPM. It also gives you 16 Channels to use, rather than PPM's 8 (albeit it can stack for 16, at double the latency).Smartport is an improved version of RSSI. In brief RSSI was a analog signal which could drop and give packet loss. It transmitted at a very slow speed. Smartport is digital, faster, and does not need to be "Calibrated" to get the right voltage readouts. Your Naze32 is free to send almost anything it wants over it, and your Taranis can read it! Telemetry is an important feature to have.I wrote this because I ran into a fair bit of conflicting info, and missing tidbits of info that gave me a bit of grief figuring out. Hopefully this helps someone out there googling how to do this! Almost all Multicopter setups will need these stages done for them, and it gets easier over time.A UART is used for communication and is hardware accelerated. Having one of these lets you talk to the controller, and it can talk back to you (or a component) The Naze32 only has two uarts, and one of them is used for your USB Connection. All is not lost however, as a software controlled serial is possible by setting the options above.Note that we use the "U2RX/4" pin for the SBus cable. That's because the Naze isdata from the X4R. It is a one way connection, so we never need (or have) a wire to connect to the U2TX/5 ..... Well, the workaround is to get a more powerful Flight controller. Naze32 is based on a STM32F1 Chip. Flight Controllers like Dodo use the STM32F3 Chipset, which has 3 Hardware UARTS. That gives you more processing power, and more connection options.In the attachments is an example of how the Dodo Board can be wired up, with thanks to Addd1ct3dd for providing the Diagram.There are two (now three! argh!) kinds of the Naze32 Revision 6 - the 6, 6B and 6C. The latter two is made in a way that it does not power up the receiver while powered via usb. This makes it tricky to bind it before you wire everything up. No fear though! I recommend a handy little tool to power things - An XT60 to Alligator clips plug: http://www.myrcmart.com/xt60-to-alli...ng-p-9109.html These plug into your multirotor's battery, and you use the clips to plug into something that is plugged into the flight control board. I recommend getting creative here and seeing what you can do with some male to male leads - you can bend one end to give a connection that stays still on the naze, and clip the other plugs to the alligator clips. Be careful though! you do not want to short the connections out ever. The order to do it would be to plug the flight control connections in, the male or trimmed lead into the alligator clips - THEN the XT60 connection to the battery. Then do the reverse when turning it off.Another thing! Buzzers. Please always add one to your flight control board. These will beep loudly if something goes wrong, and will make it findable when you crash. I recommend 9mm x 5.5mm, 5v. Sample of a place that sells them. . Unfortunately, on the Naze32 Rev 6, powering up the flight control board will give you very loud beeps on USB! What I tried doing to fix that temporarily, because I wanted to plug it into the pc without going deaf: Images View all Images in thread Views: 708





Views: 2856





Views: 2525





Views: 1899



Naze 32 Connections. Yellow = Smart Port, White = SBUS.

Views: 1593



With Chocolate for Scale!

Views: 3005



NOT FOR NAZE32! - Diagram provided by Add1ct3dd (Thanks!)