Looking for cheap FPV for non-airborne applications, displayed on a PC.

perhapsleiana

Elite member
I like the frsky sbus receivers. I am sure you can find many sbus parsing libraries online, but here is my sbus parsing code if it helps, feel free to copy or borrow from it.
https://github.com/RiceCreekUAS/rc-fmu/blob/master/src/sensors/sbus/sbus.cpp
Note the sbus signal line is inverted from standard serial so I bought a little $3 hardware logic inverter to read sbus onto an atmega chip. Now I'm running teensy (ultra high performance arduino) boards and those can handle inverted serial natively. I use the hardware PWM generators to drive the PWM servos.
Of course every project is a little different and every diy'er has different ideas and different goals, so it is fun to see what every one else is up to and how they go about solving things.
I think I have working code already, but it's good to know that Teensy boards can natively do inverted serial. also I chuckled at how you said "ultra high performance" because I don't think anything beats an STM32F7 or ATSAMD51 board. I have a couple projects that have Adafruit Metro M4 boards in them, my latest uses a Grand Central running 32 bits at 180 MHz. However, then ya gotta deal with 3.3v logic all over, often too fast for conventional level shifters.
All that being said, do you think an Uno is fast enough to read and process the SBUS data and send servo commands to an i2c servo controller once per packet? If not, I have a spare Metro M4 laying around, as well as a Grand Central M4, and I could venture into the Blue Pill realm, which I haven't done yet.
 

clolsonus

Well-known member
The Teensy 4.0 is a 600 MHz Cortex-M7 processor for < $20 and screams for embedded applications. I can run a university research grade attitude determination EKF @ 100hz on it with lots of room to spare. And you can program it with the arduino ide and libraries. You can even run circuitpython on it if you wish. It is a pretty amazing little board. It is crazy overkill if you are just doing goes-intos and goes-outofs, but if you are doing fancier stuff, it has a ton of horse power and memory for not much more $.

I don't know much about the performance of the uno, but it has been my experience that if you are just reading sensors and shuffling data in and out, you really don't need a fancy board, especially if your main loop is running something like 50-100hz which is typically all you need for vehicle control applications (if your internal timing interval is solid & consistent.) A few years ago I did a lot of my uav work with the atmega2560 and that was fine. Now that I have switched up to the teensy-4.0 the doors open for doing a whole lot more stuff onboard, so that is helpful for my projects right now.

Ultimately you just have to try it and see if it works for you. My projects are full of compromises where reality didn't quite live up to expectations and I've had to re-route my plans on the fly so to speak. I guess that is all part of the fun? :)
 
Last edited:

perhapsleiana

Elite member
wait where can i get this amazing lil thing
The Teensy 4.0 is a 600 MHz Cortex-M7 processor for < $20 and screams for embedded applications. I can run a university research grade attitude determination EKF @ 100hz on it with lots of room to spare. And you can program it with the arduino ide and libraries. You can even run circuitpython on it if you wish. It is a pretty amazing little board. It is crazy overkill if you are just doing goes-intos and goes-outofs, but if you are doing fancier stuff, it has a ton of horse power and memory for not much more $.

I don't know much about the performance of the uno, but it has been my experience that if you are just reading sensors and shuffling data in and out, you really don't need a fancy board, especially if your main loop is running something like 50-100hz which is typically all you need for vehicle control applications (if your internal timing interval is solid & consistent.) A few years ago I did a lot of my uav work with the atmega2560 and that was fine. Now that I have switched up to the teensy-4.0 the doors open for doing a whole lot more stuff onboard, so that is helpful for my projects right now.

Ultimately you just have to try it and see if it works for you. My projects are full of compromises where reality didn't quite live up to expectations and I've had to re-route my plans on the fly so to speak. I guess that is all part of the fun? :)
 

LitterBug

