Remote conversion of animatronic eyes - NRF alternatives?

Hi all,

My current project has been forever ongoing. I finally have the mechanical side of things working.

My animatronic eyes can be found here The eyes. They work. - Album on Imgur

Current WORKING State, Hardwired

All is working off the one Arduino Nano and PCA9685 16-Channel 12-bit PWM Servo motor Driver I2C and 5v Joystick with switch intergrated.

Power to the servos is provided by a desktop switchable power supply at the moment (set to 6v) direct to the servo board. I will replace this with batteries for portability later.

Joystick position moves the eyes left right up and down and joystick button for blink.

I use 8 servos in total for the eyes and blinkers.

NEW state requirement

I want to be able to get this to work remotely, Ie send commands from handheld controller. I just want to seperate the joystick so I can send the same commands in a more subtle / hidden manner.

I tried using nrf240L01 modules however, these seem to be probelmatic when sending more than one variable at once. (or it's likely my code). I need to send X and Y for both left and Right as well as Blink status (5 total). Likely more later like cross eyes and single eye blinks.

When I had one variable working successfully being received using NRF (ie X Axis) allowing a 15ms delay to get the servos to finish their movement is too long. Removing they delay to mimic current hardwired version does not allow the eyes respond to the next command as quickly as seen in the video.

TLDR

Is there a way / technology to get remote commands to the Arduino apart from NRF that would work up to 5 - 10 meters away?

Thank you

or it's likely my code

Correct. Nothing wrong with the NRF plan, stick to that. Post your code for help with that. Use code tags. If the code is too long, post it in a couple of sections if necessary, but if it is very long, make a short version of your sketch, cutting out everything not needed to demonstrate the problem you are experiencing.

DisasterofPuppets:
Is there a way / technology to get remote commands to the Arduino apart from NRF that would work up to 5 - 10 meters away?

There are many.

But the NRF ought to be ideal for the application, with the correct code.

Have a look at this Simple nRF24L01+ Tutorial.

Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

A single nRF24 message can contain up to 32 bytes. That could be the positions for up to 32 servos if a range of 0-255 is sufficient or 16 servos if you need a range from 0-65536.

...R

Thanks all. I’ll work on my code. :slight_smile:

Send a struct that contains all the servo states,
maybe a flag tagging the changed values,
and a running counter (to detect missed packets).

Send the struct at a suiting pace and whenever something changes.

Manage the movements in the receiver without using delays.

" allowing a 15ms delay to get the servos to finish their movement is too long. "

Take the delay out of your code. Probably no reason to have it as far as a servo is concerned.