GoldenMotor.com Forum

General Category => General Discussions => Topic started by: mitch_781 on August 19, 2008, 10:24:21 AM

Title: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on August 19, 2008, 10:24:21 AM
Hello,
I just finished to build my ebike it is 48V hub motor and I use a small battery 48V 4,2Ah NiMH because I don't go very far. The motor and controller are working very well but the battery is to small and when I go full throttle the battery voltage goes under 40v and the controller cut the power. It is going worst after a few kilometers.

The throttle control work with a hall effect sensor (see the picture) , is it possible to make an electrical system that limit/control the throttle to have only for example 41v at the battery and avoid cutting the power all the time ? If anyone has an idea to build the system it could be interesting for people who are using small batteries (or batteries with a big internal resistance like nimh).

See the throttle control with the hall sensor in the attached picture.

Thank you
Have a nive day
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: ahend on August 19, 2008, 12:23:55 PM
I have been contemplating a rework of the electronic throttle hold that I built for some time. Others were musing over the possibility of locking the controller into a mode that would not allow it to draw amperage over a certain level. This would help to get you home if your pack was dying, or could serve to extend the usable range of your pack.

This could be done using a PID loop, or some variation thereof. You could sample the pack voltage, or circuit current, as the process value and the output would be a pulse width modulated voltage signal to the controller’s throttle input. All this functionality would reside on a microcontroller.

I do have some PID code that I have not messed around with yet. That would be the only technical hurdle to jump in making such a system. The throttle lock code running in my cruise control, including the PWM output has been working great.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: andre on August 19, 2008, 07:20:54 PM
Hello,

