LMH/LHM Switch Support
As mentioned in an earlier post, the V3 can support on-the-fly selection of fixed percentages of a limit parameter (e.g. Plim->MaxCurrent) using a resistor divider and either a conventional SPDT on-off-on rocker/toggle switch or a commercially available ebike 3-position LMH/LHM switch. The switch positions may be arranged either as Low|Medium|High (LMH) or Low|High|Medium (LHM). The LHM configuration is perhaps more suitable for toggle switch installations where it is typically more difficult to hit the center position (H) but very simple to sweep the toggle to either extreme (L,M). This post presents some ways to hook this up.
There are two minor design considerations imposed by the CA:
The approach below is straightforward and allows the L and M settings to be adjusted to any 0-100% value. Even though most of the trimpot range is unused, 20-turn trimpots are very easy to adjust accurately. The three connections CA-5v, CA-POT, and CA-Gnd refer to the Potentiometer connections on the CA PCB.
The circuits below give more restricted adjustment range for the L and M trimpots and so will work accurately with single turn pots. The fixed resistors (R1/R4) are optional and can eliminated if multi-turn trimpots are used. This setup requires a little more effort to select parts that are appropriate so the pots can hit the desired target values but the spreadsheet makes this pretty easy.
Here's the Excel spreadsheet with the circuits above and two more versions that use fixed resistors in place of trimpots. Select the desired circuit on the worksheet tabs on the bottom. If you do not have Excel, download and install free Apache Open Office. The spread has been verified to work with it.
View attachment Resistor_Selector_for_CAv3-0_Limit_Switches_20121009.xls
The worksheets for the first two circuits above look like this:
Since the first two circuits require no customization to select parts to target particular LMH range adjustments, you can just build them with the values shown. If you have some notion of the power settings that you wish, plug the LMH values into the green cells at D16,D17,D18. The matching Vaux voltages will appear in the adjacent yellow cells (1.66v and 3.33v in the worksheet pages above). You can go into the CTRL section of CA Setup and adjust the pots so the screen value of Vaux matches the voltages on the spreadsheet. Done.
The other green cells can be adjusted to accommodate parts on hand and the max current draw will recalculate appropriately. Use this feature to tweak in the parts for the second two circuits. All the sheets work essentially the same and have instructions for use.
Since the trimpots are pretty much in the set-it-and-forget-it category, if you wish you can stash them away inside the CA case and rewire the existing Auxilliary Pot cable (white connector) to the divider to support direct connection to the external LMH switch.
The Setup parameters Aux->MinAuxin and Aux->MaxAuxIn relate only to external Aux POT circuitry and are independent of ThrI and ThrO voltage settings. If the switch circuits are connected as described above, configure these parameters to 0.0v and 4.99v respectively. Modified circuits or different (+/-) supply voltages may require different parameter values.
As mentioned in an earlier post, the V3 can support on-the-fly selection of fixed percentages of a limit parameter (e.g. Plim->MaxCurrent) using a resistor divider and either a conventional SPDT on-off-on rocker/toggle switch or a commercially available ebike 3-position LMH/LHM switch. The switch positions may be arranged either as Low|Medium|High (LMH) or Low|High|Medium (LHM). The LHM configuration is perhaps more suitable for toggle switch installations where it is typically more difficult to hit the center position (H) but very simple to sweep the toggle to either extreme (L,M). This post presents some ways to hook this up.
There are two minor design considerations imposed by the CA:
- The stated max current available to power external circuits from the CA PCB +5v pads is 5ma. There is actually a little more headroom for lower voltage battery packs: The CA 5v linear regulator should be limited to 1.5W and the CA proper requires about 10ma to operate. The total available current to operate the rider throttle and Vaux divider is therefore roughly 1500mW/(Vbatt - 5v) - 10ma. So, for a pack voltage of 52v we get 1500/(52-5) - 10 ~= 20ma; for a 100v pack we get 1500/(100-5) - 10 ~= 6ma. A Magura throttle has a resistance of about 5K and so draws about 5v/5K = 1ma which must be subtracted from the total; we need to limit the divider to 19ma or 5ma for the 52v or 100v packs respectively. It's not hard to keep the total draw down to a few ma so we have a workable safety margin even for the worst case scenario with the big pack.
- The A/D converter input impedance should be limited to no more than 10K to achieve full 10bit accuracy. However, even if this limit is exceeded, the loss of a bit or two of accuracy will have negligible impact in this application.
The approach below is straightforward and allows the L and M settings to be adjusted to any 0-100% value. Even though most of the trimpot range is unused, 20-turn trimpots are very easy to adjust accurately. The three connections CA-5v, CA-POT, and CA-Gnd refer to the Potentiometer connections on the CA PCB.
The circuits below give more restricted adjustment range for the L and M trimpots and so will work accurately with single turn pots. The fixed resistors (R1/R4) are optional and can eliminated if multi-turn trimpots are used. This setup requires a little more effort to select parts that are appropriate so the pots can hit the desired target values but the spreadsheet makes this pretty easy.
Here's the Excel spreadsheet with the circuits above and two more versions that use fixed resistors in place of trimpots. Select the desired circuit on the worksheet tabs on the bottom. If you do not have Excel, download and install free Apache Open Office. The spread has been verified to work with it.
View attachment Resistor_Selector_for_CAv3-0_Limit_Switches_20121009.xls
The worksheets for the first two circuits above look like this:
Since the first two circuits require no customization to select parts to target particular LMH range adjustments, you can just build them with the values shown. If you have some notion of the power settings that you wish, plug the LMH values into the green cells at D16,D17,D18. The matching Vaux voltages will appear in the adjacent yellow cells (1.66v and 3.33v in the worksheet pages above). You can go into the CTRL section of CA Setup and adjust the pots so the screen value of Vaux matches the voltages on the spreadsheet. Done.
The other green cells can be adjusted to accommodate parts on hand and the max current draw will recalculate appropriately. Use this feature to tweak in the parts for the second two circuits. All the sheets work essentially the same and have instructions for use.
Since the trimpots are pretty much in the set-it-and-forget-it category, if you wish you can stash them away inside the CA case and rewire the existing Auxilliary Pot cable (white connector) to the divider to support direct connection to the external LMH switch.
The Setup parameters Aux->MinAuxin and Aux->MaxAuxIn relate only to external Aux POT circuitry and are independent of ThrI and ThrO voltage settings. If the switch circuits are connected as described above, configure these parameters to 0.0v and 4.99v respectively. Modified circuits or different (+/-) supply voltages may require different parameter values.