Ebike derestrictor

roscop

Finding my (electric) wheels
Apr 30, 2016
20
2
45
We all started somewhere, so no shame to be beginner! No the idea was to use the coil of the relay as it is only driving 20mA and then remove the transistor.

But all that is just optimization, just make it work the way you like and have fun in the process :)
 

KirstinS

Esteemed Pedelecer
Apr 5, 2011
3,224
899
Brighton
A sutlble reed switch and it could have a legal standard mode and an overdrive. But that would be naughty .... Naughty D8ve don't suggest such things
This thread is fascinating but way beyond my ken

The reed switch worked well for me a couple of years ago when connected to a controller that has one of those loops for speed limiting. Magnet on a retracting belt clip and Bob's yet uncle. A bike that goes like clappers until you get off. Then the restriction comes back on

I blew that controller up sadly
 

Festivejelly

Pedelecer
Jun 29, 2016
45
36
39
Bristol
So to anyone who's interested I swapped the arduino out for a 2 bit D type flip flop, it consumed hardly any power and works a treat.
 
  • Like
Reactions: harrys

Festivejelly

Pedelecer
Jun 29, 2016
45
36
39
Bristol
Would someone tell me what to do for my Oxygen CB city Bike? 2015 version.
Go into the settings and change its wheel size to the lowest setting. I believe these bikes dont use a magnet sensor as its built into the hub. So changing the wheel size to a small value should give you some more speed.
 

Ray Johnson

Finding my (electric) wheels
Feb 16, 2016
14
1
90
Go into the settings and change its wheel size to the lowest setting. I believe these bikes dont use a magnet sensor as its built into the hub. So changing the wheel size to a small value should give you some more speed.
Thank you.

I will try that and let you know how I get on. Thanks
(Thinks, hmmm, how do I get to settings and wheel size?)
 

2x2

Just Joined
Jan 13, 2017
3
3
35
nz
Hey Festive Jelly,

Just wanting to say thanks for your post, using your information provided i was able to build a similar set up to derestrict my Shimano Steps (E6001) powered bike.

I opted for the arduino based approach as i wanted to clamp the detected speed just below the cutoff threshold instead of just halving the frequency to keep the DI2 automatic shifting on my bike.

Build information to help anyone researching this.

Bike: Merida Espresso 800 EQ
Motor: Shimano Steps E6001

Parts used:
- Arunino uno (plan on downsizing had a spare one)
- Hall Sensor sheild https://www.jaycar.co.nz/arduino-compatible-hall-effect-sensor-module/p/XC4434
- Relay Sheild as electromagnet https://www.jaycar.co.nz/arduino-compatible-5v-relay-board/p/XC4419
https://www.jaycar.co.nz/arduino-compatible-5v-relay-board/p/XC4419
It was dead simple to put together just pull top of relay to get access to the electromagnet and remove relay contacts then just simply mount on top of existing sensor. Mount Hall senor and move existing magnet to trigger.

For the Shimano Steps motor both the frequency divider method and the speed clamping derestricting method worked really well though with the frequency dividing my auto DI2 shifting bounced between gears endlessly. Placing the magnet on your crank does not work with the Steps motor and throws an error which is kind of annoying to clear.


Just a quick question
Doesn't using a flip flop instead of the arduino result in the magnet being on for one full revolution the off for one increasing your overall power consumption?
 

flecc

Member
Oct 25, 2006
53,196
30,602
On Yamaha mid drives you can reposition the sensor and fit a magnet to the cranks to activate the sensor. Speedo doesn't work correctly but I don't have a problem with that.
Panasonic too.
.
 

D8ve

Esteemed Pedelecer
Jan 30, 2013
2,142
1,294
Bristol
Hey Festive Jelly,

Just wanting to say thanks for your post....


Just a quick question
Doesn't using a flip flop instead of the arduino result in the magnet being on for one full revolution the off for one increasing your overall power consumption?
Rig it as a mono stable job jobed
 

2x2

Just Joined
Jan 13, 2017
3
3
35
nz
Rig it as a mono stable job jobed
ahhh knew there would be a simple solution, too used to doing everything in code. I was going to research it to get rid of the arduino but straight frequency division wasn't the answer for me.

Thanks D8ve
 

IR772

Esteemed Pedelecer
Jun 5, 2016
931
1,044
Leominster
With your Arduino the ratio is 1:1 up to 15 MPH then you keep it at what ever frequency equates to 15 MPH ?

