• Warning!!

    Riding a tuned or deristricted EMTB is not a trivial offence and can have serious legal consequences. Also, many manufacturers can detect the use of a tuning device or deristricting method and may decline a repair under warranty if it was modified from the intended original specification. Deristricting EMTB's can also add increased loads for motors and batteries. Riding above the local law limit may reclassify the bike as a low-powered bike, requiring insurance, registration and a number plate.

    Be aware of your local country laws. Many laws prohibit use of modified EMTB's. It is your responsibility to check local laws. Ignoring it, has potential implications to trail access, and risk of prosecution in the event of an accident.

    UK Pedelec Law

    Worldwide Laws

    We advise members great caution. EMTB Forums accepts no liability for any content or advice given here. 


MEGABOBRA: Bosch Smart System Derestriction for Rim Magnet - DIY Project with Support

megabobra

Active member
Jul 24, 2022
266
268
Australia
Quick update. Using the L9110 driver (thanks @tatane for the tip on this) I'm able to produce a reversing coil signal with exponential growth and decay which very closely matches the original Bosch rim magnet profile. Snip below using some data captured using my phone.

I'll incorporate this profile into my existing code and see how it runs on the older Bosch firmware to validate it.

1708060333965.png
 

manu.w

Member
Aug 5, 2023
95
40
belgium
Hi, is the graph the capture of the generated magnetic field of your coil? How fast can you switch the magnetic field and still get it strong enough , especially with a coil with ferromagnetic material?
 

megabobra

Active member
Jul 24, 2022
266
268
Australia
Hi, is the graph the capture of the generated magnetic field of your coil? How fast can you switch the magnetic field and still get it strong enough , especially with a coil with ferromagnetic material?

Yes the dashed line is the field produced by the coil. In fact it switches much faster than the what's induced by the natural analog motion of the rim magnet - I was actually thinking of slowing it down! You can see it's just about vertical vs the slight slope in the blue Bosch line as the magnet passes. But I'll leave it as is for now, as those tweaks can be made with code alone down the track if required.

I'd say the switch from positive to native current flow is essentially instantanenous for our purposes. Surely with the right equipment (which I don't have :) ) there would be a measurable ramp up and down.
 

FRANK56

Member
Nov 5, 2023
14
7
Sardegna, Italia
Very good, I am sure that the reproduction of the signal similar to that of the magnet is the only solution to combat the Bosch 25Km/h blocking system. In the latest software versions, the problem of errors that are obtained with only the positive impulse of the coil are unfortunately frequent and take away the pleasure of driving. Bosch is waging a stupid war against derestriction, many biker friends have given up on buying e-bikes with Bosch rim magnet engines and have turned to other engines. The Bosch motor is a good motor, but it has nothing more than other competitive motors. If this continues, he will lose a lot of sales.
 

megabobra

Active member
Jul 24, 2022
266
268
Australia
Update on the reversing pulse:
Good news is that I've completed the code changes to run the L9110 driver. These first included the rewrite of how the multiplier behaves at low speeds. In the past, the first five wheel revolutions from stopped just pulsed the coil in unison with the passing magnet. However that's no longer possible with the reversing pulse as you first need to know the full duration of the pulse before you can start it, in order to solve for the positive/negative time periods.

Second change was to integrate the pulse behaviour itself. So I've got three pulse profiles:
  • Step function: full positive for half duration, then full negative for half duration
  • Linearly increasing: just ramps from 0 to full strength positive, then from full strength negative to 0
  • Exponential: similar to linear, but increases/decreases on an exponential function
Thanks to the programmability of the L9110, I can also drive the coil in the original single direction-only method, in the same way as with the transistor. An added benefit is being able to control the strength of the coil's field through code too.

I've been for one ride with the L9110 and new code in place just replicating the original single direction pulse, to set a baseline.

Now, bad news is, that on my current firmware version, the motor doesn't reliably detect the reversing coil's signal.
Where in setup mode the single direction pulse produces a stable speed, the reversing pulse fluctuates crazily before settling to 0kph. I'm able to switch between pulse behaviours on the fly using my OLED display, so the only variable is the pulse. Snip below shows the change from single to reversing pulse:

1708296878098.png


Now, I'm on an old Bosch firmware version so MAYBE this would more successful on a current version, if in fact this is what the motor wants to see? But of course I'm not sure...