Techno Nut
Moderator
I think I have working code already, but it's good to know that Teensy boards can natively do inverted serial. also I chuckled at how you said "ultra high performance" because I don't think anything beats an STM32F7 or ATSAMD51 board. I have a couple projects that have Adafruit Metro M4 boards in them, my latest uses a Grand Central running 32 bits at 180 MHz. However, then ya gotta deal with 3.3v logic all over, often too fast for conventional level shifters.
There are a few STM32H7 boards out now that would mop the F7 up. :)
 

clolsonus

Well-known member
wait where can i get this amazing lil thing

For what it's worth, I'm not trying to talk everyone into dumping their current favorite embedded board/chip. I'm just reporting what I've done and it's good to see what options are available if you haven't run across this one yet. I have had really good results with this board starting with the teensy-3.2 which is where I hopped on board the train. Here is a good place to start looking (with some specs and benchmarks):

https://www.pjrc.com/store/teensy40.html

You can overclock this board by quite a bit, but the caution is that you'll need external cooling if you do. This brings up a fair point: higher performance is never free. At minimum it comes at a cost of higher current draw and more heat generated. The teensy-3.2 runs cool to the touch. The teensy-4.0 with the exact same pinout runs hot to the touch. So sometimes it is worth picking a lower spec board (if it still meets your needs) to run cooler and save power. There is a lot of nuance to right-sizing your choices for your own embedded projects.

You can buy a teensy direct from PJRC, otherwise many places will sell them (like adafruit, digikey, oshpark, etc.) You might even be able to source one locally from a microcenter-type store if you have such a thing in your area. The teensy lineup has excellent ADC's, and some people use it for interesting music related projects.

https://www.adafruit.com/product/4323

I'm not saying this is the right board for every (or any) project, but it has been a solid performer for my stuff and has enabled me to run some more advanced code that is heavy on matrix and vectors and floating point math.

Curt.
 

perhapsleiana

Elite member
Update time! The [truck? car? robot?] arrived yesterday evening and after one look at the 2S 18650 pack and its unknown specs, I decided it would be best to not use it at all and ziptie a 5000mAh hard case on top instead. Seems like it was a good call, although I safely have nothing to compare it to.
IMG_2846.JPG

As for the electronics, the motor controllers are big enough, but they do not have clean response or variable braking. Every axis of control is proportional, with a deadband on the strafe joystick, except the yaw control, which is 3-state, rendering it useless for anything but spinning. Significant disappointment.
IMG_2850.JPG

The wheel steering control has a trim knob, and that other knob next to it is actually a throttle rate knob that only affects the trigger. The joystick is probably a PSP joystick clone, since it has linear movement rather than gimbal movement. It also has a deadband making it useless for fine adjustments. "in situ rotation" is very bad word choice for "in place rotation."

As for handling, it's terrible if you expect it to be normal. It has to have all four wheels in ground contact, so when the front wheel on the inside of a turn lifts, it just goes into a very tight spin. Turns skid wildly, because the motors don't compensate for the lateral forces and the whole drivebase slides to the outside.

New ESCs, an Arduino servo shield, and a couple other things I won't need right away will be coming tomorrow, who knows what time. But hopefully I'll be able to get started on replacing all the electronics. I'll be able to program all the mixes I could dream of, even dynamic ones that respond to sensors if I please.
 

perhapsleiana

Elite member
New electronics programmed and installed. I though I got braking ESCs but they evidently don't do that... I'll see if I can contact the seller about a bad description if there is one.
Anyway, everything works, and after removing the old stock battery compartment that I never used, all the electronics still fit. The Arduino stack fits perfectly where the tray was, it's uncanny. Glued some 5/32 BNM aircraft ply to the bottom for strength, since it felt a little floppy once I removed the battery tray.
IMG_2857.JPG

IMG_2858.JPG

Let me tell you, writing the channel mixing code was wild. Center switch on the tx (2-position) goes between wheel steering+strafe mode and full omni mode. The wheel steering mode has a differential power assist programmed in to help the turn radius. On top of all that there's deadband compensation because the motor controllers are iffy, and there's also a rate adjustment knob that affects all input channels, but not the steering servo. And that's only half of the list of mixes, and I didn't even go into the list of hard-coded trims.
 