This then keeps your mileage and gear change information near as possible to correct ?

The problem with the shift register is that everything is halved, and we all want to show how many miles we have ridden, except when we want to sell, do you have an automatic type gear box that is speed connected ?
 

2x2

Just Joined
Jan 13, 2017
3
3
35
nz
With your Arduino the ratio is 1:1 up to 15 MPH then you keep it at what ever frequency equates to 15 MPH ?

This then keeps your mileage and gear change information near as possible to correct ?

The problem with the shift register is that everything is halved, and we all want to show how many miles we have ridden, except when we want to sell, do you have an automatic type gear box that is speed connected ?

Yeah so it just passes on each pulse from my hall sensor to the bikes until i reach 15 MPH then it switches to generating its own signal while I'm above 15 MPH.

I have an alfine 8s which does automatic shifting (works really well... just amazing) it seems to shift based on a combo of cadence and speed so when speed was halved it would switch up due to high cadence and then down shift for low speed. So by keeping the real speed signal to 15 MPH it still functions properly as its normally in the highest gear by then or shift to it due to higher cadence.

Would say that the mileage still wont be anywhere near correct in the long term, most of the time during my commute its reading 15 MPH while i'm actually doing closer to 30 MPH. It will be closer than halving the signal but at least with that you can double your reading to see how much you have done. i mainly just implemented it this way for the auto shift and possibility of user define speed thresholds.
 
  • Like
Reactions: Nutz

Festivejelly

Pedelecer
Jun 29, 2016
45
36
39
Bristol
Just a quick question
Doesn't using a flip flop instead of the arduino result in the magnet being on for one full revolution the off for one increasing your overall power consumption?
If you create a parallel circuit off your hall effect sensor and invert the signal so that high is in and low is off you can then feed that into an AND gate. So you have this hall output plus the flipfip output and when both are on the and gate output will be high which feeds into a transistor thus switching the circuit on only when the hall has a magnet and the flippity flop is flipping.
 

Festivejelly

Pedelecer
Jun 29, 2016
45
36
39
Bristol
Ps. Ill be adding my new design soon which uses a dual flipflop. Ill post schematics here. Ive also been working on a 3d printed case for it which houses all the components and also a 500mah lipo battery thats rechargable through USB. More info to come soon!
 
  • Like
Reactions: Nutz and Gaz

HypnoToad

Finding my (electric) wheels
Jun 13, 2012
24
0
Hi, nice idea using an electromagnet, means you don't need to splice into the bike's wiring. I'm not really sure how you convert a relay into an electro magnet, is there a photo or video showing how it's done?

Failing that could I just use a tiny speaker coil or something from e-bay? I don't really know how to wind my own!

Also I'm tempted to try building this with a reed switch instead of a hall sensor, as it will use a little less power, I was hoping to use an ATTiny85 powered by a coin-cell as the brain, when it is in sleep mode it uses very little power.

I'm not really sure how much current the electromagnet/relay would need. Would 4mA be enough as coin cells only output a small current.?
 

Festivejelly

Pedelecer
Jun 29, 2016
45
36
39
Bristol
Hi, nice idea using an electromagnet, means you don't need to splice into the bike's wiring. I'm not really sure how you convert a relay into an electro magnet, is there a photo or video showing how it's done?

Failing that could I just use a tiny speaker coil or something from e-bay? I don't really know how to wind my own!

Also I'm tempted to try building this with a reed switch instead of a hall sensor, as it will use a little less power, I was hoping to use an ATTiny85 powered by a coin-cell as the brain, when it is in sleep mode it uses very little power.

I'm not really sure how much current the electromagnet/relay would need. Would 4mA be enough as coin cells only output a small current.?
I made a new design that uses a 4093 NAND gate IC and a 4013 D-Type flipflop IC. These uses tiny amounts of power. You still need an electromagnet as a reed switch or relay doesnt generate a big enough field. I've refined my electromagnet design by using a thinner wire (0.15mm) and making more coils. Every pulse is about 80 milliamps. I power my design with a 500mah lipo that can be recharged via USB.

Im going to experiment with more coils in the magnet to raise its resistance which will lower the amount of current it draws per pulse. Its getting a lot more technical than I thought it would. But i'm on the cusp of figuring out how big a field my bike needs.

To make a coil is pretty easy. I use an iron bolt and use a drill to wrap the wire around.
 

Advertisers