Thoughts?
 

manu.w

Member
Aug 5, 2023
95
40
belgium
Where in setup mode the single direction pulse produces a stable speed, the reversing pulse fluctuates crazily before settling to 0kph. ..

Thoughts?
I don’t understand fully how you calculate the speed, wheel rpm?
Once yo have the speed you know when you have to “fire” the pulse and for how long, no?
If that is the case , firering a single or “double” pulse should not do any “crazy” things?
 

FRANK56

Member
Nov 5, 2023
14
7
Sardegna, Italia
Update on the reversing pulse:
Good news is that I've completed the code changes to run the L9110 driver. These first included the rewrite of how the multiplier behaves at low speeds. In the past, the first five wheel revolutions from stopped just pulsed the coil in unison with the passing magnet. However that's no longer possible with the reversing pulse as you first need to know the full duration of the pulse before you can start it, in order to solve for the positive/negative time periods.

Second change was to integrate the pulse behaviour itself. So I've got three pulse profiles:
  • Step function: full positive for half duration, then full negative for half duration
  • Linearly increasing: just ramps from 0 to full strength positive, then from full strength negative to 0
  • Exponential: similar to linear, but increases/decreases on an exponential function
Thanks to the programmability of the L9110, I can also drive the coil in the original single direction-only method, in the same way as with the transistor. An added benefit is being able to control the strength of the coil's field through code too.

I've been for one ride with the L9110 and new code in place just replicating the original single direction pulse, to set a baseline.

Now, bad news is, that on my current firmware version, the motor doesn't reliably detect the reversing coil's signal.
Where in setup mode the single direction pulse produces a stable speed, the reversing pulse fluctuates crazily before settling to 0kph. I'm able to switch between pulse behaviours on the fly using my OLED display, so the only variable is the pulse. Snip below shows the change from single to reversing pulse:

View attachment 134763

Now, I'm on an old Bosch firmware version so MAYBE this would more successful on a current version, if in fact this is what the motor wants to see? But of course I'm not sure...

Thoughts?
I find it very strange that an electromagnetic pulse similar to the one created by the magnet creates these problems. The only thing that has not changed in all Bosch software versions is the rotating magnet that provides an N-S pulse. We are missing something. Maybe I can get an old signal generator and with that I will try to emulate the magnetic signal on my latest version Bosch. I'm also waiting for an L9110 with which I will do further experiments. Unfortunately my programming skills are very limited, I get along better with analog electronics.
If at least with a fixed signal like the one in the setup it is possible to have a stable speed with bipolar pulses, we are on the right track.
Thanks anyway @megabobra for your dedication to this cause
 

megabobra

Active member
Jul 24, 2022
266
268
Australia
I don’t understand fully how you calculate the speed, wheel rpm?
Once yo have the speed you know when you have to “fire” the pulse and for how long, no?
If that is the case , firering a single or “double” pulse should not do any “crazy” things?

In the case of setup mode where it's just a constant repeating pulse, I set a desired speed in code (15kph typically) and then solve for required wheel RPM, milliseconds per revolution and pulse time, being the duration the electromagnet is firing. That pulse time is simply 1/12 of the revolution time. 1/12 is simply meant to represent for what proportion of the wheel revolution the motor can see the magnet on the rim. Could probably tinker with this value; it's worked fine for the one-sided pulse, but perhaps it's too short for the double. Note that it's only used in setup mode.

In normal riding mode, the magnet duration detected by the hall sensor at the wheel drives the pulse duration. Then it's simply the reverse calculation to the above to solve for the speed.

In all cases with the two-direction pulse, it's simply been running half the pulse duration position and half negative.

Does this help?
 

AlumiPro

Active member
May 1, 2023
211
170
California
Hi,

did you already receive it? If yes is it working? Is it wortth 400€?

Greets in
Yes I did. It produced error code 523003.
Trying to derestrict the Bosch Smart Rim magnet system is not worth the money, frustration, error codes, and loss of time. So I returned the Speedbox and converted my bike to the Bosch swing arm speed sensor / spoke magnet. I’ve never been happier! No more issues, no more rim magnet / internal speed sensor and my Bosch firmware is up to date (10.12.3)
 

Lu7

