Due to some unfortunate circumstances, the guy I was going to complete the trip with had to be back by September 22nd (which was the original leave-date) so the 6-week trip had to be postponed and replaced with a 1-week trip. This also meant that I had 1 week less to complete the BRBS (though I didn't have to complete it as 1 week's worth of batteries probably weighs less than the BRBS anyway).
The control system: I decided to use the same controller board I had built earlier. The controller has two totem-pole outputs each offset by 180°. As each one only goes up to about 49%, I used two parallel mosfets with a gate on each output. Next I had to devise a system of controlling it. A magnet and hall-sensor on the brake lever seemed most reasonable. I drained out a few drops of brake fluid from the brakes to create a larger 'dead-zone' for the BRBS to activate in. The problem however was what is to be controlled? Simply adjusting the duty-cycle of the boost converter will only adjust the input-to-output voltage ratio, meaning that the only thing limiting the output current would be internal resistance of the dynamo and the battery pack (ie. the brake will be either fully-on or fully-off, with very little control in-between). What it needed for a realistic braking experience was to simulate a variable output-impedance.
(the other magnet on top was for an alternative mounting position of the hall sensor)
Creating a variable impedance load isn't as easy as it may sound. The ratio of input current to input voltage needs to be measured, and then compared against a variable value (the inverse of the load impedance). There wasn't enough time to muck around with a microcontroller; it needed to be done in analog.
The input voltage was attenuated by a voltage-controlled resistor (controlled by the brake lever hall-sensor), then fed into the inverting side of the controller's error-amplifier. For the voltage-controlled resistor, an LED was glued to a CdS light-dependent resistor (according to standard procedure) and covered with more glue and heat-shrink tube. A variable resistor was placed in series to adjust the minimum load-impedance, so that it would never go below the impedance of the dynamo. A measurement of the input current was fed into the non-inverting side of the error-amplifier, taken with a MAX44284 high-side current-sense amplifier (quite overkill, I only had to use few cm of 18AWG wire as the current shunt because of the 200x gain). And it worked!
(There's actually 3 LEDs there, for separate galvanicly-isolated inputs just in case I need them in a later modification)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.