• 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. 


Derestricting bosch smart system

Koekie

Member
May 2, 2023
23
38
Antwerp, Belgium
I'm using an ESP32 Arduino (for now an M5Stack Core2) using Bluetooth Low Energy it updates a speed meter on my phone.
This is a nice gimmick but it helped to develop the system. On the phone I'm using the free app RemoteXY and that finds my Arduino and shows the following interface. The connection is not always stable...
IMG_3633.PNG
 
Last edited:

Koekie

Member
May 2, 2023
23
38
Antwerp, Belgium
Maybe interesting is that the code I'm using was written by ChatGPT4. I explained that I want a speedometer and an output pulse that was slower. Code worked first time.
Later I added variable pulse width, the RemoteXY interface and some logging on the screen of my Arduino.
Please find the code attached.
 

Attachments

  • speedometer2.txt
    4.1 KB · Views: 245

stratosa

Member
Apr 17, 2020
42
14
GREECE
Maybe interesting is that the code I'm using was written by ChatGPT4. I explained that I want a speedometer and an output pulse that was slower. Code worked first time.
Later I added variable pulse width, the RemoteXY interface and some logging on the screen of my Arduino.
Please find the code attached.
Because like is not enough, i have to say BRAVO to you for the entire project.
 

-Matt

Member
Aug 14, 2022
33
20
Stroud
So i have taken a punt and bought another speedbox, just gone for the standard 1.0 - less to go wrong.

Im told speedbox updated the firmware in Feb this year that helps stop the detections.
Its a shame once you have bought one, its not possible to update the firmware on the speedbox.

Will be ditching the Bosch App, and no more bike updates!

Will install it tomorrow and go for a test shred, hopefully goes better than my experiance with a 1.0B last year that lasted less than 10 miles before going crazy!

Will update on how it goes.
 

Koekie

Member
May 2, 2023
23
38
Antwerp, Belgium

megabobra

Active member
Jul 24, 2022
264
267
Australia

Thanks very much Koekie. PS such a great idea to debounce the hall sensor input - I didn't think of that!

I wonder how using the static delay (160ms in your case) compares to the multiplier method? Below I plotted true input speed against both output methods to see how it looks. I used a 96ms delay to give a max speed of 35kph, aligning with a 1.4x multiplier.

1684022578372.png


Interestingly the static delay gives a small curve in its output while the multiplier is linear. I'd argue the non-linear relationship between input and output is more likely to be detected, BUT when you consider the wide range of available gearing between chainring and cassette, there's no way for the motor to know that you're not simply working through the gears. So it should be ok?

How is this setup going for you?
 

megabobra

Active member
Jul 24, 2022
264
267
Australia
Is it just me, or do others feel like these guys are electrical wizards out to haunt us?
Please, just a dummy's version, so we can make our bikes go faster...

Did you check out my build tutorial earlier in this thread? Anything I can do to make it clearer/easier?
 

Koekie

Member
May 2, 2023
23
38
Antwerp, Belgium
Thanks very much Koekie. PS such a great idea to debounce the hall sensor input - I didn't think of that!

I wonder how using the static delay (160ms in your case) compares to the multiplier method? Below I plotted true input speed against both output methods to see how it looks. I used a 96ms delay to give a max speed of 35kph, aligning with a 1.4x multiplier.

View attachment 114507

Interestingly the static delay gives a small curve in its output while the multiplier is linear. I'd argue the non-linear relationship between input and output is more likely to be detected, BUT when you consider the wide range of available gearing between chainring and cassette, there's no way for the motor to know that you're not simply working through the gears. So it should be ok?

How is this setup going for you?
The 160 ms works well for me. I think the nice thing is at low speeds it is kind of x1. Also I'm not limiting myself at 35 km/h since sometimes I want to go faster that that.

I'm just starting to use it.
I hope it will not be detected by the motor, will only know that for sure after 1000 km.
Since I got that delay idea and the 160 number from an existing device (that is stated to be compatible with Bosch Smart systems) I hope that helps in that.
 

