Wireless communication shifter

I implemented a wireless cycling shifter with ESP32 from Adafruit. (it is a two-speed unicycle hub, so the servo and shifting mechanism is spinning and cannot be hardwired to the handlebar)

My current setup:

1st ESP32:
This ESP32 is in "deep-sleep" until it senses my button click on my handlebar.
Then it sends a shift command to the other ESP32.
I measured about 8mA of current. 300mAh battery, so it will last about 40 hours.

2nd/3rd ESP32 (left/right shift mechanisms):
Constantly listening for an ESPNOW signal.
When it receives a command, it shifts using small servo.
Just listening, it takes about 200-300mA. 500mAh battery only lasts 2 hours.

I really want it to last more than 2 hours, since some of my rides/races are longer than 2 hours.

Any tips? I feel like my listening devices are so simple, but they take so much power..
I am thinking about

  1. Bigger battery, but I'm quite space constrained. Might be able to fit 2x 300mAh batteries.
  2. Different board? Custom board? Different microcontroller?
  3. Different wireless protocol?
  4. Is sleep mode possible if it needs to constantly listen for a wireleess shift command?

I can handle maybe 0.5s delay in shifting. But the more immediate, the better.

Maybe "everyone" knows what that is but I don't so no constructive reply other then this: How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum

Sorry. When I said shifter, I meant "gear shifter".

To make it more abstract, like some other vehicles, it has gears. Somewhere inside the transmission, something must move to engage different gears.

My mechanical design required me to actuate a servo through a wireless connection that is controlled by a button

As I described in my original post, my problem is power consumption with my given setup. And I'm not sure what type of microcontroller/wireless protocols might be better for this.

Video of somone online with the same transmission. I am just adding an electronic control. Normally, you have to hit a button that is rotating on the wheel with your foot...

  • Switch at the handlebar and wireless broadcast.
  • Servo/actuation mechanism and receiver inside the wheel.

You need to rework the design so the mechanical part has an over-center spring loaded lever that the servo only moves the lever, not holds the lever. I would NOT use an Arduino, but a cheep remote with a relay and a FOB with a push button or two push buttons.

The ESP32 is fine for demonstration purposes but horribly power hungry overkill for such a simple control system. I agree with the above comment and recommend

There is an "over-center" type mechanism inside already.
Overly simplified, but the gear system is built like this:
Shift rod moves a spring loaded(laterally) dog clutch.
When moved to the right, it engages with low gear (red).
When moved to the left, engages with high gear (blue)

There are two spring loaded balls that keep the shift rod in place (over center).

Normally, an extension piece is attached to the ends of the shift rod, that let you push it left or right.

I attached a string to both sides, so that I can pull it left or right...
I tuned it so they pull just the right amount of string to get over the over-center mechanism.
My mechanism right now:

The actual gears are tightly packed inside an aluminum casing, so nowhere else to access the shift rod. Image from the internet (screenshot from video below):

Is a relay-controlled servo possible? I only know of ones that require "PWM" control.

Edit: Initially it required about 5lb-force to move the shift rod past the over-center mechanism, and the servo was not strong enough. I replaced the springs on the balls to be as weak as possible, and it probably takes 1lb-force now.

Don't know how helpful this is, but there is an ANT+ profile defined for cycle gear shifting and ANT is extremely low power. I've had ANT devices that continued to transmit even after having the batteries removed. The residual charge on their filter capacitors kept them running for a few minutes. However, ISTR that you need to be registered to get access to the ANT+ profiles.

BLE is easier and probably good enough. About 7 years ago I implemented a Bluetooth (not BLE) gear shifter; a modern BLE radio would have significantly longer battery life. Wi-Fi is probably the worst choice for something like this.

Aha. Helpers, knowing details I don't know, have joined the question. Good.
Never thought a one wheel could have a gearbox.

1 Like

I actually might "need" a microcontroller for "safety". If the clutch gets stuck in between high and low, it will spin freely, and I would loose control. So I'd want to make sure both left/right side actuators are alive before trying to shift.

BLE sounds like a good idea.
It seems to be lower power than ESP-NOW.

On that note.. should I look at a different microcontroller..? I've read some stuff about NRF chips, and wondering if that would be better.

Put them under your seat....

Tom... :smiley: :+1: :coffee: :australia:

BLE is significantly lower power than Wi-Fi!

Nordic (nRF) devices are good both for ANT (if you can get the profile specs, they will have reference implementations) and BLE. However, their support in the Arduino ecosystem probably isn't anywhere near as good as for ESP32, so you'll probably find that it's much easier to go with ESP32.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.