Did you think about the cycle analyst from www.ebike.ca instead?
This allow to have a control loop in the controller, and limt the speed (for me I use it to control the max allowed speed... by a connector that is deconnectable, in case of control...but I've never been stopped for that time) , max amp (i.e max power send to engine = you can that way respect the max power setting required by regulation like 250w in france by just putting the max amount of amp that is required by Pin=U*I, like ~5 amp for a 48v battery..., even on a 48v 1000w engine!), and also min voltage , to decrease current drawn from the battery  when it is reached and protect the packs...
you can program whatever the number you want by a single button.
You just have to solder a wire in the controller.
I did it on a 36v regen controller (max speed without pedaling =30km/h)and now on a 48v regen controler (max speed w/o pedalling = 42km/h, >50 km range on dowtown commuting trips, but I use a 48v 15ah lifepo4) and it work pretty well. On top of providing lot of very useful info to plan your trips and follow the battery drain....This is worth the money!

Hoping that helps

Andre.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 19, 2008, 07:48:54 PM
it's easy to do it without microcontrollers if you want a really simple solution. assumptions: throttle supply is stable at about 3-5V (call it Vdd), throttle output is zero for no power, controller throttle input is relatively high impedance.

use Vdd to power an open drain (or open collector) rail to rail 3-5V single supply comparator. use a 2 resistor divider to bring the batt voltage down to the 0-Vdd range (under all circumstances) and hook the middle tap to the positive comparator input. divide Vdd using a 15-25 turn trimpot (best if impedance at the tap is similar to the tap of the other divider when trimmed to the right cutoff point) and hook it to the neg input.

insert a series resistor Ro between the throttle output and the controller input and tie the comparator output to the controller side of Ro. the comparator grounds the controller input when the batt voltage sags, Ro limits the grounding current affecting the throttle and the comparator. you may add a second resistor between the comparator output and the controller to protect the comparator from ESD. and add supply decoupling according to comparator datasheet.

IMPORTANT: before starting test that the series impedance in the throttle line will not affect controller performance (ie: verify the assumption).


here's a list of apparently suitable comparators from TI in easy to solder packages:
http://focus.ti.com/paramsearch/docs/parametricsearch.tsp?&showAllResults=true&totalCount=12&showAllResultStatus=true&familyId=81&uiTemplateId=NODE_STRY_PGE_T&techFamId=null&sectionId=null&tabId=null&appId=null&viewDeviceCallingPage=null&totalCount=12&showAdditionalParameters=yes&parameter=2479504385&parameter=2479504386&parameter=2480904669&parameter=2480904467&parameter=2480904532&parameter=2480904429&parameter=2581304386&parameter=2443104386&parameter=2443104390&rpc=D_PARAMETER_2101261|LTEQ|3.3|0&rpc=D_PARAMETER_2201261|GTEQ|5|0&lc=2000078&lc=2000480&lc=2000494&lc=2000916&lc=2001163&lc=2100217&lc=2200001&lc=2200002&lc=2000083&lc=2001192&lc=2001498&lc=2301166&compare=yes&download=yes&sort=yes&customize=yes&paramResults=yes&paramCriteria=yes&familyTree=yes&military=no&baSystem=yes&paramTable=no&sortOption=PA_SUB_FAMILY_NAME&sortMode=ASC&searchPaths=1000081&pageId=undefined&templateId=0&navigationId=0&family=analog&paramTable=no&military=no&ul=LM2903&ul=LM2903V&ul=LM293&ul=LM293A&ul=LM393&ul=LMV393&ul=TLC352&ul=TLC372&ul=TLV2302&ul=TLV2352&&uiTemplateId=NODE_STRY_PGE_T&techFamId=null&sectionId=null&tabId=null&appId=null&viewDeviceCallingPage=null#rt (http://focus.ti.com/paramsearch/docs/parametricsearch.tsp?&showAllResults=true&totalCount=12&showAllResultStatus=true&familyId=81&uiTemplateId=NODE_STRY_PGE_T&techFamId=null&sectionId=null&tabId=null&appId=null&viewDeviceCallingPage=null&totalCount=12&showAdditionalParameters=yes&parameter=2479504385&parameter=2479504386&parameter=2480904669&parameter=2480904467&parameter=2480904532&parameter=2480904429&parameter=2581304386&parameter=2443104386&parameter=2443104390&rpc=D_PARAMETER_2101261|LTEQ|3.3|0&rpc=D_PARAMETER_2201261|GTEQ|5|0&lc=2000078&lc=2000480&lc=2000494&lc=2000916&lc=2001163&lc=2100217&lc=2200001&lc=2200002&lc=2000083&lc=2001192&lc=2001498&lc=2301166&compare=yes&download=yes&sort=yes&customize=yes&paramResults=yes&paramCriteria=yes&familyTree=yes&military=no&baSystem=yes&paramTable=no&sortOption=PA_SUB_FAMILY_NAME&sortMode=ASC&searchPaths=1000081&pageId=undefined&templateId=0&navigationId=0&family=analog&paramTable=no&military=no&ul=LM2903&ul=LM2903V&ul=LM293&ul=LM293A&ul=LM393&ul=LMV393&ul=TLC352&ul=TLC372&ul=TLV2302&ul=TLV2352&&uiTemplateId=NODE_STRY_PGE_T&techFamId=null&sectionId=null&tabId=null&appId=null&viewDeviceCallingPage=null#rt)

this is a single comparator:
http://focus.ti.com/docs/prod/folders/print/tlv3401.html (http://focus.ti.com/docs/prod/folders/print/tlv3401.html)
keep output current below 0.4-0.5 mA (requires Ro of about 10K).

this dual has a higher output current:
http://focus.ti.com/docs/prod/folders/print/tlv2352.html (http://focus.ti.com/docs/prod/folders/print/tlv2352.html)
but common mode range is 0 to Vdd-1.25V, so scale the dividers down.

(this one's cheaper if you have to buy it:
http://focus.ti.com/docs/prod/folders/print/tlc372.html (http://focus.ti.com/docs/prod/folders/print/tlc372.html)
common mode 0 to Vdd-1.5V.)

TI offers an excellent sample service, they'll send you samples of all these for free if you qualify. you'll probably want them in PDIP packages. please don't abuse TI's sample service.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 19, 2008, 07:59:04 PM
I wouldn't really recommend using an Ro above 1K, but you could test.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: ahend on August 19, 2008, 10:35:17 PM

Lanchon,
I’m not to too fluent in electronics, more study than application I’m afraid, but I think an analog approach to this problem would be pretty interesting. Help me to understand a couple points regarding your circuit.

If the comparator output is discrete, grounded or open, this would act as an effective LVC. What would “throttle” the controller output down as the battery voltage approached the comparator’s reference?

The output resistor, Ro, will attenuate the normal throttle response so it would need to be minimized. As I recall, my throttling current was about 50 micro amps, so a 1k resistor should have a small enough footprint.

Thanks
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 20, 2008, 12:36:15 AM
hi andy,

> The output resistor, Ro, will attenuate the normal throttle response

that depends on the controller input. since you asked, I dug the schematic of the old golden controller: that controller has a 100K to ground (to handle disconnections) so a 1K series will form a divider that'll let through 99% of the voltage.

note that this won't limit max speed, it just means that you have to turn the throttle 1% more (it has dead-turning at both ends). also note that resistors in the circuit are already 5% tolerance and the sensor probably has wider variance, so there's really no concern *with that particular controller*.

more importantly, the same controller has an RC filter in the throttle input. the R is 3.3K, so adding 1K (and assuming zero impedance on sensor output) means lowering the cutoff frequency about 25%. but I suspect the C is 0.1uF, so cutoff would be 480Hz. lowering it to 370Hz would be no problem; you can't turn the throttle that fast!

anyway, it might be ok to short the sensor output to ground (it might have a pullup instead of an active high drive), and short current could be below what the comparator handles; in that case Ro could be zero. (you can measure short current if you want.)

> If the comparator output is discrete, grounded or open, this would act as an effective LVC. What would “throttle” the controller output down as the battery voltage approached the comparator’s reference?

negative feedback. when the comparator triggers it'll cut the throttle; this will lower the current from the battery and voltage will rise, and that will open the throttle again.

keep in mind that:
1) there's a time-discreet loop that samples the throttle signal,
and 2) current in the motor windings take many sample cycles to build up with the full battery voltage applied (it's inductive).

so there's 1-bit time sampling (instant comparator feeding 0 or 1 to the periodic A/D) with negative feedback over an integrator (the windings). this is in effect a sigma-delta modulator: output will alternate between 0 and 1 as fast as possible, but all the while making the mean value of the bit stream such that the mean batt voltage remains at the comparator trip-point. you may think that this isn't nice, but it'd probably work very smoothly.

but we're forgetting:
3) there's probably a low-pass filter before the A/D in your controller that dominates the frequency response of the loop. so the filter sort of reconstructs an analog signal from the sigma-delta stream and feeds the A/D a constant voltage, behaving more like you'd expect. (but I say sort of because a reconstructing filter should really be placed after the time-sampling, so this is only an approximation.)