BeBiker

Active member
Aug 26, 2020
700
421
Belgium
Is it just me, or do others feel like these guys are electrical wizards out to haunt us?
Please, just a dummy's version, so we can make our bikes go faster...
Don't worry, It will not take long until there's a dummy web page with only a "Pay Now" button :)
 

Sander

Member
Dec 29, 2022
56
29
NL
I placed the resistor not to overload the transistor base. Probably better in the long run to do that. Maybe smaller resistor values will also do the job. Transistor Base Resistor Calculator
Hey Koekie, great device! I'm riding with the megabobra with no issue. I build one for a friend mine. He seems to have issues. We're playing with the position of the selfmade coil, but we also noticed that the transistor is becoming that hot that is melts the case a little bit. So soldering a 1k resistor at the base of transistor will prevent overheating? My coil is 10m 0.3 mm enameled copper with a coil diameter of 25mm.
Again, my device has no issues at all but better to dial in the resistors? In case if meltdown the same device of the friend of mine? Thx! Sander
 

megabobra

Active member
Jul 24, 2022
264
267
Australia
Hey Koekie, great device! I'm riding with the megabobra with no issue. I build one for a friend mine. He seems to have issues. We're playing with the position of the selfmade coil, but we also noticed that the transistor is becoming that hot that is melts the case a little bit. So soldering a 1k resistor at the base of transistor will prevent overheating? My coil is 10m 0.3 mm enameled copper with a coil diameter of 25mm.
Again, my device has no issues at all but better to dial in the resistors? In case if meltdown the same device of the friend of mine? Thx! Sander

Hey Sander, the thing to check here is the resistance of your coil - probably it's too low so it's pulling more current than the transistor can handle.

Ps I know what you mean with the placement, it's a pain that it's so sensitive. It's hard not knowing exactly where the sensor in the motor is, nor knowing the correct magnetic field strength that it's looking for. I tried measuring the standard magnet's field, but I only had my smartphone and some free app! Then built the coil to give a similar field strength given its location within the frame/against the motor. I bet if we could do this more accurately there would be a greater tolerance on the placement of the coil.
 

Koekie

Member
May 2, 2023
23
38
Antwerp, Belgium
Hey Koekie, great device! I'm riding with the megabobra with no issue. I build one for a friend mine. He seems to have issues. We're playing with the position of the selfmade coil, but we also noticed that the transistor is becoming that hot that is melts the case a little bit. So soldering a 1k resistor at the base of transistor will prevent overheating? My coil is 10m 0.3 mm enameled copper with a coil diameter of 25mm.
Again, my device has no issues at all but better to dial in the resistors? In case if meltdown the same device of the friend of mine? Thx! Sander
To avoid overheating the resistor should be in series with your coil. That is on the emiter of the transistor. I do not know if the resistor in on the base would cause overheating.
 

Sander

Member
Dec 29, 2022
56
29
NL
Hey Sander, the thing to check here is the resistance of your coil - probably it's too low so it's pulling more current than the transistor can handle.

Ps I know what you mean with the placement, it's a pain that it's so sensitive. It's hard not knowing exactly where the sensor in the motor is, nor knowing the correct magnetic field strength that it's looking for. I tried measuring the standard magnet's field, but I only had my smartphone and some free app! Then built the coil to give a similar field strength given its location within the frame/against the motor. I bet if we could do this more accurately there would be a greater tolerance on the placement of the coil.
The placement of the coil of my friends bike is now good with my megabobra. And I have no issues at all. So I'll make another arduino for my friend and I'll put a resistor in serie with the coil. The coil now has a resistance of 2.4 Ohm (R = rho copper * 10m / A) so adding 10 Ohm should do the job I guess. 🤞
To avoid overheating the resistor should be in series with your coil. That is on the emiter of the transistor. I do not know if the resistor in on the base would cause overheating.
so overloading of the transitor does not mean overheating? And adding the 1k resistor is to lengthen the lifespan of the transitor?
 

megabobra

