Search This Blog

Friday, August 9, 2019

The hurdles of fixing a puncture in a Xiaomi M365 scooter

I can say that I am pretty seasoned at fixing bicycle tires. It dates back to my childhood, where numerous times I had to fix the punctures by patching the inner tubes. I still remember the patching kits featuring an assortment of patches of different sizes and shapes, sanding paper, and the rubber cement.

Never had much trouble in separating the tire from the rim, and putting it back together, after having fixed the puncture. The same applies for fixing the tires of more recent MTBs, where upon following the usual technique no major obstacle arises in accomplishing these tasks.

But now, just after a bit over 100 Km into using my Xiaomi M365 scooter, I found a rattling noise in the front tire while riding it. Went on to take a look, and found a thumb tack, fully buried in the tire. As I started removing it, I could hear the air escaping. Decided to leave it there just so that I could ride the scooter back home.

Obviously the inner tube was punctured. The challenges started with the removal of the two nuts that secured the front wheel. These were incredibly tightened or otherwise held in place. Only after rounding one of the nuts with the most torque I could get my arms to deliver, I learned that these nuts had been secured with the help of red thread lock or similar substance. In order to remove the damaged nut, after many attempts, I haver resorted to a more brute force approach, and started to perform cuts in the nut, in order to remove it in pieces. Just before going further with the cutting, I decided to apply more WD40 and again try to undo it with the round part of the 18 mm wrench (which didn't yet started slipping in spite of the nut being somewhat rounded). Just as I was giving up on the force I was applying, the nut started moving (it seemed like a bit of a miracle), and was able to extract it.

Performed the same procedure with the other nut (not forgetting to bath it with plenty of WD40), and it also came off after some torque (while at the same time being careful not to let to tool slip). Was able to extract the second nut and this one came out intact.

That was challenge #1.

The removal of the tire was relatively easy. With the help of the plastic tools that were part of a bicycle repair kit I had, I was able to separate if from the rim. The inner tube valve would not separate from rim, as there was not enough room for the valve to come off at the required angle. I could not find any other way but to open the motor (rim) cover in order to remove the plastic part that prevented the valve from bending sufficiently to separate from the rim.

Finally with the inner tube removed, and after confirming that it was indeed punctured, and that no damage to the inner wall of the tire existed, I placed the new inner tube (my Xiaomi was supplied with an extra pair of tires and inner tubes) and started trying to put the tire back in place. That was the third hard challenge, and where my bicycle tire repair experience started to prove useless.

After several attempts at closing the tire (the rims seemed too wide for the tire) without success, I (almost desperately) decided to try to use a small vise to deform the tire, with the expectation of making it easier to put it back into the rim.

And to my surprise the technique worked, and without major effort (only with the help of the plastic tools) the tire was successfully put back in place.

I was quite happy with the accomplishment, but as usual, the happiness needed to be offset with some bittersweetness: with so many attempts, the friction of the new inner tube with the rim edges and possibly the tools, caused a puncture to it. I realized after inflating the tire, that it would quickly deflate. As such, I went on and repeated the whole procedure (I still had one spare inner tube left). This time it was quicker because I went straight to the working approach.

By the way, the Xiaomi manual makes the procedure look like a walk in the park:

#4 challenge - obtain the new nut: I knew that online these could be purchased from a variety of different sites, but I wanted to be able to assemble the scooter right away. So I tried to look in local stores for one that would possibly have the nut. After trying a bicycle shop, they gave me the reference of a hardware store. There I was able to find a close enough nut: it had the same thread diameter and pitch, but lacked the flange.

The original Xiaomi nut is flanged and has a M12 1.25 pitch thread. The nut outer diameter is 18 mm.

The nut I obtained from the hardware store has the same thread but the outer diameter is 19 mm.

I tried it anyway, by adding a washer instead, and tightened it with a decent amount of torque.

So far its going pretty solid. Even though the motor exerts some torque, I believe that it should be ok without the thread lock - a inner washer, the shape of the motor shaft and receptacle in the frame prevents its rotation/slipping.

For those curious about the hub motor inner workings:

It seems to have a reasonably robust construction, with the wiring properly secured and protected.

Saturday, July 13, 2019

EDF Propelled Hovercraft project - first outdoor test

Following the post regarding the construction of this project, here is finally the first real test:

Performance and handling are very good, as expected.

Monday, July 8, 2019

The most inneficient (and probably the coolest) EV in the world - the electric hovercraft!

This project may well model what an electric hovercraft could feel like to drive. At least from a noise perspective, trust me, it is a pretty solid preview in spite of its small scale!

This whole project started out with an inspection of my inventory of spare R/C parts, and with a little brainstorming with my daughter, figuring out something fun to build from scratch without spending too much money, this came to mind. Sketch after sketch, the idea went from a concept, to a plan, and lastly to the actual construction:

Considering the importance, and thank god, apparent focus of the legislators and the industry in replacing vehicles that burn fossil fuels with greener alternatives, it is interesting and of great importance, to also promote and bring to the recreational arena, the electric vehicle in its diverse shapes, purposes and forms.

One of the approaches (which we already see to some extent taking place in several communities) is to pick certain collectible cars, and especially when the restoration of the engine is a greater challenge, go for the replacement of the original propulsion, with an electric drivetrain. Depending on the specific model of the vehicle, the electrification has a variable level of difficulty and cost, but also tends to bring mechanical simplicity and interesting performance.

The automobile is probably the most popular form of motor vehicle.

In its electric form, it is somewhat thanks to companies like Nissan and Tesla with their consumer EVs becoming widely available, that performance and range was proven possible (to consumers) in vehicles powered only by electricity:

In recent years, electric drivetrains also gave shape to entirely new forms of vehicles - that is the case for Segway scooters, and other devices with a similar concept, such as the hoverboard.These vehicles would hardly be possible without the advancements in recent decades, regarding digital control and the sophistication of sensors such as the MEMS gyros and accelerometers.

But it is hardly a conventional though, to look at exotic vehicles such as the hovercraft, and think of making an electric variant of it.

The hovercraft is conceptually simple: it consists of a frame which holds a powered propeller, mounted in the horizontal plane, and one or more propellers mounted vertically in the rear of the vehicle. The later is (are) responsible for providing the forward thrust to the vehicle, while the horizonal propeller creates the dynamic pressure under the vehicle, providing an air cushion that eliminates the drag from the contact with the ground.

In my design, I looked forward to making it simple and minimize the need to buy new parts. I was able to repurpose one brushless motor (which I initially used for powering an airplane), for serving as the air cushion propulsion source, and some aluminium tubing which I used as support for the motor:

The 3 ESC's (Electric Speed Controller), a power distribution board, two 9 gram servos, and the two 2.2 Ah 11.1 Volt  3S LiPo batteries I was also able to take from my R/C stock and use it in the vehicle.

The radio receiver and transmitter I  reused from the available R/C gear I had:

The rest however, I ended up having to buy: the polystyrene used for the frame, the two ducted fans, and 4500 KV brushless motors that are attached to these.

Instead of the usual skirt, I went for a design simplification, by using a lightly inflated 16" bicyle inner tube instead of it:

For cutting the polystyrene to the shape of the frame, I developed a technique which I plan to explain in a later post.

For control, 5 R/C channels are used in total:

Channel 1: left EDF thrust vectoring servo;
Channel 2: right EDF thrust vectoring servo;
Channel 3: left EDF motor;
Channel 4: right EDF motor;
Channel 5: air cushion motor.

With this setup, and given the fact that I am using a programmable transmitter (powered by OpenTX), it is possible to fine tune mixes and mappings between stick input and channel output in a way that makes it simple for the operator to control the vehicle, and optimal use of the motors and control surfaces is achieved.

For instance, for controlling the steering, I went for a combination of thrust vectoring and differencial throttle control - when the vehicle is being steered left or right, less power is applied to the left or right motor respectively, while the entire  EDF assembly is turned right or left at an angle proportional to the user input. Experimentally I verified that using thrust vectoring alone, it would cause translation of vehicle instead of the desired yaw angle together with the change in direction.

Two curves were configured, in order to define the thrust vectoring + differential throttle mix explained above:

Another curve was defined, in order to mix the throttle stick input with the air cushion motor.

This would remove the need for having to use a separate control input for turning this motor on and off, therefore allowing for some energy savings. I preserved however, the use of a separate potentiometer in the TX, for adjusting the maximum speed of this motor.

As of this writing one a few indoor tests were conducted (potentially at the expense of the good relationship with the neighbors living in the adjacent apartments). Those were enough to prove that if  single EDF is painfully loud, 2 EDFs and a propeller is worse than a unmuffled motorcycle running at wide open throttle.

Stay tuned for the video featuring an outdoor test of the machine (with people with earplugs around it).

Sunday, June 23, 2019

DSLR Intervalometer - Source code made available in GitHub

For those who remember my work back in the days with implementing an intervalometer for Nikon cameras (yes, in spite of it being rather simple to implement in the camera firmware itself, these larger brands prefer to classify such a feature as premium and make it available only in more expensive DSLRs), I have detailed in the following post, the solution that I have put together:

Initially I built the Intervalometer to control (via a wired interface) a Fujifilm S9600 camera, but later I have converted the design to include an IR transmitter, and as such be usable with practically any Nikon DSLR with an IR-remote port (normally used with the ML-L3 IR remotes that are sold separately). This device mimics the ML-L3, and furthermore it has the intervalometer capability.

I have now made the project schematics and firmware source code available in GitHub, for those who wish to build the solution or contribute/fork/take as inspiration for a new project. You can find it in my GitHub section, under:


Saturday, June 15, 2019

Yet another product safety issue - a self-balancing electric scooter, a.k.a. "Hoverboard"

Considering all the fuss about this particular type of personal transportation gadget having been responsible for numerous fire incidents, given that it is already part of a distant past (by modern perception), I took the chance of buying one of these units, going for a cheap one. My expectation was that this industry had some time to mature and learn with all the beating they received from the press and these incidents:

As such I searched for the available products and ended up deciding on a "BBOARD-60-B" from a brand called Brigmton.

It was a relatively cheap proposition, as I only had to shell out about 70 Euros for it. It features two 350 Watt motors, and a 36 Volt / 158.4 Wh battery.

After unboxing the unit, I noticed a rattling noise whenever I would shake it, as if there was something loose moving inside the unit. At first I underestimated the situation, assuming it could just be some random piece of plastic from the injection moulding process that got separated from the main plastic part.

But after some rides, and thinking in hindsight about other products that went past my hands, I finally got the wake up call I needed to open up the unit and check out what was going on.

These scooters are split in two relatively independent halves, that communicate via a central joint. This joint provides one degree of freedom, which is the necessary for the user to control the turn rate and direction.

Opened the cover of one of the halves, and immediately stumbled upon the twisted cause of the rattling: a 12mm long M4 screw lost inside the case where half of the electronics of the unit live, most notably the PCB with its exposed contacts, and the power MOSFETs that drive the motors.

Depending on where in the PCB this screw would touch, the results could range from frying some electronics and the story ending there (which could have painful results if happening while riding the unit), to more catastrophic scenarios such as the battery overheating and catching fire with the short-circuit caused by the screw.

Looked exhaustively inside the case where could this screw belong to, but could not find any orifice missing a screw there.

This strongly suggests that by mistake during the manufacture, the worker (or machine) let the screw fall into the case, and whithout noticing the presence of the said screw, closed the case normally and moved it to the next step of the assembly line.

After this experience, I was glad I opened the unit to check for what was the noise. On the other hand I was annoyed, because it is unfortunate that as a consumer I have to worry about these things, in spite of having been a cheap unit when compared to others. Safety should be for all, not just for the deeper pockets.

With this finding I considered it would be a good idea to inspect the rest of the unit, to check if there could be other suprises (even though I tend to be less and less surprised about what goes on in many China sourced products...).

Opened the other half, and found another equal board, and also the battery:

Other than the loose screw, I could not find anything obviously incorrect with the assembly. Two identical boards are used in both sides. Both these boards are populated with what appears to be the brains of the entire device, a GigaDevice GD32F130 ARM architecture microcontroller:

The battery module is a typical 10S - 2P 36 Volt 4.4 Ah job. These are composed of 20 18650 Li-ion 3.6 Volt cells, where two sets of 10 series connected cells are parallel connected, to double the Ah capacity of the cells. These modules usually have an integrated BMS (Battery Management System), allowing for the charging and cell protection to be done independently of the device where it is connected.

One curious aspect is the fact that they choose to use an XT60 connector (which has superior thermal and current handling characteristics -  60 Amps max) in one of the sides (where the battery is located), and selected a Deans connector on the other side. Both types of connectors are popular in the RC hobby industry, but have found increased use in other applications.

It would have been more reassuring to find the PCB coated with some kind of conformal coating (potential contact with moisture is a very likely scenario), but as it is visible, it is quite naked, straight from the reflow oven:

The casing also does not provide any serious isolation against water ingress, so definitively this device should not be used anywhere near water.

Another interesting aspect is regarding the unpopulated section of the PCB which apparently would house a bluetooth module, given the antenna pattern etched in the PCB, and the format of the module drawn in the silkscreen:

At a later time I may research a bit further about similar modules featuring bluetooth, and if/how a generic Bluetooth - RS232 module can be fitted and used here, and in this case, which of the two boards should have the module (one board is master and the other is slave?)

For now I will cross fingers and hope that the screw was the only serious issue with this hoverboard. The teardown and inspection left me reassured to some extent though..

Sunday, May 12, 2019

Dealing with dishwasher failure

Albeit 10 years of flawless operation can be considered quite good for a home appliance, still when it finally fails, there is the brief criticizing thought of "why didn't it last longer? Bloody programmed obsolescence in modern industry!" ..and so on and so forth.

Well, the truth be said, 10 years of operation without a single glitch is either a product of sheer luck (i.e. one golden batch in the production line), or the brand really went serious with quality and the strategy at the time didn't include the need for recovering the same consumer soon in the product life cycle.

I can say this from the Whirlpool dishwasher model ADP 6837/1 that I have been using since 2009. During 10 years it never complained, while we threw dirty dishes at it on a daily basis.

Today it finally decided to refuse to finish a washing session, exhibiting an "F1" error in its display. Looking up on-line, quickly found that it means there is a problem in its NTC thermistor device.

As those in the field probably know, an NTC (short for Negative Thermal Coefficient) is a small (passive) component that suffers a predictable change in electric resistance, as the temperature changes. Being of the negative type, it means that as the temperature raises, its resistance value drops.

Given that the error points to such a specific device, I though it would be reasonably simple to find the sensor and confirm the fault.

The first challenge was exactly where to find the sensor: given that I could find very few servicing information for this washer in the web (the closest I could find was for another model, the ADP 6600, which in spite of many similarities, I came to find that it had a totally different sensor..), I was limited to opening up the machine, explore and go by the elimination method.

First, removed practically every panel that prevented me from looking at its inner workings:

The first step, removing the top lid and the weight:

Then, one side panel off as well:

This allowed to have visibility over the motor/pump/heating assembly:

Still, I wanted more, and removed the bottom panel:

This provided access to most of the bottom components of the machine. It is notable the water softener device, the sump, the wiring and the pumps and valves:

In the ADP 6600 service manual, the NTC showed up as a discrete device. I started the search assuming that I would also have to find a discrete NTC in this machine. But I simply could not find anything looking like what I was expecting: a device with a 2-pin connector somewhere in the bottom of the water sump. The closest match was something with 6 pins which I initially ruled out as being the NTC:

So I decided to continue with the teardown, and went on with opening the front door of the washer, which contained the control panel. Here I found two modules. The left side one, which appeared to house the main controller:

and the right side module, which apparently was just the user interface part:

From the first module it was easy to tell that the NTC had a 3-pin connector, which apparently was grouped with another 3-pin device:

This made me look back to the 6-pin device that was at the bottom of the water sump.

As I removed it, I was able to quickly find that it was not only the NTC, but also a turbidity sensor, both in the same package.The later was a relatively novel sensor in 2009 dishwashers, which allowed the detection of the amount of foam in the water. With this information the washer is able to better manage when to add new water to the loop, therefore leading to water consumption savings. Bitron detains a patent over this type of turbidity sensor, and it was the OEM chosen by Whirlpool for this particular washer.

With the sensor removed from the sump, tried to determine if it was actually failing. by doing a simple test: first, measured the temperature at which the sensor was initially:

and measured the resistance across the NTC:

Then took a cup of water heated at about 50ºC, inserted the sensor, and measured again:

As expected for a working sensor, the resistance dropped considerably:

Performed one last test with the water at about 70 ºC, and the resistance further dropped to around 8 kOhm.

Comparing to the table in the ADP 6600 service manual (in spite of not being the same model), the results were very close to the table shown there:


20 °C - 58.1 kOhm
25 °C - 47.1 kOhm
30 °C - 38.2 kOhm
40 °C - 25.4 kOhm
50 °C - 17.2 kOhm
60 °C - 11.8 kOhm
70 °C - 8.3 kOhm
80 °C - 6 kOhm
85 °C - 4 kOhm

This seemed solid indication that the NTC was actually ok.

As such it led me to consider two scenarios: either the F1 error actually derived from another faulty device, or it was an intermittent failure motivated by poor electric contact or similar problem somewhere.

Decided to put everything back together, close it all up, and power it on for a test.

Initially the error still showed, but as I read in the documentation this was normal, as this type of error would be stored. To clear it, had to press the start button for 1.5 seconds. The error disappeared, and as of this writing a full washing cycle was completed without problems. So far success and zero parts replaced, only a little massage to the inner workings.

This may well have been the golden batch of the Whirlpool dishwashers...