in reality the dynamic response would depend on the relative values of various parameters such as winding current slope, throttle sampling frequency, PWM update frequency, throttle signal bandwidth, etc. but whatever the values, this simple circuit will probably work well enough. and you could always add a filter capacitor or two to tune performance. you could even do a full PID in analog form but I'd go with a microcontroller if a PID is needed; however I don't think that's the case.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on August 21, 2008, 10:23:42 AM
Hello,

Thank you for your answers and the big interest you show on this topic. I am not sure to understand everything because I am not fluent in electronic as well and in english also.

I found a schemtic that may help us, it is called : amplificator differential

if you look the formula :

Vs=(R2/R1)(V2-V1)
so
Vs could be the input power of the hall effect throttle going for 5V(full charge) to 0V(low bat) depending on the level of the battery
V2 = battery voltage from 60V to 40V
V1 = reference voltage 40 or 41V built with a few zener diodes and a resistor.
R2/R1 = used to reduce voltage 60V -> 40V to 5V -> 0V


The thing I am not sure is  : will the hall effet throttle work well with an input voltage that is from 0V to 5V, or is it only working with 5V ?
I also don't know how to choose the right resistances and zener diodes to have a good working of the system.

Do you know if this could work ?

Thank you have a nice day
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 22, 2008, 01:06:56 AM
> Do you know if this could work ?
the design you propose has problems. I've already gave you an ok circuit and on my own I don't see the point of going with an inferior design. unfortunately I don't have a scanner so I can't post a schematic; the text description will have to do.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on August 22, 2008, 01:13:48 PM
Hello,
I tried to do the shematic with your explanations , is it OK ?

I think it can work but I don't understand when the comparator output is 0V, the controller input is 0V even with R0 so the throttle is cut ?

And also it seems to be a on-off control, maybe it could be possible to improve it and have a small regulation, the more the battery sag the more the throttle is reduce (that was the objective of my shematic before).

Thank you for your help.
@+
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 23, 2008, 07:41:32 AM
> I tried to do the shematic with your explanations , is it OK ?
yes, it's fine. don't include an "R?". you have to add a decoupling capacitance between Vdd and ground, near the comparator: a 0.1uF capacitor (or better 0.1uF capacitor in parallel with a 10uF) will be fine.

IMPORTANT: do NOT connect the battery ground to the circuit, only the positive wire. the battery negative must NOT be connected a) to the sensor ground, nor b) to the lower part of the battery divider. all grounds must come from the sensor ground.

> I think it can work but I don't understand when the comparator output is 0V, the controller input is 0V even with R0 so the throttle is cut ?
correct, it's cut when comparator is grounding the output. otherwise it's whatever the sensor outputs. (please clarify your question.)

> And also it seems to be a on-off control, maybe it could be possible to improve it and have a small regulation
it *will* regulate, don't worry abut that.

next you got to:

1) measure the Vdd voltage.
2) select an appropriate comparator THAT YOU CAN GET YOUR HANDS ON. I suggest using a DIP package and a socket; if you fry it, you can easily change it.
3) then I'll help you select the rest of the components accordingly.
4) in particular, you have to test that adding an Ro won't affect controller performance before building the whole thing. or you can try it now, by adding a 1K resistor.

