Skip to content
View in the app

A better way to browse. Learn more.

Pedelecs Electric Bike Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

I am looking for a partner to produce an add-on torque sensor for the BBS01

Featured Replies

I ordered the parts (arduino, strain gauges + HX711, bottom bracket axle). I will have to source the slip ring later but for bench testing, I don't need the slip ring. The parts will be here in about 10 days-2 weeks. Will post the result and pics here when it's done. In the mean time, I will design the PCB to keep the all the electronics together.

 

This looks like a very serious effort, I can't wait to read about what you come up with!

  • Replies 75
  • Views 10.9k
  • Created
  • Last Reply

Top Posters In This Topic

Posted Images

I rerad with interest your post in the other thread. Will keep that in mind.

 

Attack, decay, sustain, release waterproof numbered rotary dials as controls, to set the torque power envelope for the Guerney SCEPTA, waterproof buttons and LEDs on a plastic fascia for other parameter settings, might be more convenient to make adjustments on the move than stopping to muck about with a laptop/PC/Pi and a USB lead. Perhaps a choice of curves on the control panel, rather than just linear progression for attack and decay would be OTT and unnecessary.

Edited by guerney

If that works well, I'll make another prototype using ESP32 and micropython.

 

At last an Arduino topic !

 

Why an ESP32 in particular, its a bit power hungry I would have thought.

 

Its 3.3V logic, which is good, but there are smaller, more power friendly Arduino compatible boards out there.

  • Author

Why an ESP32 in particular, its a bit power hungry I would have thought.

It's only because of availability.

might try the Ellegoo first. If I could sort out the sensors' inferface, anyone can write their own code using arduino tutorials or micropython and get rid of the proprietary LCD.

It's only because of availability.

might try the Ellegoo first. If I could sort out the sensors' inferface, anyone can write their own code using arduino tutorials or micropython and get rid of the proprietary LCD.

 

Well, one Arduino compatible worth looking at are the Seeeduino XIAO boards, especially the SAMD21 variant, small and power efficient.

 

I was just yesterday looking at changing the receiver for my LoRa based 'Cycle Alarm Extender' project across for a surface mount board using ATmega328P to a much easier to build version using the SEEED XIAO.

where did you post this project? I'll have a look.

This one looks interesting:

https://thepihut.com/products/seeeduino-xiao-pre-soldered

 

Thats OK for breadboard stuff, but the XIAO boards are fairly easy to assemble as surface mount, the pads are quite big, and this makes for a real small easy build board.

 

The link was posted by [mention=33660]guerney[/mention]

 

The original transmitter\receiver board was this;

 

Microcontroller1.jpg.3f922a71abc7f4c60bc50fdca5991ea6.jpg

 

Microcontroller2.jpg.dac35b27da9416e367f91bacc4188cea.jpg

 

Which I dont have any problem building by hand.

 

But to make it easier for others to DIY, I changed to the XIAO SAMD21 for a very much easier build;

 

 

Board_for_XIAO_LoRa_20.jpg.0109c2825df0c60b661a5c0125db0a3c.jpg

 

 

Board_for_XIAO_LoRa_21.jpg.458d559a936155563e857c9af19650c3.jpg

 

 

Board_for_XIAO_LoRa_22.jpg.12b2537ee1497f9f8c1ef4f63a0567f8.jpg

Edited by StuartsProjects

Did you design the box too?

 

The large bit is the bought alarm, the small plastic box the XIAO board is in was purchased, CamdenBoss RX2KL05/S-1, I got 5 boxes for £5.70 on eBay.

  • Author
thank you for the suggestions. Finding suitable parts is so time consuming. I need to find a box with the 3 buttons, on/off, + and -. That's why I was thinking of using a touch screen like the Ellegoo or ESP32 + TFT for about £15-£20.

thank you for the suggestions. Finding suitable parts is so time consuming. I need to find a box with the 3 buttons, on/off, + and -. That's why I was thinking of using a touch screen like the Ellegoo or ESP32 + TFT for about £15-£20.

 

The TFT with touch uses 8 IO pins so you would need a micro with a fair number of IO pins ..........................

 

Arduino themselves do a number of boards with enough IO pins, but they tend not to be low cost.

 

The Pi Pico RP2040 might be worth a look, low cost, plenty of pins, Arduino and Micropython, even a small XIAO sized version.

  • Author
the Pi Pico RP2040 does not have a DAC to simulate the throttle. I know I can use a PWM pin, two resistors and a smoothing capacitor but for ease of connections, can anyone suggest a small board that has a DAC?

If it turns out that only somewhat woolly power application is possible utilising the throttle control, not precise enough, you could try the Guerney SCEPTA - System Cadence Enveloped Power Torque Assistance, as I desrcibed in the post linked below:

 

https://www.pedelecs.co.uk/forum/threads/has-anyone-heard-of-or-tried-toseven-mid-drive.44959/page-26#post-679582

 

In my mind, this would provide distraction-free bike operation traversing hilly terrain, enabling the cyclist to better focus upon enemies.

 

Worry that only woolly power application would be possible, was another reason why I linked to Guerney SCEPTA previously in post #20. Also why I suggested writing the code first, to try driving the throttle control in post #17 using modelled or recorded torque sensor data.

 

_________________

 

EDIT: For convenience I've copied that post linked above and pasted below:

 