clolsonus

Well-known member
I think it's pretty cool when you can do all the fancy mixing onboard (versus in the transmitter.) It opens up possibilities of doing fancier stuff (like 3 axis stability with weird configurations like inverted h-tail) by using onboard sensors that your transmitter doesn't have access to.
 

perhapsleiana

Elite member
Well I wouldn't run AHRS and control loops on an Uno lol, but yes. I also have a 433mhz serial module pair I could use for advanced telemetry to a PC. The problem is re-flashing the Arduino every time you want to adjust a trim.
 

perhapsleiana

Elite member
Still working on it! Painted the body and in the process of adding lights with a theme of Keanu Reeves's appearance in Cyberpunk 2077 (the You're Breathtaking one). Also added a socket to mount a small fishing rod, but with no reel, no handle, instead it has a tube running up it with a spray nozzle at the end. Currently using water only so far, but I plan to use it at a sanitizer device. I have a bec-line-powered brushed ESC running a little tiny gear pump, and a 500ml bottle of water strapped into the bed, easily removable like the fishing pole spray mast. So with a gear pump, I still have enough pressure after lifting the water up 4.5 feet, and it sprays well. Can cover a counter with misted sanitizer (or water in this case) relatively quickly. But I'll probably be using just water for a while because my dog loves this project even more now. She has stood and balanced on her hind legs to lap up the spray right after it comes out the nozzle.
Without the spray system, the truck can get up to about 15 mph, but I haven't measured it yet. I'm getting better at various coordinated maneuvers as well, but it's difficult with the amount of deadband on the motor controllers.
 

perhapsleiana

Elite member
Another update: Upgrading the pump and adding FPV this coming Monday. I've developed a spray sanitizer that can cover 1 acre per gallon and costs under 50 cents per gallon, final tests of that will also be on Monday. Foodservice sanitizers are underappreciated, but you do have to not be an idiot about them, and they're specifically used for things with hard surfaces, such as plastic cutting boards, dishes, and prep surfaces. I get them to do an acre a gallon by adding a high-surfactant dish soap and thus ruining the suitability for food-contact surfaces without rinsing. Hopefully I'll be at 25-30 psi and 0.2-0.3 gallons per minute, which for a tyoical table means I can move my spray head up to 2 meters per second.

I could also use ethyl alcohol sanitizer and pay way more, but the thing with that is I'd be tempted to use a lighter to turn it into a flamethrower.
 

perhapsleiana

Elite member
New pump has arrived, and it indeed works as I predicted. Approx. 25 psi and 0.3 gpm. It's only cycling at about 15-20 Hz, which looks funny down by the pump, but the tube going up the fishing rod is stretchy enough that the flow is still steady.
The pump uses a 12V low-speed 770 class brushed motor, which is overkill for sure.
Currently I'm using a gallon milk bottle for the reservoir, and just water because the dog drinks the spray. But I plan to use steramine sanitizer with a significant amount of dish soap in a bladder once I go to school. Finally, I found that putting a pull handle on the trailer would not be difficult, nor would wiring and powering it for independent use. It could probably run off a USB power pack, an 1800mAh single 18650 cheap one would do the trick fine. I'm running it at 6V and it's drawing around 0.5-1A, so 5V at 1A would be plenty. the tubing is long enough to use the mast as a wand too. A trigger switch on the wand would also be trivial.
 

perhapsleiana

Elite member
Got my FPV setup working! I wouldn't use it on anything that flies due to the lack of awareness of surroundings. I will note that even on a USB receiver the latency is under 100ms, and since I don't have goggles other than a PC VR headset, I prefer my USB vrx over my fully analog one. I'll keep them both handy though. I use OBS Studio to view the USB receiver output on my Windows laptop, because I can add text and other elements.