Active member
Jul 24, 2022
264
267
Australia
The placement of the coil of my friends bike is now good with my megabobra. And I have no issues at all. So I'll make another arduino for my friend and I'll put a resistor in serie with the coil. The coil now has a resistance of 2.4 Ohm (R = rho copper * 10m / A) so adding 10 Ohm should do the job I guess. 🤞

so overloading of the transitor does not mean overheating? And adding the 1k resistor is to lengthen the lifespan of the transitor?
You have the magic touch for the placement - still takes me ages to get it settled in the right place!

Yes at 2.4Ohms you will be pulling way too much current: V=IR, @ 5v you're at 5v/2.4ohm = 2.08Amps! From memory the 2222 transistor's current limit is ~0.8A.
 

Sander

Member
Dec 29, 2022
56
29
NL
You have the magic touch for the placement - still takes me ages to get it settled in the right place!

Yes at 2.4Ohms you will be pulling way too much current: V=IR, @ 5v you're at 5v/2.4ohm = 2.08Amps! From memory the 2222 transistor's current limit is ~0.8A.
I guess the magnetic force will be less when placing a resistor in the coil and thus the position of the coil would be more precise?
 

megabobra

Active member
Jul 24, 2022
264
267
Australia
And what about a transistor that can handle more than 0.8 Amps? Less affecting the position of the coil.
With the coil, more current doesn't mean a greater magnetic field. A better way to achieve that is with more turns of the copper. So where maybe you have 10m, use 20m - you should see an increase in your magnetic field strength, increase in your resistance and decrease in current. However, you can reach a point where too many turns will create so much resistance that at 5v you won't be able to push enough current through it. In that case, you would need to increase the voltage (rather than the current).

But just note that since the motor has a hall sensor internally, you can definitely have a field which is too strong - just try putting the standard rim magnet up against the motor; you'll immediately see an error in the Flow up about magnet field strength.

So increasing the strength of the coil might not help with placement, as you'll just need to position it further away in order to still give the correct reading to the motor's sensor.

But please try and post your findings! :)
 

Koekie

Member
May 2, 2023
23
38
Antwerp, Belgium
Indeed, you do not need much magnetic field to give a pulse to the motor.
But it might be difficult to find the right spot.

I used a simple program that generates a fixed pulse train to find the spot (see attached). Use this program and look at your speed display until it reads a fixed speed. (the wheel does not have to turn)
 

Attachments

  • speedometer_output_test_Wemos_D1.txt
    1 KB · Views: 196

megabobra

Active member
Jul 24, 2022
264
267
Australia
Indeed, you do not need much magnetic field to give a pulse to the motor.
But it might be difficult to find the right spot.

I used a simple program that generates a fixed pulse train to find the spot (see attached). Use this program and look at your speed display until it reads a fixed speed. (the wheel does not have to turn)
Ha that's such a great idea. I've lost count of how many times I've stood holding the wheel off the ground so I can spit it an watch the display!
 

RobbieMcManus

New Member
May 30, 2023
10
8
NL
So, what is possible in regard to having a US/Canadian dealer change the settings through a Teamviewer application to get to the 20MPH mark as the base setting, then not using the app anymore so the system thinks you are just running it in the US? 20MPH is all that most need and the bike is build for it. Legally they can not decline any warranty claim based on that setting.
 

Sander23

Active member
Aug 28, 2020
740
457
Belgium
This also seems like a good solution.
I've been using their products for 7 years on 3 different bikes and has been working very well. Support is also fast and good if you have an issue.
( not yet have a smart motor)
 

stratosa

Member
Apr 17, 2020
42
14
GREECE
( not yet have a smart motor)
I agree with you, i also have been using their products for 7 years on 5 different bikes and has been working without any problem. Support is also Excellent. People do not know them well because they sell chips themselves. THEY DO HAVE FOR BOSCH SMART MOTOR , not with rim magnet.
 

EMTB Forums

Since 2018

The World's largest electric mountain bike community.

555K
Messages
28,072
Members
Join Our Community

Latest articles


Top