EFeru / hoverboard-firmware-hack-FOC

With Field Oriented Control (FOC)
GNU General Public License v3.0
1.06k stars 884 forks source link

Using 12V lead acid battery #328

Open js333031 opened 2 years ago

js333031 commented 2 years ago

Variant

No response

Control type

No response

Control mode

No response

Description

I don't have the 36V Li Ion batteries but do have the mainboard and motors/wheels. Is it possible to:

  1. Flash new firmware w/o power source connected to the XT60 connector? The firmware flashing instructions seem to allow so but older documentation I believe required ">36V" power connected to XT60
  2. Run the firmware and motors w/12V lead acid battery?

I happen to have the Pb battery and wanted to check before I purchase Li battery.

Candas1 commented 1 year ago

Hi,

You can power the chip with 3.3v from stlink, but it's not recommended, it seems few people ended up bricking the board. I am not sure running on 12v is a good idea, the power button will for sure not work with that low voltage.

RoboDurden commented 1 year ago

The mosfet gate drivers run on 14V. but technically they should already work at 12V.

derFrickler commented 1 year ago

Is there a way to enable the board without the power button? just turning on when plugging power? Want to try to run the board on a 4S lipo

RoboDurden commented 1 year ago

Shorting the first TIP127 TO220 transistor will always power the board. This happens when that transistor blows. These boards then will always turn on once the battery is connected. Have a look at the schematic.pdf ..

You should uncomment

  if (inactivity_timeout_counter > (INACTIVITY_TIMEOUT * 60 * 1000) / (DELAY_IN_MAIN_LOOP + 1)) {  // rest of main loop needs maybe 1ms
      poweroff();
    }

in main.c because the power down melody might hang at the last tone :-(

derFrickler commented 1 year ago

Great, thanks a lot, I will try that

derFrickler commented 1 year ago

Seems its not an TIP127 on my board (the 2nd on is), first one is an IRF9530N. But bridging source and drain did the Job ;_)

Thanks a lot! Finally my tracked rover project moves on. Tried different BL-controller boards before, but they all do some kind of ramping on the speed which makes skid-steering impossible.

RoboDurden commented 1 year ago

Yes, some boards have a mosfet instead of a to220 transistor. Not really neccessary. Don't forget to post a youtube video when you have something nice to show :-)

abyy28y commented 1 year ago

does it work for u derfrickler?

derFrickler commented 1 year ago

YES, works great, i will do a video soon.

abyy28y commented 1 year ago

works on 12 volt?

abyy28y commented 1 year ago

Shorting the first TIP127 TO220 transistor will always power the board. This happens when that transistor blows. These boards then will always turn on once the battery is connected. Have a look at the schematic.pdf ..

You should uncomment

  if (inactivity_timeout_counter > (INACTIVITY_TIMEOUT * 60 * 1000) / (DELAY_IN_MAIN_LOOP + 1)) {  // rest of main loop needs maybe 1ms
      poweroff();
    }

in main.c because the power down melody might hang at the last tone :-(

excuse me is there is any way or tip127 substitute to make the board powered on 12 volt using the power button?

RoboDurden commented 1 year ago

excuse me is there is any way or tip127 substitute to make the board powered on 12 volt using the power button?

The power button triggers the littler transistor Q1 which will activate that first TIP127. You might need to decrease the resistance of R1 from 30 kOhm to maybe 20k or 10k in order to trigger Q1 when V_bat is only 12V instead of 36V. See the schematics pages 5 and 6 of https://raw.githubusercontent.com/EFeru/hoverboard-firmware-hack-FOC/main/docs/20150722_hoverboard_sch.pdf

You could try to feed in the 12V with a 10k Ohm resistor directly into the On_Switch Jumper J1 pin 1.. Just a quick idea..

I am currently working on the Gen2 boards: https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x

abyy28y commented 1 year ago

Thank u so much RoboDurden and good luck, I will try it.

ash25mi commented 1 year ago

Hi, any news on using a 12V battery ?

derFrickler commented 1 year ago

Its working on 4s Lipo, so it should be fine at 12V aswell, just need to set the batery low levels in the code.

derFrickler commented 1 year ago

BTW, i promised a video, heres one of the first test-drives: https://www.youtube.com/watch?v=epiRJ1xkm4k

RoboDurden commented 1 year ago

Is there a way to enable the board without the power button? just turning on when plugging power? Want to try to run the board on a 4S lipo

I forgot to tell you that I auto-power-on my solar camper with a 10 uF Capacitor and a ? KOhm discharge resistor. When powering the board, the capacitor is discharged and simulates a short button push :-) That way you eliminate the big spark when plugging in the battery. Even 10A Power switches do not last long because of the big capacitors of the hoverboard controller that I only use to generate up to 2 amps pedal assist.