you can add a voltage reference (or just a regulator) feeding the trimpot from Vdd  for extra accuracy (I don't know how constant is your Vdd, variations in Vdd will provoke variations in the Vbat trip-point). where are you buying or getting your comparator? where are you located?

also, if you use a dual comparator you just can't leave the unused comparator unconnected, I'll tell you what to do when you get your hands on a specific part.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on August 25, 2008, 10:50:30 AM
Hello,

Thank you for your answer and your help again,

> I think it can work but I don't understand when the comparator output is 0V, the controller input is 0V even with R0 so the throttle is cut ?
>correct, it's cut when comparator is grounding the output. otherwise it's whatever the sensor outputs. (please clarify your question.)

Maybe there was a misunderstanding, the target for me is to build a circuit to avoid the controller to cut the power when the battery goes under 40V by controlling the throttle. I have a quite small battery and even with the battery full charged when I go full throttle the voltage goes under 40V and the controller cut the power so I must release the throttle wait a bit and go medium throttle. Also the limit is very difficult to feel when you climb a hill.

I think your circuit is cutting the throttle when the battery is to low (my controller is already doing this) I would like to prevent the cut of the battery and control the throttle to be always upper than 40V.

I know there is a cycle analyst that is sold to limit the down voltage but I don't know if it works on GM controller and I don't know if there is a regulation (and also it is 150$ and I don't need all the other fonctions, Wh, speed ...).

I think with a small circuit it could be possible to have a good solution but I am not sure if it is ok because I don't know how is working the controller input and I did not practice electronic after school.

I took a part of your previous schematic and modified it :
1st AOP (=comparator) is to follow battery voltage
2nd AOP make the comparison battery voltage  / minimum limit allowed + amplification result is 5V =R*(60V-41V) = full power allowed for example.
transistor regulate the throttle.
3rd maybe necessary : AOP to follow the output voltage of R6 (throttle input to the controller)

1) measure the Vdd voltage.
Ok I'll do this as soon I will be back after my holidays.

2) select an appropriate comparator THAT YOU CAN GET YOUR HANDS ON. I suggest using a DIP package and a socket; if you fry it, you can easily change it.
I have already an idea on which socket I'll do it. (I don't know the translation)

3) then I'll help you select the rest of the components accordingly.
thank you, if everything works well I'll post the final solution to allow everyone to use it. I know this problem of cutting voltage is frequent with the 1000W motor.

4) in particular, you have to test that adding an Ro won't affect controller performance before building the whole thing. or you can try it now, by adding a 1K resistor.
That is the reason why I would prefer to command the controller with a voltage output.

>you can add a voltage reference (or just a regulator) feeding the trimpot from Vdd  for extra accuracy (I don't know how constant is your Vdd, variations in Vdd will provoke variations in the Vbat trip-point). where are you buying or getting your comparator? where are you located?
That is why I wanted to use zener diodes to fix the voltage but maybe just just with a trim pot it will be ok, I live near Paris so I think I can find a local dealer for all the electronic.

Find attached a schematic I made with TINA, it is free download on www.telecharger.com

there is also diptrace it is free and english + french software, it seems to be powerfull.
http://www.01net.com/telecharger/windows/Loisirs/electronique/fiches/37752.html

So, I hope to be able to build a first circuit soon but I prefer to be sure beacause I don't want to fry my controller.

Have a nice day

Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 25, 2008, 11:46:27 AM
look, no offense intended, but I'm gonna help you only if you want to be helped. there's no point in me telling you what to do if you're going to do something else. it's entirely your decision to trust me or not to do it. and your decision may be complicated by the fact that I have no desire to win your trust and won't do anything to that effect.

so, in case you do choose to trust me:
-there's no misunderstanding on what you want to do.
-my circuit does it; it's not a LVC, it'll function as a regulator.
-your circuit has problems.

>> 4) in particular, you have to test that adding an Ro won't affect controller performance before building the whole thing. or you can try it now, by adding a 1K resistor.
>That is the reason why I would prefer to command the controller with a voltage output.

there's no reason to complicate a simple circuit that's very probably appropriate. if it isn't, according to testing, it can be made appropriate by adding a buffer or choosing a comparator that can sink more current.

> That is why I wanted to use zener diodes to fix the voltage but maybe just just with a trim pot it will be ok

I'll know if a regulator is needed with some certainty as soon as you measure Vdd, and not before.

so you have to:
a) measure Vdd,
b) choose a retailer in your area with online presence so that I can select the most appropriate components,
c) and sooner or later you'll have to test the series impedance (if done before "b)", use a 1K resistor).

thanks for the pointers but I won't install any software; I don't use windows or proprietary software. don't waste your time and money routing a board: the easiest way to build this very simple circuit is using a small perf-board. or it could be done dead-bug style (wikipedia).

and one more important thing: you have to check the assumption that battery ground and sensor ground are approximately at the same potential.

could you post a pic of your controller?
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on August 25, 2008, 04:32:14 PM
Sure I want to be helped but I 'd like to understand what I do. It is maybe easy for you to say the circuit has problems but it is not for me to understand why.  ::)