New Member
Apr 1, 2024
2
1
France
Yes I did. It produced error code 523003.
Trying to derestrict the Bosch Smart Rim magnet system is not worth the money, frustration, error codes, and loss of time. So I returned the Speedbox and converted my bike to the Bosch swing arm speed sensor / spoke magnet. I’ve never been happier! No more issues, no more rim magnet / internal speed sensor and my Bosch firmware is up to date (10.12.3)
Hello, can you tell us how you did it ?

Thanks
 

AlumiPro

Active member
May 1, 2023
211
170
California
You first need to get permission from your bikes manufacturer(not all are willing to do so). Your local bike shop has to email a request to the bike manufacturer to do this procedure. If approved the manufacturer will email a file for the bike shop to download new firmware into the bike that shuts the internal speed sensor off, while also turning on one of the motors existing electrical outlets for the new swing arm speed sensor to plug into.
Then it’s about $50 in Bosch parts. (Bosch Speed Sensor, Bosch Speed Sensor Chain Stay Adaptor/Holder, and Bosch Spoke Magnet)
Hello, can you tell us how you did it ?

Thanks
 

Lu7

New Member
Apr 1, 2024
2
1
France
You first need to get permission from your bikes manufacturer(not all are willing to do so). Your local bike shop has to email a request to the bike manufacturer to do this procedure. If approved the manufacturer will email a file for the bike shop to download new firmware into the bike that shuts the internal speed sensor off, while also turning on one of the motors existing electrical outlets for the new swing arm speed sensor to plug into.
Then it’s about $50 in Bosch parts. (Bosch Speed Sensor, Bosch Speed Sensor Chain Stay Adaptor/Holder, and Bosch Spoke Magnet)
Thanks !
 

Sir_Szendi

New Member
Apr 10, 2024
11
1
Poland
Yes I did. It produced error code 523003.
Trying to derestrict the Bosch Smart Rim magnet system is not worth the money, frustration, error codes, and loss of time. So I returned the Speedbox and converted my bike to the Bosch swing arm speed sensor / spoke magnet. I’ve never been happier! No more issues, no more rim magnet / internal speed sensor and my Bosch firmware is up to date (10.12.3)
Hi,

My name is Bartek, I'm from Poland and I have a few questions for you about turning off the internal speed sensor.
After turning off the internal speed sensor and installing a new one with a spoke magnet, does the display show the correct speed?
Disabling the external speed sensor removes the speed limit?

Can I ask you for a list of exactly what parts you bought, so that I don't buy the wrong ones?
 

AlumiPro

Active member
May 1, 2023
211
170
California
After turning off the internal speed sensor and installing a new one with a spoke magnet, does the display show the correct speed?
Yes it shows the correct speed provided you have selected the correct rear wheel size within the Kiox settings, because the new Bosch swing arm speed sensor and spoke magnet are now reading the bikes speed.
Depending on the tuning kit you choose to instal, it may or may not read the correct speed after the tuning kit has been installed.
 

dlatch

Member
Jun 7, 2023
20
11
Uk
Ashamed to admit still not taken the plunge and fitted my kit to my strive on ☺️ now the newness has worn of such a expensive bike I'm tempted to get on with it
 

FINJP

New Member
Sep 30, 2023
5
1
Middle of Finland
Off topic 1, just a stupid thought, what would happen if the rim is coated all the way around like 50-80% of magnets and field is constant?
Off topic 2, for Megabobra also, but someone mentioned muled version with a setup of a smaller rim. What sort of diagnostic tool would it need to do that with smart system? i.e. is it a different tool for smart systems vs. older ones? i spotted from the ebay, that bosch diagnostics v 8.1.6.0 is hacked and available.
 

megabobra

Active member
Jul 24, 2022
266
268
Australia
Off topic 1, just a stupid thought, what would happen if the rim is coated all the way around like 50-80% of magnets and field is constant?
Off topic 2, for Megabobra also, but someone mentioned muled version with a setup of a smaller rim. What sort of diagnostic tool would it need to do that with smart system? i.e. is it a different tool for smart systems vs. older ones? i spotted from the ebay, that bosch diagnostics v 8.1.6.0 is hacked and available.

As for #1, I suspect the first thing that would happen is that you would get a magnet/speed pickup error! Not sure what you would hope to achieve with this though? To the motor, it would look like the wheel is moving very slowly, as the magnet remained visible, but this wouldn't align with the expected speed for a given cadence/motor power output.

