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

lenny

Esteemed Pedelecer
May 3, 2023
2,587
768
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?
 
  • Like
Reactions: Woosh

Woosh

Trade Member
May 19, 2012
20,365
16,870
Southend on Sea
wooshbikes.co.uk
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.
 

lenny

Esteemed Pedelecer
May 3, 2023
2,587
768
Multiple Buttons ADC Read Through One Pin With Software Button Debounce

 
Last edited:
  • Like
Reactions: Woosh

AntonyC

Esteemed Pedelecer
Apr 5, 2022
332
144
Surrey
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.
 
  • Like
Reactions: Woosh

Woosh

Trade Member
May 19, 2012
20,365
16,870
Southend on Sea
wooshbikes.co.uk
You may be right on this.
 

Woosh

Trade Member
May 19, 2012
20,365
16,870
Southend on Sea
wooshbikes.co.uk
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
 

Woosh

Trade Member
May 19, 2012
20,365
16,870
Southend on Sea
wooshbikes.co.uk
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.
 

AntonyC

Esteemed Pedelecer
Apr 5, 2022
332
144
Surrey
"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 StuartsProjects gets there first ;)
 
  • Like
Reactions: lenny and Woosh

Woosh

Trade Member
May 19, 2012
20,365
16,870
Southend on Sea
wooshbikes.co.uk
Isn't this the low hanging fruit?
yes, it is but I prefer baby steps.
You don't have 3/5/9 levels of assist anymore and you will be able to use your phone or a low cost touch screen to control your ride instead of your old LCD.
 

StuartsProjects

Esteemed Pedelecer
May 9, 2021
1,786
1,009
The world seems to run on 3.3V at the moment.
The World has been running on 3.3V for a long long time, and a lot more 1.8V stuff around too.

It seems that only the Arduino hobby sector seems to use 5V.

One of the first PCBs I designed, using the sticky transfers and crepe tape method, was a memory expansion board for an Amusement machine. Advanced for the time a huge 7Kbytes of EEPROM using 2708s. That needed supplies of +5V, +12V and -5V, memories.
 
  • Like
Reactions: Woosh

Woosh

Trade Member
May 19, 2012
20,365
16,870
Southend on Sea
wooshbikes.co.uk
So you and I have a lot in common. My first successful design was a DRAM board. It was for the Commodore PET 2001 and later for the BBC Micro model B. Before that, I used expensive static RAMs. DRAMs were much cheaper so margin was much improved.
 

StuartsProjects

Esteemed Pedelecer
May 9, 2021
1,786
1,009
So you and I have a lot in common. My first successful design was a DRAM board. It was for the Commodore PET 2001 and later for the BBC Micro model B. Before that, I used expensive static RAMs. DRAMs were much cheaper so margin was much improved.
BBC Micro ?

I spent a few years looking after the Electronics side of the manufacture of those, several years at AB Electronics in Abercarn. Not a small outfit, we used to make around 5,000 beebs a week at a manufacturing cost of around £130.

Heady days. So much going on, so much to keep secret at the time, but then with no Internet or social media, not a problem.

Amazed to find this video, although I was there, I dont recall knowing about it being filmed, but I do recognise some people in the Video, even after almost 40 years.

 
  • Like
Reactions: Woosh

Woosh

Trade Member
May 19, 2012
20,365
16,870
Southend on Sea
wooshbikes.co.uk
Thank you for reminding me of that chip. Acorn used it. I tried quite hard to convince Beeb users to switch to double density with the WD 1770 chip but it's too late. Acorn introduced the Archmedes while the world turned to IBM and Visicalc
 

AntonyC

Esteemed Pedelecer
Apr 5, 2022
332
144
Surrey
yes, it is but I prefer baby steps.
You don't have 3/5/9 levels of assist anymore and you will be able to use your phone or a low cost touch screen to control your ride instead of your old LCD.
Ditching the usual assist levels has transformed my bike but for the rest.... Can you talk about functionality and benefits?
 

StuartsProjects

Esteemed Pedelecer
May 9, 2021
1,786
1,009
Acorn introduced the Archmedes
And now ARM are a major Global manufacturer, with ARM chips in most all mobile phones.

I wuz there, this machine arrived in the Lab something called an Archimedes, the first ARM powered device in the World, which Acorn wanted us to build.

The significance of the event could not have been predicted, my thoughts were only 'gosh this is fast'.
 
  • Like
Reactions: Woosh