NEED ADVICES for a more flexible way to achieve a reliable result

Hello there! How are you guys doing today?

I am still a learner and always excited and amazed to see how from an idea, a flawless reliable hardware can be built!

I am actually working on a project, involving the wireless transmission of precise positioning to a set or servos. My first
built is using a multi turn high precision 10K pot, positioning a pair of servos on the receiver side, easy pizzy till now !!!
But this setup has an issue, unwanted positioning can occur if someone else touches the remote, so I wanted some kind of lock mode after a certain amount of time, and would like the use of a rotary instead, and besides I wanted to add some more pairs of servos!

But there is a catch to this solution, I need the servos to be restored to their last position on power up! what the potentiometers do fingers in the nose because it’s an analogRead() loop! The rotary encoder simplifies the hardware but complicates the software, beginner I mean!

Here is how I would like it to work:

On power up, last positions would be restored and sent to their respective servos, actually a group of 3 pairs, then short pressing the encoder switch would toggle between pair 1 , 2 and 3 for for positioning, activating on the remote the respective led showing who is being controlled! Then long press would store this values…

So here is a drawing of the 2 solutions I am dilemma with!

Either I use a rotary enc toggling 3 non volatile memory digital pots or I store the values in the Arduino?

I would really need some enlightening advices here… I was able to build everything by browsing the internet but it doesn’t coast a thing asking for help an seeking for good practical advice…

Thanks in advance for your contribution to my project :wink:

P.S. I have forgotten
the pull down resistors on the rotary output side so never mind…

Save the required startup positions in EEPROM and read them from there at startup would seem to be the obvious way.

Note that there is a restriction on how many time you can write to an EEPROM location but there are ways to ameliorate that such as only writing to it when the value has changed and using EEPROM.put() rather than EEPROM.write(). You may also want to consider implementing wear levelling so that the EEPROM locations written to change to lessen the effect of writing to the same location repeatedly.

An alternative would be to save the values on an SD card and restore them when restarting.

UKHeliBob:
Save the required startup positions in EEPROM and read them from there at startup would seem to be the obvious way.

Note that there is a restriction on how many time you can write to an EEPROM location but there are ways to ameliorate that such as only writing to it when the value has changed and using EEPROM.put() rather than EEPROM.write(). You may also want to consider implementing wear levelling so that the EEPROM locations written to change to lessen the effect of writing to the same location repeatedly.

An alternative would be to save the values on an SD card and restore them when restarting.

Thanks for coming along,
Yeah due to the life span of EEPROMs I would only store the data when positioning is achieved, but you are talking about the Arduino's not the digital pot's one, correct?

you are talking about the Arduino’s not the digital pot’s one, correct?

Yes

UKHeliBob:
Yes

Ok then, what about using the digital Pot?

BenzDuino:
Ok then, what about using the digital Pot?

I know little or nothing about digital post. Perhaps you could start by providing a link to teh devices that you have in mind