Hello XOD community I am planning arduino-based RC servo mixer.
Is there a way to read/input RC reciever signal with XOD?
Hello XOD community I am planning arduino-based RC servo mixer.
Is there a way to read/input RC reciever signal with XOD?
You need to use the pulseIn() command. There are no built-in nodes that implement this, but the library robertspark/components — XOD has a pulse-in node.
There are probably many examples of using RC receivers with Arduino. This is the first one I found: How to read RC receiver signal with Arduino | by Ricardo Paiva | Medium. You won’t be able to directly use the code on XOD, but it outlines the general process and how to use the output of pulse-in. XOD also has a map node that functions much the same as the map() function used on the website above. Note that in XOD, POT outputs, servo inputs, etc. are generally 0-1 values, so you might want to map your pulse-in output to that range for easier use in XOD.
Thanks for the advice - I got it (somehow) working and I´ve learned quite a lot in the past few weeks.
Current problem is a huge servo jitter, which seems to be quite a common issue in the Arduino-world. Not 100% sure what causes it. Input signal value seems to fluctuate few decimals, when monitoring with watch-node. I´ve been trying to add throttle-nodes and other tricks to smoothen the value, but those of course also affect the intentional servo movements.
I wonder how it would be possible to have smooth, jitter-free movement, without adding extra roughness to the control. I quess it has been done, but I really wonder how…
The best way to remove jitter is to clean up the input source. Is the receiver value jumping around that much? If you can’t clean up the input source, averaging the last couple readings might be your only option; it means response will be increased by number of readings being averaged, times the time between readings, though. gweimer/utils has a running-avg node as well as example node showing how to use it. Response will be a little better if you weight the averages; for example, you might count the last reading twice when calculating your average. This might increase your jitter, though. You’ll have to experiment to see what is acceptable for your use-case.
Hi…I’ve been managing ghosting and floating from sticks for a very long time at this point; I’ve attempted everything, I’ve cleaned regulators, RMA’d them, supplanted them with PS4 and Xbox regulators, other Android regulators as well. Nothing fixes the issue always, following a couple of long periods of things turned out great, the floating and the ghosting show up once more.
Yep, seems really be a common issue with Arduino users. Googling tells that people have had issues with years, and that there hasn´t really been good solutions. Personally I´m beginning to give up hope about being able to control servos with reciever signal value. Most likely I need to use the reciever to trigger pre-defined servo movements. In my case this might be partly acceptable. Also I´ve had engouraging results with stepper motors.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.