Announcement

Collapse
No announcement yet.

Do I need to replace my Bafang controller?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Do I need to replace my Bafang controller?

    I'm getting the 30H error code and red engine logo on the display. I am not sure if the problem is in the controller, the display or the wiring harness. More details below (toward the end) on the problem and how the system is behaving. First I'll detail the system components. Then I'll mention which components I think are NOT causing the problem and why. Towards the end I'll detail the data and observations I've collected. Please read the entire post twice. I have taken time to read everything I can find on the matter and include as much info as I can. Please show respect for my effort by subduing any desire to gain status by being the first to respond.

    Motor

    Engraved on the motor I see
    BBS02B 48V 500W
    1905040082
    So 48 volt, 500 watt followed by the serial number.

    Controller

    Engraved on the controller I see
    CR R209.750.SN
    C571-30-514
    1904260252

    Display

    Engraved on the display I see
    AP* (the * is actually a character I cannot type, it looks like uppercase T with the right hand portion of the crossbar missing)
    850C TFTGVD2.3CL60 AKSM2.0
    V5.2 201907100263
    Literature shipped with the display says it is model C14.

    Battery
    48 V Shark, down tube
    Label says: 4817.520191114

    Odometer sensor and thumb throttle are standard Bafang issue. I don't see any numbers on them.

    I don't have brake levers with cut out switches nor do I have a gear shift sensor.

    What's right (that's a statement not a question)
    • The red LED on the odometer sensor pulses whenever the magnet passes by it so it seems to be OK.
    • I tested the thumb throttle by disconnecting it from the harness and connecting it to the USB port on the battery. My meter showed 5V output from the port. The signal voltage on the blue wire varied from 0.84V (throttle closed) to 5V (throttle wide open) so it seems OK too.
    • After a recharge my multimeter shows 54V across the battery's red and black leads and I get 3 green and 1 red LEDS on the battery.
    • The display powers up and I can page through the settings menu, change settings, the password, etc.
    • Wheel size and battery voltage settings are correct and triple checked.
    • I can set the date-time and it progresses correctly.
    • I can select PAS levels 0-5 and walking mode.
    • The motor spins when I pedal and it has as much torque as it did before the problems arose.
    • I have checked the harness for shorts between lines and discontinuities and have found none but there are 8! (40,320) permutations so it's entirely possible I missed one.
    What's wrong (that's a statement not a question)
    • The thumb throttle does nothing, likely because voltage at the throttle is -0.84V (no that is NOT a typo, I do mean -0.84V) and voltage on the signal line never changes (see above where I observe voltage on the signal line DOES vary when throttle is connected to 5V in the test procedure).
    • Motor spins when I pedal BUT it comes on full power regardless of PAS level or how hard/fast I pedal. So despite the fact I can select PAS level on the display PAS doesn't actually work. Motor will spin when I pedal even at PAS 0.
    • The speedometer shows a constant 0 regardless of how fast I'm going, probably because voltage at the speed sensor is only .84V.
    • The headlight works when plugged into the battery's USB port but doesn't work when connected to the controller, probably because it's getting only .84 volts when connected to the harness.
    • When brand new the system would shutdown when the battery level on the display hit 20%. Now I can go for many kilometers at 20% before the system shuts down. When it does finally shutdown, the voltage across the battery leads is 47V, I get 2-1/2 green LEDS and 1 red on the battery and it takes only 3 hours instead of the normal 7 to fully recharge the battery.
    Further testing

    At this point I am unsure whether the problem is in the controller or the display. Obviously there is something wrong on the 5V line but is that due to a problem in the controller or due to a problem in the display? I would like to eliminate the display from the equation and test the 5V line at the 8 pin connector with the display disconnected. I would connect the battery to the controller, turn the controller on by jumping PL to P+ and then very carefully measure voltage across pin 8 (gnd) and pin 6 (+5V)? Or is it necessary to have controller and display connected in order to turn the controller on safely?

    #2
    I agree that finding the cause of the loss of 5vdc voltage at the throttle and elsewhere would be a good place to start.

    Could you clarify these questions...?

    "The red LED on the odometer sensor pulses whenever the magnet passes by it so it seems to be OK." verses "The speedometer shows a constant 0 regardless of how fast I'm going, probably because voltage at the speed sensor is only .84V."

    These statements seem to contradict each other... testing or nomenclature/ labeling different?

    Are you checking the throttle when the undesired voltages are measured with it connected? Or check for 5vdc with it disconnected at the harness?





    Originally posted by AltaBrad View Post
    I would connect the battery to the controller, turn the controller on by jumping PL to P+ and then very carefully measure voltage across pin 8 (gnd) and pin 6 (+5V)? Or is it necessary to have controller and display connected in order to turn the controller on safely?
    I would recommend you securely install your test jumper before plugging in your battery. This jumper serves the same purpose of the electronic switch gate in a display that would supply full battery power back down to the controller's energizing circuitry.
    Note: A programming cable would also do the same thing, as it has a jumper already installed in it.

    For more details... see this thread.
    https://electricbike.com/forum/forum...he-bbshd-bbs02


    See also the error code description...
    https://electricbike.com/forum/forum...s02-error-list


    And my thoughts on missing the 5vdc regulated controller power...
    https://electricbike.com/forum/forum...377#post147377



    Updated map for staying on the same page...








    Respectfully submitted,
    T.C.
    See my completed Magic Pie V5 rear hub motor E-Bike build HERE.

    Comment


      #3
      Originally posted by Tommycat View Post
      I agree that finding the cause of the loss of 5vdc voltage at the throttle and elsewhere would be a good place to start.

      Could you clarify these questions...?

      "The red LED on the odometer sensor pulses whenever the magnet passes by it so it seems to be OK." verses "The speedometer shows a constant 0 regardless of how fast I'm going, probably because voltage at the speed sensor is only .84V."

      These statements seem to contradict each other... testing or nomenclature/ labeling different?
      Yes they contradict but I assure you the speed shown on the display is always 0 no matter how fast the trike is moving. No, I'm not just spinning the wheel by hand as fast as I can. The display shows 0 even when the trike is doing at least 30 kph. The odometer (distance travelled) is also a constant 0.

      I attempted to measure the voltage on the signal line while spinning the wheel with a 1/2" drill. My multimeter "sees" the pulse but the pulse is so fast I can't read the voltage on the multimeter's display. An oscilloscope would be nice but I don't have one. My interpretation is... the sensor is sending a pulse but the system is either:
      1. not sensing it, perhaps because the pulse voltage is too low. Remember the sensor is being fed only .84V and TTL protocol specifies logic low is 1 to 2.7V and logic hi is 3.5 to 5V IIRC so a .84V pulse is likely not enough to trigger whatever circuitry is counting the pulses
      2. sensing it but not displaying the speed for whatever reason

      Originally posted by Tommycat View Post
      Are you checking the throttle when the undesired voltages are measured with it connected? Or check for 5vdc with it disconnected at the harness?
      I checked the throttle 2 ways:
      1. Connected to the cable, i.e. -.84V. In this case voltage on the signal line was a constant -.84V regardless of throttle position. BTW I double checked my multimeter leads when I saw the negative voltage reading and I definitely had red-to-red and black-to-black.
      2. Disconnected from the cable but connected to 5V from the battery's USB port. In this case the voltage on the signal line measured 0.84V with throttle closed, approx. 3V at half throttle, 5V at full throttle.
      Check #1 proves nothing for obvious reasons. Check #2 proves the throttle itself works just fine when fed the proper voltage and is not itself causing the 30H error code or any of the problems I am seeing.

      No wait.... Now I see what you're asking, I think, maybe. You're asking if I disconnected the throttle to see if it is causing the loss of 5V on the harness, right? And you're asking because in my first post I said something about checking the 5V to the throttle. I was simply verifying that the battery's USB port was feeding 5V to the throttle. Now just to cover all the possible bases... I know the 5V on the battery's USB port is independent of the 5V expected from the controller.


      Originally posted by Tommycat View Post
      I would recommend you securely install your test jumper before plugging in your battery. This jumper serves the same purpose of the electronic switch gate in a display that would supply full battery power back down to the controller's energizing circuitry.
      Note: A programming cable would also do the same thing, as it has a jumper already installed in it.
      Good point! Aside from the risk of shorting pins, I would add that this test should be done only with the motor off the vehicle and securely clamped to a workbench. Or, if the motor is on the vehicle, then remove the chain from the chain ring or even safer remove the chain ring and both pedal arms altogether. The reason is that if the pedals are inadvertently moved the motor will engage, the chain ring and/or chain will spin, perhaps the drive wheel too. Mayhem and injury to persons/property/pets/plants will likely follow.

      I have a programming cable, just didn't think of it. It does indeed have a jumper block across 2 of the pins. This is going to be so much easier and safer than jamming short lengths of sewing needles into the holes and clamping alligator clips on and insulating it all with bubble gum, electrician's tape and a Hail Mary.

      Thanks for the links to other info. I've glanced through them and will visit them again when I have more time to digest them.

      I name this next test Test 2 for future reference. The procedure will be:
      1. disconnect battery and remove jumper block from programming cable
      2. disconnect display at it's 4 prong plug, connect programming cable to 4 prong plug
      3. connect throttle, reason: controller won't energize if throttle is disconnected
      4. disconnect speed sensor, reason: it doesn't need to be connected to energize the controller and it will provide an easy way to check for the absent 5V
      5. connect the battery
      6. put the jumper block back onto the programming cable, this should energize the controller
      7. check for 5V on Speed Sensor Harness Connector's pin 2
      OBSERVATION CONCLUSION
      +5V on Speed Sensor Harness Connection pin 2 the display is fubar, get a new one
      still 0.84V on Speed Sensor Harness Connection pin 2 fault is either in controller or cable harness










      If Test 2 indicates the fault is either in the controller or cable harness then I'll be forced to Test 3:
      1. disconnect the harness at Main Harness Connection (the 8 prong connector)
      2. devise a safe way to:
      1. connect the throttle to the 8 prong plug on pins 6, 7 and 8
      2. jump P+ to PL (pins 1 and 2)

      Comment


        #4
        Nice to have a true electrical troubleshooter to work with.


        This attracts the most attention...

        "connect throttle, reason: controller won't energize if throttle is disconnected"

        This statement is not correct under normal operation. So if you see evidence to the contrary... follow that clue and find out why?
        Any cables smashed or pinched, too tight clamps, or pulled to tight wiring? All pins on the straight and narrow with connectors securely seated?
        Edited thought: unless you're referring to testing motor operation verses 5vdc controller power operation. But resumption of controller 5vdc output to the peripherals is the prize right now.

        Just to clarify...
        "Connected to the cable, i.e. -.84V. In this case voltage on the signal line was a constant -.84V regardless of throttle position. BTW I double checked my multimeter leads when I saw the negative voltage reading and I definitely had red-to-red and black-to-black."
        Sounds to me like you're checking the throttle input voltage as opposed to the signal out line...? Not quite sure. Or both negative?


        It sounds to me that the speed signal input from the controller is missing. I would expect say about 4.4vdc (signal) being sunk to ground (0vdc) by the seemingly working hall sensor. (no loss of 5vdc supply voltage here...) Hopefully it will return when the throttle voltage problem is resolved.
        Last edited by Tommycat; 02-09-2022, 08:37 AM. Reason: updated thoughts
        See my completed Magic Pie V5 rear hub motor E-Bike build HERE.

        Comment


          #5
          Originally posted by Tommycat View Post
          Nice to have a true electrical troubleshooter to work with.
          Thank you but I think you give me more credit than I am due. I am mostly self-taught. I make up for lack of formal training with tenacity that borders on obsessiveness, with a loquacious spirit and a segacious mind. I take the wrong track sometimes as I did with my Test 2 in my previous post. After reading some of the links you sent earlier I see now I was close with Test 2 but not quite on the money. I'm rethinking the next test but rather restricted on time this past week. Without people like you to bounce ideas off of I don't get very far very fast.

          Originally posted by Tommycat View Post
          This attracts the most attention...

          "connect throttle, reason: controller won't energize if throttle is disconnected"

          This statement is not correct under normal operation. So if you see evidence to the contrary... follow that clue and find out why?
          Thanks for that. I know the display won't light up with throttle disconnected. I was wrong to assume the controller won't energize. Indeed that would be a good clue to investigate.

          Originally posted by Tommycat View Post
          Any cables smashed or pinched, too tight clamps, or pulled to tight wiring? All pins on the straight and narrow with connectors securely seated?
          All of the above and more. I ride that trike HARD. It's been flipped twice, rode for miles in -30C weather, a cable tie down strap broke and the main cable got tangled on the crank arm and yanked hard. But it still worked.

          We were street racing one night and I had to go over a curb or lose. In the dark it looked like a sloped curb but it was square and high. Well the fork bent about the same time I went over the bars which caused a tree to jump out and pinch the speedo cable so bad i had to splice in a new piece. But it still worked.

          Then I decided the speedo sensor would be safer on a rear wheel but a week later the chain snapped and dragged the speedo cable into the freewheel which tore it up pretty good. But I repaired it and it still worked fine.

          The thing that finally finished it off (and I'm rather embarassed to admit this) .... one day when I was tacking some new iron on the handlebar I burned through the tube and some molten dripped down into the tube the cable runs through. There was flames and the aroma of burning insulation. My helper ran over and dumped his beer down the tube. Then there was sparks. Then I discovered I had neglected to disconnect the battery.

          I had stuffed all the upper connectors down that tube and sealed the top of the tube for extra waterproofing in addition to the connectors' own water resistant design. But the molten came to rest on those connectors and melted them so bad I cut them out, soldered the wires together, insulated with waterproof heat shrink tube and sealed them back inside the tube. OK, I know what you're likely thinking... bad solder connections and crossed wires. Nope. I learned to solder copper properly a looooong time ago. Sure I blow it once in a while but a bad joint is easy to spot and I simply redo them before the heat shrink goes on. And I took it all apart after it didn't work right and there are no crossed wires. So that eliminates bent pins, loose pin sockets, etc. Unfortunately it's not so easy to connect the programming cable but I can always lop it's connector off too and solder the wires direct to the harness wires, desolder it later and solder the display back on. Connectors are over rated. The only good thing about them is they are convenient. The down side is they leak water eventually, pins get bent, pin sockets eventually don't clamp tight on the pin. And they trap globs of molten that would otherwise fall out the bottom of the tube and cause no damage. Gonna eliminate that 8 pin connector too. When I have the wires bare it will be easy to test voltages, jump P+ to PL, etc.

          Originally posted by Tommycat View Post
          Edited thought: unless you're referring to testing motor operation verses 5vdc controller power operation.
          Not sure what you mean so I'll not attempt a reply.


          Originally posted by Tommycat View Post
          But resumption of controller 5vdc output to the peripherals is the prize right now.
          Agreed. I'm thinking when I chop the 8 pin connector out and have the wires bare I'll connnect the display side (not the side that leads back into the controller) of the 5vdc to an external 5vdc . I'm thinking the 5vdc is absent because a voltage regulator inside the controller is fried. Since the motor runs and puts out what seems to be the same torque it had when brand new, I'm guessing the MOSFETS are good. The negative voltage on the throttle supply is worrisome but that might go away if I feed it 5vdc. Or it might not go away and the controller might get damaged worse than it is now but what I'm thinking the damage is all in the controller rather than the display so I'm looking at buying a new controller anyway so what do I have to lose by hooking 5vdc into the 5vdc line.

          My other hunch is that a few bits in the flash ROM got twiddled when I burned the wires. It will be interesting to see what parameters are present when I patch in the programming cable and connect to the programming software. This whole mess might straighten out simply by setting a few parameters back to default. Or it could fry the programmer and my desktop. Well, no guts = no glory and no glory = no fun.

          Originally posted by Tommycat View Post
          to clarify...
          "Connected to the cable, i.e. -.84V. In this case voltage on the signal line was a constant -.84V regardless of throttle position. BTW I double checked my multimeter leads when I saw the negative voltage reading and I definitely had red-to-red and black-to-black."
          Sounds to me like you're checking the throttle input voltage as opposed to the signal out line...? Not quite sure. Or both negative?
          I checked both the input and signal, both are negative.


          Originally posted by Tommycat View Post
          It sounds to me that the speed signal input from the controller is missing. I would expect say about 4.4vdc (signal) being sunk to ground (0vdc) by the seemingly working hall sensor. (no loss of 5vdc supply voltage here...) Hopefully it will return when the throttle voltage problem is resolved.
          I think you're onto something there. Unfortunately I don't have the formal education in analog that I suspect you have. I am mostly self taught and primarily in the digital world. I've been thinking V on the speed sensor signal line is 0 until the magnet passes by at which time the sensor pulses 4 to 5V to the controller. If I read you correctly you're saying it's the opposite... V on the signal line is ~5 until the magnet passes by at which time the sensor sinks the voltage to ground. In other words the "pulses" the controller counts are not shifts from lo to hi but rather shifts from hi to lo.


          Comment


            #6
            Originally posted by AltaBrad View Post
            Gonna eliminate that 8 pin connector too. When I have the wires bare it will be easy to test voltages, jump P+ to PL, etc.
            This is where I would head first and sort out the upper harness later. It would be nice if the controller would put out 5vdc when all the shorted wiring above is removed.
            Then ohm the upper harness for shorts, opens, and good wiring. I would resist putting any voltage to it unless checked first. And then only with a protected power supply. Because from your descriptions, certainly something is shorted, unless on the controller side...
            Not quite sure what you would expect to happen with just 5vdc to the display? As it requires full battery power to operate. If all was well with the harness, and you just intend to make up for the missing 5vdc, then yes an added power source for the throttle control should work. Just remember to tie the supply voltage grounds together. (controller's and added power supply of 100mA capability minimum)




            Originally posted by AltaBrad View Post
            I've been thinking V on the speed sensor signal line is 0 until the magnet passes by at which time the sensor pulses 4 to 5V to the controller. If I read you correctly you're saying it's the opposite... V on the signal line is ~5 until the magnet passes by at which time the sensor sinks the voltage to ground. In other words the "pulses" the controller counts are not shifts from lo to hi but rather shifts from hi to lo.
            My main point here is, that the voltage source that gets switched to ground, that the controller uses for speed indication. Is from the controller's electronic speed signal output/input, not from or thru the speed sensor's circuitry and its 5vdc input...



            See my completed Magic Pie V5 rear hub motor E-Bike build HERE.

            Comment


              #7
              Originally posted by Tommycat View Post

              This is where I would head first and sort out the upper harness later. It would be nice if the controller would put out 5vdc when all the shorted wiring above is removed.
              Then ohm the upper harness for shorts, opens, and good wiring. I would resist putting any voltage to it unless checked first. And then only with a protected power supply. Because from your descriptions, certainly something is shorted, unless on the controller side...
              That harness has literally been through hellfire and more. I already spent a good 2 hours ohming it and found nothing but that doesn't convince me it's good cable. It could have discontinuities and shorts I'll never find unless the wires are bent/jiggled just the right way. I don't fight odds I'm unlikely to beat so it's time to kiss the original goodbye and build a new and better harness, one without connectors. Well, maybe just the one connector for the display so I can attach a parameter twiddling cable (it really isn't programming, lol) but that's all. Then I can waterproof it and snake it through a tube outside the trike's frame where it will never get burned or crushed again. The frame is still just a prototype, an experiment. I'm constantly cut things off and welding them back on and attempting to hide the harness inside the frame is a bad idea at this stage of the game.

              So on my workbench I have 4' of new 8 conductor + ground cable. The motor is firmly attached to the bench in case it spins up unexpectedly. I'm hacking apart the sealed junction box that joins the 4 cables from display, throttle and brake levers to the 8 conductor cable. There might be something interesting in that junction box, maybe some burned up fried thing. The plan won't gel in my brain until I know what's in there.

              Originally posted by Tommycat View Post
              Not quite sure what you would expect to happen with just 5vdc to the display?
              Not sure what I was thinking there. I was tired, numerous possibilities were swirling around in my brain as I was typing, I shouldn't have posted that one without sleeping on it and hacking open the junction box.

              Originally posted by Tommycat View Post
              Just remember to tie the supply voltage grounds together. (controller's and added power supply of 100mA capability minimum)
              I learned that one long ago the hard way but thanks for the reminder regarding tying grounds together. And the supply will be protected with a fast-blo low amp fuse.


              Originally posted by Tommycat View Post
              My main point here is, that the voltage source that gets switched to ground, that the controller uses for speed indication. Is from the controller's electronic speed signal output/input, not from or thru the speed sensor's circuitry and its 5vdc input...
              That's what I was trying to say but it discombobulated somewhere between brain and fingers .

              Thanks for all the feedback. It's so helpful.

              Comment


                #8
                Yes!!!
                Kludged it with an external 5vdc spudded into the red wire, reworked the wiring harness, ditched the throttle and now it works like brand new again. <insert cartwheel emoji>
                Since the controller is potted I can't say for sure but it looks like a 5V regulator on the controller fried but luckily none of the traces on the output melted. If any of those traces had melted my kludge would not work and I would be ordering a new controller. Yep, sometimes we get lucky.

                Thanks to Luna Cycle for this forum and Tommycat for advice and encouragement in this forum.
                Thanks to Randy who gifted me tools and so many lessons on how to use them.



                Comment


                  #9
                  Amazing! Just goes to show, it may be worth a try. Job well done!

                  With your attention to detail, testing skills, and hopefully picture attaching prowess If you'd like to help add information to the wiring diagram above for more completeness. A good addition would be an accurate description for the shift (or Gear) sensor connector and pinouts, as well as the headlight connector and pinouts.



                  Best Regards,
                  T.C.
                  See my completed Magic Pie V5 rear hub motor E-Bike build HERE.

                  Comment


                    #10
                    An "accurate description" just won't do. I intend on editing the original and adding the requested details while preserving the style of the original. Because round eye can keep up with slant eye anytime, anywhere, right? I'm a newbie with the graphics editor that ships with Ubuntu so give me a few days. Will post it up in a more appropriate thread as this one has run its course.

                    Comment


                      #11
                      My kludge fixed everything except the gear shift sensor circuitry. My meter sees no voltage on any of the gear shift connector pins. I checked the meter and it works on other sources.

                      I don't use a gear shift sensor so my objective is not to get one working on my trike.

                      I was asked to update the BBSHD Harness Pinout document with pin outs for the gear shift sensor because the current version of that document doesn't include that info. Does anybody know what the voltages should be? There are 3 pins. I suspect black pin is ground, red pin is +5vdc and white pin is signal but I don't want to guess. Does anybody know for sure?

                      Also, I have attached a draft version of the updated wiring diagram. Please do not distribute this draft because it's missing pin out details for the gear shift sensor connection. Wait for the final version, please.

                      Meanwhile I invite critique and suggestions.

                      Comment


                      • Tommycat
                        Tommycat commented
                        Editing a comment
                        No draft version seen attached at this time...?

                      #12
                      oh oh, someone stole my picture attaching mojo? I swear I saw the pic in my previous post immediately after I attached it and I see it now after logging out for over an hour.
                      I clicked the Upload Attachments box directly below the edit box (not the Upload from URL box) then I selected the file in my file browser, clicked Go, saw the whirlygig for a few secs while it uploaded then it asked if I wanted the small version, medium version, large version or full version. I selected medium at first then decided large would be better so I clicked "large". Then I saw both the medium and large versions so I clicked "remove" under the medium version which removed the medium size one and left the large.

                      OK, I'll try again now.

                      Click image for larger version

Name:	bafang-harness-pinout-2022.jpg
Views:	3740
Size:	185.5 KB
ID:	148165
                      Well there it is. I see it in the editor box and in the preview box too. I previously attached a PDF version, this time it's a .jpg. Maybe it likes JPEG better.

                      Comment


                      • Tommycat
                        Tommycat commented
                        Editing a comment
                        Yes, it’s viewable now.
                    Working...
                    X