Author: Cyril

Fixing my noisy Helios KWL

Fixing my noisy Helios KWL

After running for over 9 years, 7/7 and 24/24, my Helios KWL EC 500 Pro started to make more and more noise. It was especially noticeable at night, even at a lower speed. Clearly, the motors were the culprits, and since they are brushless motors, the ball bearings were for sure at the end of their lives. I removed one of the motors, read the reference number, and found a very nice video on YouTube explaining how to change the ball bearings on a similar model. The reference of the motors for my KWL EC 500 Pro is R3G160-AC50-12. The ball bearings are the same as in the YouTube video. I ordered 4x SKF 6000-2RSH/C3 from brw.ch and after a few hours of work, my KWL is running silently like on the very first day.

Motor from ebmpapst.
Carefully remove the electronic part.
Be very careful with the RPM sensor
Now, we have access to the interesting parts.
Separating the rotor from the stator is the most complicated part. You will need the appropriate tools (see the YouTube video).
Everything back in place in my KWL EC 500 Pro
Fronius Symo & WS2812

Fronius Symo & WS2812

I have 36 solar panels on my roof and a Fronius Symo 10.0-3-M inverter for a bit more than a year and I really enjoy watching the statistics. Since the system also has a smart meter, I can see production but also power consumption. In order to make everyone at home aware of our energy production and consumption, I decided to build this:

Led bar graph for Fronius Symo

This is a led bar graph that displays our current power to the grid data. In case we produce more than we consume, the led will get green. If we buy energy from the grid, the leds turn red. The more leds are on, the more energy we import (or export). The data is refreshed every 3 seconds so you can watch the effect of turning devices on and off (e.g. oven, hair dryer, coffee machine, etc) pretty clearly. The game is to try to get as much green as possible and avoid red.

I 3d-printed the stand in PLA and the led covers in transparent PETG. I used Onshape to design everything. I had still a bunch of WS2812 from another project so I reused them:

WS2812

I ordered a few Wemos MINI D1 ESP32 from ebay.com. The ESP32 platform is great because you get WiFi and some neat processing power in a cheap and small device. Perfect for that project. Even though the GPIO are 3.3V, I didn’t encounter any problem with the WS2812 (powered from a VCC 5V pin). I also did not bother putting a capacitor to smooth voltage peaks since I only have 10 leds and the wires are short enough.

Wemos MINI D1 ESP32

I designed the stand so that I can directly use the micro USB connector to power the system:

Powered via micro USB

I wrote the code using VSCode and PlatformIO, my go-to development stack for small projects of this kind. My solar inverter has a JSON API. I already used that API for another project so it was pretty easy to get the required data. The ESP32 connect via WiFi to my IoT network and then to the inverter over HTTP. The data are polled every 3 seconds. I cannot get data much faster than this, probably due to HTTP download and JSON parsing times. I did not investigate this further since 3 seconds is good enough. I used the great FastLED to drive the WS2812. I added a few visual effects to make the thing look a bit nicer.

So far all the family really enjoy the device. I made a second one for my parents who have the same inverter. In case you want more information, feel free to contact me. I can provide STL files and code if needed.

Sofirn SC31 Pro & Anduril2

Sofirn SC31 Pro & Anduril2

I started buying flashlights a few months back. I started with an Astrolux FT03 which comes with Narsil installed. Anduril is another widespread firmware for flashlights with more features than Narsil. There is even Anduril2 in the work and I decided to install this version on my FT03.

A few weeks later, I decided to buy another smaller flashlight. Looking at reviews, the Sofirn SC31 Pro sounded like a great choice for me. It comes with Anduril. Since I had Anduril2 on my FT03, I looked at how to flash it on the SC31 Pro.

I found this post which sounded promising. As you can see here, you can access the ATTiny85 when removing the button. However, things are very very tight. Still, I decided to give it a try.

I bought some pogo pins and 3d printed a support for them:

The resolution of my 3d printer is barely good enough to have something usable. But that did the trick. I glue the pogo pins with CA glue:

I then soldered wires to the pogo pins and installed the device on top of the ATTiny85. This was clearly the most critical part. My 3d print mount is not optimal and I had to hold it in place using the wires. I double checked visually that the pogo pins were not touching 2 pins and were more or less correctly placed.

I plugged in my USBasp and could successfully access the ATTiny85 with avrdude. Flashing Anduril2 was then just a matter of a minute.

Based on the comments I found on budgetlightforum.com, Sofirn is using the same configuration for all its flashlights so I used cfg-sofirn-sp36.h to compile the firmware.