That tank you built looks like a great utility platform for a mini gardening or farming tractor. The direct drive however will only allow for less then 100 Watt power output at acceptable low speeds ?

The tank tracks might be expensive. But maybe you found a cheap solution :-)

derFrickler commented 1 year ago

I bought the tracks years ago from Aliexpress for $40, but they are not available anymore (at least not from Europe). Power is fine like this as its only a fun vehicle and i am only using 4S right now. It was able to pull the Sled with my 2 small kids on the Snow...

RoboDurden commented 1 year ago

I don't like fun projects... Better make it a $200 12s suicide gps bomber tank to support Ukrainian soldiers :-/

ash25mi commented 1 year ago

Its working on 4s Lipo, so it should be fine at 12V aswell, just need to set the batery low levels in the code.

Thanks for the feedback ! Nice build.

I forgot to tell you that I auto-power-on my solar camper with a 10 uF Capacitor and a ? KOhm discharge resistor. When powering the board, the capacitor is discharged and simulates a short button push :-) That way you eliminate the big spark when plugging in the battery. Even 10A Power switches do not last long because of the big capacitors of the hoverboard controller that I only use to generate up to 2 amps pedal assist.

Thanks it is a good addition !

I don't like fun projects... Better make it a $200 12s suicide gps bomber tank to support Ukrainian soldiers :-/

Small drones in Ukraine are also consumer grade, sometimes based on open-source projects, and also using hobby components. If you want to see it that way, the existence of hobbies enables people to learn skills and create projects, and an industry to exist.

TinkerWorX commented 7 months ago

BE AWARE THE FOLLOWING MODIFICATION POTENTIALLY MAKES THE BOARD UNSAFE TO USE WITH HIGHER VOLTAGES, DONT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING

Just wanted to share an example for anyone looking how to quickly make the board turn on with lower voltage. For my setup I wanted it to run off 18v Ryobi batteries which wasn't letting it power. I added a 22k ohm resistor as shown in the image (as suggested by @RoboDurden). This drops the R1 resistance from 30k to 12.6k. (ignore the soldering job, hard to apply enough heat on the massive copper area) image It now powers up from 18v without issues. Remember to update the firmware as well to avoid it shutting down from under-voltage detection.

RoboDurden commented 7 months ago

Be aware that now attaching a fully loaded 36V battery might exceed the 3.3V/5V of the MCU input pin !

TinkerWorX commented 7 months ago

Good point, I added a warning to my post to make sure people understand this.

thecesco commented 2 weeks ago

Shorting the first TIP127 TO220 transistor will always power the board. This happens when that transistor blows. These boards then will always turn on once the battery is connected. Have a look at the schematic.pdf ..

You should uncomment

  if (inactivity_timeout_counter > (INACTIVITY_TIMEOUT * 60 * 1000) / (DELAY_IN_MAIN_LOOP + 1)) {  // rest of main loop needs maybe 1ms
      poweroff();
    }

in main.c because the power down melody might hang at the last tone :-(

Hi! Could you please help how to short the tip? Thanks!

RoboDurden commented 2 weeks ago

If you don't know how to google and read the TIP127 datasheet, you should not shortcut any electronics.