Concerning your circuit, I think I understood how it works the regulation is done by puting to throttle to zero every time the battery is under a level, the input of the controller will be 5V-0V-5V-0V and the mean value will correspond to the maximum throttle allowed to keep the battery at the level. (I hope it will be fast enought)

I will follow your circuit, sure it is more simple and it must work.

a) measure Vdd,
I will do this after my holidays in 3 weeks, no problem.

b) choose a retailer in your area with online presence so that I can select the most appropriate components,
I will order to radiospares, all componants are here for the AOP :

http://radiospares-fr.rs-online.com/web/search/searchBrowseAction.html?method=browseSuperSection&Ne=4294958156+4294965516&N=4294963037#

c) and sooner or later you'll have to test the series impedance (if done before "b)", use a 1K resistor).
I will do it also no problem.

I put the updated circuit below.

Thanks
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 26, 2008, 03:59:28 AM
ok, when you measure Vdd (and the voltage between grounds) we'll continue.

> I will order to radiospares

they seem adequately stocked.

> It is maybe easy for you to say the circuit has problems but it is not for me to understand why.

please understand it's much more effort for me to explain these things than to design an ok circuit.

the most important thing: even if your circuit did what you want (it doesn't), it wouldn't work; it would oscillate between 0 and Vdd just like mine. the reason is loop instability induced by the group delay between throttle input and battery sag.

no doubt it could be turned into a compensated (say, a PID) controller, but are you willing to ride with a portable oscilloscope analyzing responses and tuning the PID while you negotiate traffic? I'm giving you a simple solution that you'll probably find quite acceptable and that doesn't need complex calibration, just the desired trip-point.

one more thing: with 2 or 3 small components you could add a LED to show when limiting is occurring. if you'll mount the circuit in a visible place, it could be worth the effort. (routing two long wires to a visible led is probable overkill...)
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on August 26, 2008, 10:31:58 AM
Hi Lanchon,

Sorry but I have a last question regarding your circuit (I think it would be difficult to find more question on a simple circuit like you proposed ), I understand it will regulate but I don't undertstand how the throttle works now.

The output of the comparator can be only Vdd(5V) or 0V, this output is linked to the throttle input controller so how works the hand throttle if the output is always Vdd (5V) or 0V at the throttle input controller ? (the hall effect sensor has no effect now ?)

There is maybe something I did wrong in the circuit : Is the Vdd linked to the positive power input of the comparator ?

Regarding the componants I can order them now, it is only the measure of the Vdd that I will do in September (or maybe you want to know Vdd voltage before choosing the comparator)

Find below the only picture I have of the controller, It is a picture of all the parts I received. (there is nothing at all written on the controller.)

Also don't worry I will leave you in peace for next two weeks beacause I will not have internet access.

Thanks again for your help
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 26, 2008, 10:39:56 AM
hi,

> The output of the comparator can be only Vdd(5V) or 0V
> maybe something I did wrong in the circuit

you did nothing wrong. the output of the comparator is either ground or high impedance, not ground or Vdd. that's called an open collector (bipolar) or open drain (mos) output.

> you want to know Vdd voltage before choosing the comparator

definitely.

post when you get back, have a nice time!
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on August 26, 2008, 10:45:01 AM
that's exactly like the old 36V controller I got in 2006, probably has a similar circuit. when you measure Vdd do it with the throttle plugged in, if possible. you might find it's something like 4.3V that way, and about 5V when the throttle's not connected.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on January 02, 2009, 05:11:34 PM
Hello,

It's a long time since my last post but I have more time now to work on the project of limiting voltage drop for small batteries.

I measured the voltage of Vdd on the throttle it is 4.36v (throttle connected) and on full charge the voltage does not move, it is always 4.36v.

Next step is :
to check if a 1K resistor has an influence on the throttle
Check if voltage of ground of resistor and ground of battery is the same

Before I will post an updated circuit with the values I will use, to check if everything is ok.

Thank you for your help Lanchon with your last posts.

Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on January 02, 2009, 06:19:25 PM
Circuit update :
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: biohazardman on January 13, 2009, 05:00:20 AM
Circuit update :
Would it not be allot easier to get a bit more battery or replace it with something that will not have the voltage sag so you would not have the need for more electronics.  That does seem to be the problem does it not?
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on January 13, 2009, 06:32:33 PM
Hello, it is true but first I have already spent 350$ for nimh batteries (because it is more safe than Lipo and more green than nicd),
 second I didn't expect that the manufacturer TENERGY (allbattery.com) will send non conform batteries less than 3Ah instead of 4.2Ah indicated.
So I prefer to stop purchasing batteries and loose money because I want to have only 4Km of range with my bike.

Also even with large batteries,i would have the cutting problem at end of use.

I think if the circuit is working it is very usefull for everybody who has cutting problem with a small battery (or end of use), and it is very simple only a few resistors,a comparator and one circuit you can do yourself.

I should be able to do the last 2 check next week end and after I'll start to look for a comparator and do the circuit.   
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: biohazardman on January 14, 2009, 04:28:19 AM
Hello, it is true but first I have already spent 350$ for nimh batteries (because it is more safe than Lipo and more green than nicd),
 second I didn't expect that the manufacturer TENERGY (allbattery.com) will send non conform batteries less than 3Ah instead of 4.2Ah indicated.
So I prefer to stop purchasing batteries and loose money because I want to have only 4Km of range with my bike.

Also even with large batteries,i would have the cutting problem at end of use.

I think if the circuit is working it is very usefull for everybody who has cutting problem with a small battery (or end of use), and it is very simple only a few resistors,a comparator and one circuit you can do yourself.

I should be able to do the last 2 check next week end and after I'll start to look for a comparator and do the circuit.   
I do understand that the batteries are spendy for sure.  They can be heavy also.  I spent a hundred dollars more than you and got some LifePo4s was a hard thing to spend more on batteries than the cost of the bike but the twelve pound 36V FoxPower pack has been very good and gives me about 20 miles per charge.  Currently have near 2K miles on it.  Hope you are able to get things to work correctly with the small and light battery pack you have.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on January 19, 2009, 04:07:50 AM
hi! long time no see!

please post your results of:

>Next step is :
>to check if a 1K resistor (IN SERIES ON THE SIGNAL WIRE) has an influence on the throttle
>Check if voltage of ground of *THROTTLE* and ground of battery is the same (OR MOSTLY THE SAME)

after that let me select an open collector (or drain) comparator for you, or have you already got one? only then we can size the rest of the components.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on January 19, 2009, 09:01:21 AM
Hi Lanchon,

Yes a long time but I have more time for the moment to work on it.

I confirm, the resistor had no influence on the throttle (or I did not noticed it).

and the level of the ground of throttle is the same of the ground of battery (0V).

So everything seems to be ok to build the circuit.

I don't have the comparator but I will try to by one to a local dealer in case I have question to ask. Thank you if you can help me to choose one. Maybe if you know a very standard or very used comparator it will be easier for the dealer to get one.

See you
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on January 19, 2009, 06:18:10 PM
I looked through your proposed retailer. this is what I recommend:

http://radiospares-fr.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=0402885

it's a single rail-to-rail 4us open drain comparator supporting up to 30mA sinking.

it's a bit expensive @ 3.74 euro, you could save up to 3 euro going for a less ideal device, but I guess 3 euro is no issue for a prototype. the other options are dual:

http://radiospares-fr.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=0649475
http://radiospares-fr.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=5343009
http://radiospares-fr.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=0810239
http://radiospares-fr.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=3564412

please verify that you're willing to go with the MCP6546-I/P and able to find it.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on February 02, 2009, 05:55:15 PM
Hello Lanchon,

I found all the componants I need, I bought the TLC393CP because they didn't have the others in the shop.

I have one more question before I begin to build the schematic.

Are you sure that the IN- is connected to battery / 15 and the IN+ connected to the middle of the variable resistor ?

Because if we want to ground the throttle command when the battery is to low, it should be the opposite ?

if IN- < IN+ ==> output is 5V and we would like to have 0V I think to ground the throttle input ?

Do you agree ? (I put the schematic of my proposition)

Thank you if you can help me again.
Have a nice day

Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on February 03, 2009, 07:01:35 PM
yes, I agree. you drew it wrong before, check out my original post: "use a 2 resistor divider to bring the batt voltage down to the 0-Vdd range (under all circumstances) and hook the middle tap to the positive comparator input. divide Vdd using a 15-25 turn trimpot (best if impedance at the tap is similar to the tap of the other divider when trimmed to the right cutoff point) and hook it to the neg input."

the assumption is that:
IN+ > IN- => output is high impedance
IN+ < IN- => output is low

however, this is just an assumption. in the datasheet this is not specified and there are numerous errors. for example, fig 19 and fig 21 both have a triangle oscillator at the left, and they both use the same circuit except for input polarity. needless to say, one of them does not work. fig 20 uses a strange comparator symbol, where the circle (depicting inversion) is drawn on the positive input... yeah, right.

I wouldn't bother to verify the assumption, but if you want to, check out the LM393 datasheet; this is the device the TLC393 tries improve upon.

now that you decided on a particular comparator, I'll tell you the values of the rest of the components soon. I'm sorry I can't do it right now. don't start building until then.

for the actual build, I recommend a perf board (check wikipedia), or dead bug style (wikipedia) and gluing the components with a hot plastic glue gun. you can use small gauge thermoplastic insulators to use resistors directly as interconnects. once you're sure everything works really fine, you can hot-glue it all for sturdiness. use an IC socket if you use a perf board. actually, it's such a simple circuit that you can really build it any way you want.
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on February 11, 2009, 12:12:06 PM
Hello Lanchon,

Sorry if I took a particular comparator, I thought all of them were possible with no influence on the shematic.

I have every thing ready to solder on a plastic plate according the last schematic I did.

 I don't understand the datasheet at all. I wait for your next post if you think there is modifications to do I will follow you.

Thank you in advance for your great work.
Have a nice day







Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on February 11, 2009, 08:04:04 PM
here's the schematic and parts. two circuits, one has a led power-limiting indicator. the led should have a monostable to keep it fully on during limiting, but it doesn't and instead it will be pulse width modulated (brightness is "proportional to the amount of limiting"), so I don't like it very much. your choice.

several optional resistors marked as "zero ohms" beg explanation. R3 & R5 would increase the precision of R4, but that's not necessary. R7 helps protect the output of the comparator form static discharges, I'd include it. R8 helps prevent a latch-up, it's being a bit paranoid, but I'd include it if it's comfortable to do it during the building (ie: if I have some space for the resistor and easy access to it).

again: use a socket for the IC if you can.

happy building!
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on March 04, 2009, 02:37:04 AM
hi Mitch,

any news?
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on March 04, 2009, 08:23:33 AM
Hi Lanchon,
I have done the circuit 2 week ago but I did not tested it yet because my bike is in my parent's house.
So I will not test it before end of March when I'll visit them.(a long time to wait)

I hope I'll find some equipment before to test it with a power supply.

Thanks for your help again, I'll keep you informed if everything works well.


Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on March 30, 2009, 03:40:34 PM
Hello Lanchon,

I 've just test the circuit last week end.

The circtui was working but time of the controller for the response is smaller than expected.
So every time the circuit was putting the throttle at 0V, I had a cut of power, than full power than cut of power...

Nearly 3 times or more per second. So it is not possible to use it like this, it is always on-off-on....

I tried to change the tension level of the circuit but it is always the same, the response of the controller is to short and the power is cut.

What do you think of adding a small capacitor at the output of the comparator ?
But I really don't know what size I should use.

If you have any other idea don't hesitate.


Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: muzza.au on March 30, 2009, 09:04:47 PM
G'day,

you could save youselves all the trouble and just get the "Cycle Analyst". It has the ability to program a low voltage cutoff. From the manual:
Quote
6.4 Volts Limit
Program the low voltage rollback point for your battery pack. The
Cycle Analyst will reduce power drawn from the controller in order to
keep the battery voltage from dropping below this limit.
However this may be for the direct connect version, I'm not sure about the stand alone model.

Muzza.au
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on March 31, 2009, 02:29:44 AM
sorry to hear you have problems. I need you to answer a couple of questions more precisely:

> So every time the circuit was putting the throttle at 0V, I had a cut of power, than full power than cut of power...
1) you mean that the power oscillates between zero and whatever happens to be the throttle position, while you keep the throttle steady. is this correct?