After flashing, I disconnected the USBasp, put in the battery and tested that everything was fine. I now have both my flashlights on Anduril2.

Wingo & Draytek Vigor166 & pfSense

Wingo & Draytek Vigor166 & pfSense

After over 7 years on CATV with Net+, I was getting bored of my very slow upload speed. Even though you can get good download speed on CATV, my provider only offers a ridiculous 25 Mbps upload speed on their top-end profile (500 Mbps download). Also to get 500 Mbps, you need a newer modem/router/firewall/wireless box that does not allow bridging. A clear no-go for me so I kept my older Cisco modem but was limited to something like 350/25 Mbps. When working from home, a decent upload speed really matters. Also many things are in the cloud today and it is always comfortable to be able to quickly upload some backups or pictures.

The other alternative in my case was DSL. Since we were using CATV, I never took my phone line in service. The Swisscom checker reported that, for my location, I could get 225/60 Mbps. Not a super great download speed but a higher one on the upload side. I decided to give it a try. I ordered Wingo DSL + 2x Wingo TV boxes. Wingo is super cheap and does not limit your bandwidth. You get the maximum that your line can provide.

On January 11th, my line was activated and after checking that the wires were correctly rooted with the Internet Box, I switched to the Draytek Vigor166 modem I ordered a few days before. It immediately synced at ~450/95 Mbps on G.fast. That was a very nice surprise. To get the best speed possible, I crimped the RJ11 connector directly to the U72 cable.

Bridge mode

In order for pfSense (2.4.5-RELEASE-p1 when I did this) to get a public IP address, you have to configure the modem in bridge mode. The modem has a wizard to do this and there is no surprise here. You will just need to deactivate the VLAN tagging in the Vigor166 like shown below:

Also, there is no need to specify DHCP Option 60 for Wingo. Just keep things simple and configure 6rd while you are in the interface settings:

With this configuration, you should get an IP address from Wingo. However, you will likely get an IP address that cannot be routed on the Internet. Wingo/Swisscom uses CGNAT. Go to your myWingo account and activate the DMZ option. We do not use the Internet Box so this option will only have the side effect that we will now get a public IP address which can be routed on the Internet. Just renew your DHCP lease and everything should be fine.

Wingo TV

Wingo TV requires the IGMP proxy in pfSense to be configured properly. Add the following networks to upstream (not sure they are all required):

  • 224.0.0.0/4
  • 195.186.0.0/16
  • 239.0.0.0/8
  • 213.3.72.0/24

Edit: 213.3.72.0/24 seems to be the only required network to add as upstream.

Also add two rules on your WAN interface to allow IGMP and UDP traffic:

  • UDP from 213.3.72.0/24 to 239.0.0.0/8. This is for the live streams via multicast
  • All IGMP traffic. Be sure to activate the Allow IP options.

This should be enough to have live and replay TV.

IPv6

I advice you to upgrade to pfSense 2.5 (I’m using the 2.5RC at the moment). It contains a few fixes related to 6rd. Especially, the MTU is now set correctly to 1480 (MTU of the WAN interface – 20 bytes) on the wan_stf interface. Still, connectivity to some web sites (like swisscom.com or sbb.ch) does not work properly. This is discussed extensively here. Also there is a bug in pfSense which wrongly compute the MSS clamping value for IPv6. I solved the problem by setting MSS to 1460 for the WAN interface:

EDIT: The MSS clamping bug has been fixed in pfSense 2.5.1. MSS can now be set to 1480.

Configuration of your LAN is then straightforward. For IPv6 Configuration Type, use Track Interface:

Unfortunately, Wingo only provides a /64 so cannot simply assign different subnets to your internal network. In my case, I only enabled IPv6 on my LAN interface and kept my other subnets IPv4 only. Enable RA for LAN and you should have IPv6 connectivity:

I also added a firewall rule on WAN to allow all ICMP traffic on IPv6 toward LAN. IPv6 relies a lot on ICMP and this traffic should not be blocked.

Access Vigor166 management

This was probably the most painful thing to solve. As soon as the modem is in bridge mode, you cannot access the web or telnet management console anymore. The first solution I used was to connect the second port of the modem on a free physical interface on my pfSense router. However, this is a bit overkill to just access the modem from time to time.

After some trial and error, I finally managed to make the Vigor166 accessible via the WAN interface.

I configured my Vigor166 with a LAN address of 192.168.200.10 (netmask /24). This network is a complete different one from my internal networks. I then created a virtual IP on the WAN interface with an address of 192.168.200.1/24:

After doing this, I’m able to ping and access the Vigor166 from a pfSense shell. However, access from my LAN does not work. The solution is to use NAT like below:

I’m accessing the modem from my 192.168.1.0/24 network and this rule will actually rewrite the source address to make it look like it comes from 192.168.200.1. This way, there is no static route to setup on the modem. The idea came from reading this recipe in the pfSense documentation.

Apply the changes and you can now access the management interfaces of the modem via 192.168.200.10.

Conclusion

I have this setup for more than 2 weeks and it works perfectly. I’m very happy with my new speed and the latency is even better on DSL than on CATV (~5 ms compared to ~15 ms up to the first/second router). The only downside so far is that I cannot use my Samsung remote control to control the Wingo TV box. The IR extension port is disabled in the firmware so you are forced to use the original remote control.

Isopropyl alcohol helps removing PLA prints from your bed

Isopropyl alcohol helps removing PLA prints from your bed

I use a Creality CR-10 Mini since a few years now and really enjoy it. I mainly print PLA, PETG and flexible materials. I like to use PETG for “mechanical” parts or objects that need to be left outside. I also like how PETG is not wrapping at all when printing. Still I’m often using PLA for toys or objects with many small details.

I’m mainly using Extrudr NX2 PLA because I like the matte finish and also the fact that it is FDA approved. I often print stuff for kids so I prefer to use an approved material. However, I have issue with this PLA. Either it doesn’t stick well to my bed (IKEA mirror tile) or it stick way too much. I already took parts of the glass with the print while trying to remove the object from the bed, forcing me to replace it.

Egg dispenser bunnies

I add that issue again recently while printing an egg dispenser bunny for my kids. Using a bed temperature of 45°C, the print did not stick well and the print wrapped a lot in the corners. With a bed temperature of 65°C, the print went well but I was not able to remove it from the bed, even after the bed cooled down to 15°C (I’m printing in my basement).

Googling around, I found a post on a forum (sorry, I don’t remember the source) in which a guy said that he uses a few drops of isopropyl alcohol to help removing PLA prints from his bed. I bought isopropyl alcohol when I started using my printer to clean my bed. Yet, I’m not using it very often because I rather use hair spray nowadays. Still, I tried a few drops of iospropyl alcohol around the print, made it go under the print by tilting the bed and… I instantly heard the print “detaching” from the bed. I managed to remove my print with no effort (and damage) this way.

Isopropyl alcohol

I’m very surprised that I had never heard of this trick before. I think it is definitely worth sharing. Give it a try and you will see. By the way, it looks like isopropyl alcohol does not affect PLA so this should not damage your precious print.

18650 for Lunii

18650 for Lunii

My daughters love their Lunii (Ma Fabrique à Histoires). They received them as a gift some years ago and still use them almost on a daily basis. The people at Lunii did an awesome job with this product. Furthermore, their software to buy and install new stories supports Linux which is a big plus for me. I had to open the boxes a few times to fix the volume knob and just because I was curious to see how it was made.

Customized Lunii

I have a few 18650 Li-Ion batteries at home and this evening I decided to try to replace the original battery with one of those. The 18650 fits without any modifications to the casing but it’s a tight fit. I used a protection circuit (undervoltage and overcharging protection) since the original battery has one and to be on the safe side.

The original battery is labeled as 500mAh. The 18650 I put in is at least a 2000mAh so that should be around 4 times more battery life. The Lunii is charging at the moment, I’ll report after a few days of use if it works as expected or not.

Inside a Lunii

UPDATE: after several months of use, I can report that the Liion cell is working great as expected. I did not measure how long the Lunii lasts with this battery but it is clearly much longer than before.

Le nombre d’or : réalité ou interprétations douteuses ?

Le nombre d’or : réalité ou interprétations douteuses ?

Back in 2005 when I was a student at EPFL, I wrote a report together with Kévin Drapel on the golden ratio. With that report, we won the first prize for the best STS project. I had the report available for download on my previous website and it had quite a few downloads. Therefore I put it back again online here. Oh, by the way, it’s written in French 😉

Master thesis

Master thesis

Yet another document I had available for download on the previous website that I put back online here. This time, it is my Master Thesis report that I wrote back in 2006.

The idea was to use an ultrasound imaging device to register a vertebra with a 3D scan. The first step was to calibrate the ultrasound probe and I spent all my time working on that aspect (which was already quite challenging).

Again, the report is written in French.