For #2, I'm not sure!


Separately, I've got some new code and a new electromagnet design to try with the current version of the motor firmware. I'm still derestricted on ~v5.0 and don't want to update my own motor in case the new design doesn't help and I lose the derestriction!

Anyone in Aus have an up to date (firmware) Gen4 CX smart system motor that they want to test with??
 
May 24, 2024
1
2
Australia
Hey mate, I'm new to this and all this is going over my head. Are you able to pm me. I'm super keen for a solution to this issue
As for #1, I suspect the first thing that would happen is that you would get a magnet/speed pickup error! Not sure what you would hope to achieve with this though? To the motor, it would look like the wheel is moving very slowly, as the magnet remained visible, but this wouldn't align with the expected speed for a given cadence/motor power output.

For #2, I'm not sure!


Separately, I've got some new code and a new electromagnet design to try with the current version of the motor firmware. I'm still derestricted on ~v5.0 and don't want to update my own motor in case the new design doesn't help and I lose the derestriction!

Anyone in Aus have an up to date (firmware) Gen4 CX smart system motor that they want to test with??
 

Peacepirate

New Member
May 22, 2024
8
0
Cologne
Hello,
@megabora do you have an updated code that incorporates the use of the L9110 H bridge? At the moment there is only pin4 adressed as output in the code (at least in my case) and i cannot simply replace / connect the L9110 to pin4.
Thanks in advance
Screenshot 2024-05-24 181340.png
IMG_3702.png
 

megabobra

Active member
Jul 24, 2022
266
268
Australia
Hello,
@megabora do you have an updated code that incorporates the use of the L9110 H bridge? At the moment there is only pin4 adressed as output in the code (at least in my case) and i cannot simply replace / connect the L9110 to pin4.
Thanks in advance
View attachment 140941 View attachment 140942

Hi PeacePirate,

I haven't published the new code with the L9110 but it's easy for you to incorporate. PS I'm using a single L9110-S (S for surface mount) rather than the whole PCB you have above. You can see pair of them on your PCB:
1716595351333.png



All you need to change in the code is:

add the pin definitions:

#define A1A D7
#define A1B D8

set them as output:

pinMode(A1A, OUTPUT);
pinMode(A1B, OUTPUT);

then to activate it/drive the coil, set the two outputs to opposite states, eg:

digitalWrite(A1A, HIGH);
digitalWrite(A1B, LOW);

turn off again is when you set the states to the same:

digitalWrite(A1A, LOW);
digitalWrite(A1B, LOW);


So in the existing code, anywhere you see "digitalWrite(ELECTROMAGNET_PIN, LOW);"
add the two 'LOW' lines above, and where you see "digitalWrite(ELECTROMAGNET_PIN, HIGH);" add the two LOW/HIGH lines.


Hope this helps!
 

Peacepirate

New Member
May 22, 2024
8
0
Cologne
Hi PeacePirate,

I haven't published the new code with the L9110 but it's easy for you to incorporate. PS I'm using a single L9110-S (S for surface mount) rather than the whole PCB you have above. You can see pair of them on your PCB:
View attachment 140970


All you need to change in the code is:

add the pin definitions:

#define A1A D7
#define A1B D8

set them as output:

pinMode(A1A, OUTPUT);
pinMode(A1B, OUTPUT);

then to activate it/drive the coil, set the two outputs to opposite states, eg:

digitalWrite(A1A, HIGH);
digitalWrite(A1B, LOW);

turn off again is when you set the states to the same:

digitalWrite(A1A, LOW);
digitalWrite(A1B, LOW);


So in the existing code, anywhere you see "digitalWrite(ELECTROMAGNET_PIN, LOW);"
add the two 'LOW' lines above, and where you see "digitalWrite(ELECTROMAGNET_PIN, HIGH);" add the two LOW/HIGH lines.


Hope this helps!
Excellent. I will give it a try. I would prefer to use the single L9110 too without the other stuff but wondered whether it would still work without all the resistors and capacitors. However, thx for the precious info.
 

EMTB Forums

Since 2018

The World's largest electric mountain bike community.

559K
Messages
28,287
Members
Join Our Community

Latest articles


Top