2) if you don't push the throttle too hard, the bike works fine as it did before. correct?

3) are you sure the low voltage cutoff of the controller IS NOT triggering when the oscillations occur?

4) what value did you use for R7?

5) are you sure you made no mistakes building the circuit?

assuming nothing strange is happening (low voltage cutoff, mistakes, etc) it seems that the loop is unstable because the controller introduces too much delay or nonlinearity in the signal path. (or both; such would be the case if it implemented a ramp-up in software, which I guess it probably does.)

in both cases, the loop can be stabilized by adding a low-pass filter, which can be implemented with just a resistor and a capacitor, so don't worry too much.

> Nearly 3 times or more per second.
6) would 3 Hz be a good estimate of the frequency of the power oscillation?

cheers!
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on April 03, 2009, 07:41:48 PM
Hello,

I will try to answer as well as I can :

1) you mean that the power oscillates between zero and whatever happens to be the throttle position, while you keep the throttle steady. is this correct?
At low throttle it was working as usual with no problem
but with full or hight throttle the circuit was cuting the power on-off-on all the time.

2) if you don't push the throttle too hard, the bike works fine as it did before. correct?
Yes true , with small throttle it is working well as without the circuit.

3) are you sure the low voltage cutoff of the controller IS NOT triggering when the oscillations occur?
Yes I am sure I tried to modifie the tension cut off of the circuit and I found the controller cut off like it was before, the controller cut off take a long time 2 to 3 sec.