Making an effort cycling is something I can't do anymore, therefore I like the Bafang BBS01B's cadence sensored operation, which enables me to pedelec for many miles despite being old and unfit - doing so makes me feel like the Superman I (never) was in the 80s. The other advantage is, I don't turn up to work sweaty in need of a shower. However, your mention of your sliding speed control is interesting - sorry, I can't find that post of yours to link, where you also mention you'd like to use a slider strip to control current next time. I assume you were using a KT system. A simpler automated system to increase current at the detection of increased rider effort might be useful and highly desirable for some. A couple of years ago and the year before that, I suggested that a TS system could be added to the Bafang BBSXX(X) series, suggested using a somewhat clunky method:

 

https://www.pedelecs.co.uk/forum/threads/what-is-the-bafang-bbs-pedal-assist-algorithm.43131/#post-647914

 

 

... Because I'm rather lazy and don't have time to do unpaid programming, I posted that in the hope that someone other than me would take an interest and make available something I could simply buy, and because a torque sensored BBS01B kit isn't something I actually want or have any need for. I also wrote something similar with the same intention the year before under a different username, and I requested the deletion of that username and account by admin, because at the time I found this forum too interesting.

 

Meandering back to the system I wouldn't mind trying using at least once: Cadence sensored with current set at the cotroller via the PAS buttons 1 to 9 (6% [the minimum required to overcome motor resistance, plus a bit] to 100% of say 15A in 9 increments, with 100% keep current for every level), then automatic increase of motor current (except at level 9) using the throttle wires on the BBS01B, upon detection of more torque being exerted by the rider - the more micro than usual microcomputer would detect increased rider effort using a torque sensor of some sort. Current would increase slowly after n seconds (a user changeable variable) of continuous detection of increased effort, using the control input intended for the throttle, and would reduce power over a couple of seconds after detected rider effort is reduced (the power envelope would be user changeable). Ebrakes could be used to stop power at any stage. Fast responsive accurate control using good and expensive torque sensors wouldn't be necessary for what I have described. The Bafang controller's firmware would need certain settings, but no wholesale rewrite of the configurator would be necessary. While riding, one would simply experience more assistance being applied automatically when going uphill or traversing uneven terrain. Too much/too little assistance? Use the +/- PAS buttons (if throttle power is limited to PAS current levels). And the rider wouldn't experience a sudden unexpected huge dangerous increase in motor power triggered by potholes or rocks. Because it's firmware is open source, I also see this possible for the TSDZ2. Again, I'm hoping someone other than me will make something I can simply buy, because I'm lazy and am gleefully happy with my BBS01B's operation, after firmware setting fiddleage.

I tried that, but it didn't work so I invented my own system. It works by reading your thoughts about how much power you want at each time interval of one micro second, then it converts it to an ideal value after comparing how much you want with all other factors, like efficiency, safety, legal and some other secret ones, then transfers the data direct to the controller and feeds back to the brain how much you're getting so that you can modify your thinking. I'll be patenting it under the name of Bi-directional Read And Idealise Neural Feedback Algorithm with Rapid Transfer.

  • Author

I like the idea of Morse code though.

Something like one button, one tap (letter E, half a second) for up, one dash (letter T, one second) for down. Long dash (2 seconds or more) to change torque sensor on/off. Or shout at the arduino's microphone (up, down.., off off).

It's easy to wire and easy to program.

  • Author

thank you for the suggestion. The MCP4725 is good but it does not simplify the wiring.

That's why I was attracted to the ESP32 in the first place, it has two DACs, on pins 25 and 26. I only need one to output to the throttle on the 1-4 cable loom.

That's why I was attracted to the ESP32 in the first place, it has two DACs, on pins 25 and 26. I only need one to output to the throttle on the 1-4 cable loom.

 

How many other IO pins do you need ?

Multiple Buttons ADC Read Through One Pin With Software Button Debounce

 

Edited by lenny

The throttle will expect 1.5 to 4.2V (and provide a 5V supply) and Micropython would certainly make life easy but I don't think there's a 5V MP board right now. I'd go with a XIAO and maybe pick the RP2040 version until MP on the SAMD21 is mature. A 5V PWM output using a FET would work for this and might be simplest overall.
  • Author

How many other IO pins do you need ?

That depends. Basically, the HX711 digitises the Wheatstone bridge and transmits the result to the arduino ( the prototype runs from the controller 5v rail), vcc, ground, data and sck so uses 2 digital pins. The throttle uses one ADC pin. The return throttle signal uses a DAC pin. That's the minimum. However, we need to supply a user interface, 3 buttons and a tft or touch screen or 5 leds. The XIAO may work but I will have problems with the throttle input and return output, they run on 4.5v while the xiao or another esp32 runs on 3.3v

  • Author

The throttle will expect 1.5 to 4.2V (and provide a 5V supply) and Micropython would certainly make life easy but I don't think there's a 5V MP board right now. I'd go with a XIAO and maybe pick the RP2040 version until MP on the SAMD21 is mature. A 5V PWM output using a FET would work for this and might be simplest overall.

I bought a sample of this board: Analog Voltage to PWM Signal Converter 0-5V/0-10V Analog Input Voltage to 0-100% | eBay . It's just to avoid debugging. The world seems to run on 3.3V at the moment.

"If I could sort out the sensors' inferface, anyone can write their own code using arduino tutorials or micropython to drive the PAS and throttle signals. There is no need to change the OEM firmware."

 

Isn't this the low hanging fruit? The forum's full of ideas we'd like to try out if only there were a weatherproof micro with 5V analogue I/O drivers, a throttle plug and a basic UI. A simplified M5Stack or Adafruit Clue targeted at ebike development. The proceeds could fund the gear shaft sensor, unless [mention=32128]StuartsProjects[/mention] gets there first ;)

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...
Background Picker
Customize Layout

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.