Search found 1080 matches

by stancecoke
Aug 26 2017 5:26am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, then i'll try it with global variables.
Why do you map the throttle value to a maximum of 237?

Regards
stancecoke
by stancecoke
Aug 26 2017 4:13am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I now want to implement battery current limiting and undervoltage protection. Therefore I want to read in throttle, battery current, and battery voltage in the acd_read_throttle. Is there an easy way to return all three values from the function? I don't know how to deal with arraypointers etc. I wou...
by stancecoke
Aug 25 2017 9:16am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Of course it would be fine to adjust the parameters at runtime with UART (e.g. Bluetooth-module + Cellphone-app) later, but first the user has to flash the firmware. Perhaps I can even add a Button to the Java tool for setting the option bytes :-).

Regards
stancecoke
by stancecoke
Aug 25 2017 6:11am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I just made a little java tool for setting up the main parameters. It edits the config.h-file and starts the compiling process. I think I have to read about the command-line flash tool from ST to add the flashing process to the batch-file ;-). The tool needs Java Runtime. In this way any user withou...
by stancecoke
Aug 24 2017 1:48pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

casainho wrote: But I think the feature is just finished when you record a video showing it working :-)
here you are... :D



I had to set the wheel circumference to 4 meter to have measured speed in the range the motor can turn, to proof the speed limitation function.

Regards
stancecoke
by stancecoke
Aug 24 2017 3:51am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, I think a very important thing to do is to implement a motor phase current limitation. You read in the maximium current already, but this value "ui16_adc_current_phase_B_filtered" is not used for any further actions yet? Is there any possibility that Phase A or C take too much current, while Pha...
by stancecoke
Aug 24 2017 1:47am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I will not merge to master yet I think this would not make sense, as less people own such a bottom bracket sensor. Perhaps we should place all customer relevant parameters into a config.h, and activate/disable the features with ifdefs... I want to focus on the missing motor control. Are you plannin...
by stancecoke
Aug 23 2017 2:16pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Just updated the feature_torque_sensor branch. Motor is driven by the sensor now :-)
The interrupts of PAS and SPEED don't disturb the motor in any way, you can't hear a change in sound or anything...

regards
stancecoke
by stancecoke
Aug 22 2017 1:56pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

casainho wrote:I tried to connect the STLinkV2 and after some tries and verifications,
Do you have the correct wiring? I had no problems with flashing the STM32 Lishuis so far...

Regards
stancecoke
by stancecoke
Aug 22 2017 4:16am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I've just updated the feature_torque_sensor branch. I added a tutorial for setting up the toolchain with windows to reduce pain for other potential users, that are not experienced with linux 8)

regards
stancecoke
by stancecoke
Aug 21 2017 2:21pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Please just test and tell me if you could get the sine wave on phase B at max speed and what was the ui16_speed_inverse. can you post a picture where I can find the via for the current? I tested my code in hardware now. Just connected the sensor, not the motor to the controller yet. After fixing so...
by stancecoke
Aug 20 2017 11:57am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I just added a video to Youtube: pujSqUnBa7k Do you have an oscilloscope?? The other signal is the hall sensor, which is great as a trigger for the oscilloscope. Yes, I have a very old fashioned one, see my other youtube-videos :-) What is or motor RPM and eRPM? Can you please tell what is the RPM -...
by stancecoke
Aug 20 2017 9:28am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

- on a serial terminal, send 0 or 1 to increase or decrease ui8_position_correction_value!! the serial communication should work by default in your svm branch? I tried to write or read something to/from the controller, but there's no reaction. I expected the controller to send printf("%d, %d\n", ui...
by stancecoke
Aug 18 2017 2:46pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

It turns !!! :D

The Option Bytes in the graphical tool are just the relevant ones, like named in the table. I set option byte 2 to 0x20, now it works.
First success!
But the motor turns quite slowly and draws too much current.

regards
stancecoke
by stancecoke
Aug 18 2017 2:04pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Hm, I was able to disable writeprotect with the OptionByte, but your suggestion for enabling PWM is not accepted. There's a graphic tool for setting the option bytes, can you tell me the right setting? I created your feature_torque_sensor based on SVM with working motor using throttle. this means, w...
by stancecoke
Aug 18 2017 11:57am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, for testing your firmware, wich branch do you suggest?
I want to make sure, that the motor turns, just using the throttle...

I made my branch based on the SVM branch.

I just tested the original firmware with the shengyi middrive motor, it worked so far....

regards
stancecoke
by stancecoke
Aug 18 2017 9:02am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

you say
Pins on the header from left to right: VCC; SWIM; GND; NRST
I have this ST-Link V2. I guess the "NRST" has to be connected to "SWIM_RST"?

Why don't you power the target with the ST-Link V2? Do you use your Lab power supply (36V)?

Regards
stancecoke
by stancecoke
Aug 18 2017 4:28am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

thank you for your hints ;-) I don't want to produce magic smoke :-)

Uploading does not work: "Uploads are disabled. File uploads require push access to this repository"

regards
stancecoke
by stancecoke
Aug 18 2017 3:45am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

first draft of implementing PAS, torque and speed with concideration of legal use in germany (motor on only while pedaling, motor off at speed >25km/h) is ready. Compiling without errors, not tested in hardware yet. I'm not able to insert a new branch, can you please add a branch called "SVM with to...
by stancecoke
Aug 17 2017 2:13pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Thank you for the information.
I thought it might cause trouble, if UART causes an interrupt on port D in parallel, but as I read, the UART uses different IRQ Numbers :D

I deleted my fork and will place a new branch in your repo directly.

Regards
stancecoke
by stancecoke
Aug 17 2017 12:14pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Do you expect trouble with interrupt handling on port D for the PAS signal, as the UART pins are on Port D, too?
How can you read out which source triggered the interrupt on the port. I guess you can read it from a certain register?!

Regards
stancecoke
by stancecoke
Aug 17 2017 3:38am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I just created an account at github and forked your project (I don't know if that's the right way to proceed...) I'll try to add PAS, SPEED and Torque (=Throttle) function in the way I did in my pre-controller project and test it with a Shengy Central Motor. (I think that's the fastest running motor...
by stancecoke
Aug 16 2017 9:24am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, so I need another time base, as the call of the adc_read_throttle each 100ms is to slow. The PAS-pulse cycle duration at a cadence of 120 rpm is about 15 ms (32 pulses/revolution). I think i need a resolution of 1ms at least. Do you think that's OK, or will it cause trouble for the PWM? Is there...
by stancecoke
Aug 16 2017 6:20am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, I think I have to learn how the I/O Pins of the Mosfets are set/reset, to unterstand why the timing with interrupts is that critical....

Good Luck with your talk!

Regard
stancecoke
by stancecoke
Aug 16 2017 1:54am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3751
Views: 305247

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

1. using the sensor, does it changes the way you need to pedal? what are the changes compared to using the original bicycle bottom bracket? There is no change in the way to pedal. The sensor comes with a normal square tapered spindle. It's just a little wider on the left side, the q-factor is a lit...