4) what value did you use for R7?
100ohms like proposed

5) are you sure you made no mistakes building the circuit?
Yes I think it is working well it seems to be just a problem of response time of the controller that is very short.

Maybe with a capacitor and a variable resistor I could try to make it works better, but I really don't know what size I should use.

I think if capacitor is too big the power will continue a bit when I will release the throttle.
If it is too small it will be same problem as I have now.

Thank you if you can help me
See you
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on April 04, 2009, 07:33:52 PM
ok, thanks for your answers.

I imagine that the controller limits the throttle rising slope (but not the falling slope) in software, implementing a ramp-up.

whenever the low voltage comparator triggers the throttle is zeroed, and from there it must slowly ramp up till it cuts again, which takes about 1/3 of a second. if a filter is applied at the output, only a small amount of throttle will be reduced per throttle sample period, and once the low voltage condition subsides the throttle will ramp up from there, not from zero.

so this means two things:

1) the filter must block from frequencies in the neighborhood of the sampling period (thousands of Hz?), not frequencies near the current oscillation period (3Hz), so you shouldn't be concerned with this:

> I think if capacitor is too big the power will continue a bit when I will release the throttle.

the delay should be in the order of hundreds of a second, completely negligible. (otherwise, a transistor could be added to discharge the cap when the throttle is lowered.)

2) the oscillations will get smaller in amplitude (and thus higher in frequency, since it's a ramp) the more you filter, and can be as small as you want.

so, do this....

-replace R7with a 1K resistor (or add it after R7 (in series), whichever is easier, since it makes no difference whether the resistor is 1K or 1.1K).

-add a capacitor from the motor controller side of R7 (the "Tout" signal) to ground.

a 1.5uF (microfarad) capacitor with the 2K resistance (R6 + R7) will result in a 53Hz cutoff (but I don't know the source impedance of the throttle sensor, which should be added to the 2K!). this should keep the response time of the throttle below 100ms, which seems fine. a 1uF cap would result in a bit less filtering and faster response. I would go with a 1uF cap and raise it to 1.5uF if I still find any oscillations, which is unlikely.

you can get standard aluminum electrolytic caps (and resistors too) from any old radio, cordless phone, music playing equipment, etc. they look like little cans with two legs. just be sure the cap is visually in good shape and that you don't overheat or mechanically stress it while desoldering it.

the electrolytic caps have polarity. the negative lead must be connected to ground in this case.

WARNING: be sure you have the break cutoff connected before testing this mod. should there be a problem, you can pull the break and avoid disaster.

this mod will probably get you going.

good luck!
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on April 25, 2009, 10:57:01 AM
Hello Lanchon,

I tried with a capacitor as proposed with 1µ 3µ 10µF but it seems to have no influence or bad influence, I have less power on the throttle and the frequency of cutting power is more important.

When I tried with 10µF I think I have damaged the throttle sensor because when I tried without the circuit I had no power at all and the bike was not working.

I think I will continue the testings without the throttle sensor and just put a on-off button or if it works replace the sensor by a potentiometer for the throttle.


If you have any idea to help me don't hesitate.

See you





 
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on April 25, 2009, 03:21:07 PM
I think I will try this next time.

What do you thank about it ?
Do you think the diode would be necessary to find the best position ?

Thank you
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: Lanchon on April 26, 2009, 08:48:45 AM
> I tried with a capacitor as proposed ... the frequency of cutting power is more important.
I find it hard to believe that the oscillations continue with the cap

> the frequency of cutting power is more important.
this sentence doesn't make any sense; please rephrase it.

> When I tried with 10µF I think I have damaged the throttle sensor
this is IMHO impossible

I'm left with the idea that you probably didn't build the circuit as I gave it to you.

please draw the final circuit as you implemented it, with the capacitor and all component values, and post it. also, please describe the behavior of the circuit with the capacitor to the best of your abilities. thanks!

> I think I will try this next time. What do you thank about it ?
I don't understand the problem at this point (the circuit should be working), so this answer is just a guess: your circuit won't solve anything, plus it'll add other issues.

> Do you think the diode would be necessary to find the best position ?
absolutely not. the comparator output is open collector (or open drain), it already "has a diode", it'll never source any current, only sink it.

c ya!
Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: mitch_781 on June 24, 2009, 10:38:18 AM
Hello
To continue on this topic, I confirm my throttle does not work now, I will try to replace it by a trimpot for a moment. I hope it works.

Also I have to check if the circuit is still working or if I burned it during the tests.

For next tests I will try to do something easier (I think) that is :

putting the 2 24V batteries in parallel to get more amps and change the low voltage cut in the controller by modifying

the resistors as it is described in this post :

http://endless-sphere.com/forums/viewtopic.php?f=2&t=4282&start=0#p63469

I hope the controller will work with 24V (if not I'll keep 48v but I would not have low voltage cut)

I'll let you know.

Title: Re: any idea to build a throttle control that limit battery voltage drop to 41V ?
Post by: GoldenMotor on June 25, 2009, 12:12:01 AM
our 24V magic controller will work with voltage from 18V to 60Vdc without low voltage protection.