Marc's Public Blog - Electronics Hacking


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Computers | Diving | Dreamstate | Edc | Electronics | Exercising | Festivals | Flying | Halloween | Hbot | Hiking | Linux | Linuxha | Monuments | Museums | Oshkosh | Outings | Public | Rc | Sciencemuseums | Solar | Tfsf | Trips



Table of Content for electronics:

More pages: November 2024 September 2023 August 2023 June 2023 May 2023 April 2023 January 2023 November 2022 May 2020 January 2020 December 2019 April 2019 January 2019 June 2018 May 2018 June 2017 April 2017 May 2016 February 2016 November 2015 October 2015 August 2011 July 2011 May 2011 June 2010





2024/11/10 Getting Things Done in an ADHD World
π 2024-11-10 01:01 in Arduino, Computers, Electronics
I attended Pasadena Hackaday Supercon, so I figured I'd put my pictures into a quick blog entry, shouldn't take long...


1) Oh, I need to finish writing code to get the SAO badge holder to do something fun

2) Mmmh, why does this python global variable thing doessn't work in the function

3) Goes to re-learn python, with help from gemini and how python forks global variables by default in functions so what you write to them isn't saved at local scope (oh my, why did they do that?)

4) after more hacking, get a proper demo working:

5) publish code https://github.com/marcmerlin/2024-Supercon-8-Add-On-Badge/blob/main/README.md (actual code is here: https://github.com/marcmerlin/2024-Supercon-8-Add-On-Badge/blob/main/software/software/main.py )

6) Oh, I need to make a video demo of the SAO, but...

7) oh yeah, there was that hat on my desk I needed to add LEDs on for an upcoming party, start hacking on that

8) mmmh, the hat won't work long enough with a USB battery, start hacking on a lipo solution

9) ah, lipos work, but the front LED panels rated for 5V start failing around 3.5V, so I need to make a dual lipo solution, one for the neopixels and one for the RGB panels

10) test and measure the dual lipo solution and figure out it will last close to 12H, that's good. Ok, hat works mostly, post that https://www.instagram.com/p/DCYEl1jJd_-
11) Ah yes, the SAO video I was supposed to work on: https://www.youtube.com/watch?v=z7MSywf7js4

12) During that time, I get interesting distracting packages on my doorstep, like lovely flexible LED panels that will hopefully power my future outfit: https://rpi-rgb-led-matrix.discourse.group/t/rpi0-2w-speed-compared-to-rpi3a/913/2

13) While I'm testing them, also try some new rPi0 2w chips and microcontrollers to see if they can power my LED outfit with a smaller form factor (and yes they can): https://rpi-rgb-led-matrix.discourse.group/t/rpi0-2w-speed-compared-to-rpi3a/913 . In the interest of briefty, I'm going to skip the part that included migrating from raspbian to a new dietpi linux distro and port back all my custom changes on it :)

14) That said, I had a long-ish discussion and planning with the electrodragon folks in China on how to make a new 3 channel daughter board that is much smaller and would decrease the over footprint of all new picture frames like the one I built, and of course my LED outfit.

15) but wait, now I also find out there is a new beaglebone solution that does 6 channels output instead of 3? Ok, make a post about it: https://rpi-rgb-led-matrix.discourse.group/t/interesting-6-port-board-beaglebone-pocketcroller-v2/918/2

16) and file a couple of RFE bugs to look into it: https://github.com/hzeller/rpi-rgb-led-matrix/issues/1733 + https://github.com/FalconChristmas/fpp/issues/2054

17) Oh, I just found this old video on my laptop, why did I never post it? Ok, fix that: https://marc.merlins.org/perso/linux/post_2021-01-23_Linux_conf_au-2021-LED-Talk.html

18) Mmmh, so when I quickly posted those pictures from Neil deGrasse Tyson who just gave a talk, I got a reminder it was annoying for my blog system not to be able to link to videos directly without having to upload them to youtube.

19) Ok, learn about html5 video tag, hack my blog system to support videos, and push a new blog with my first video tag: https://marc.merlins.org/perso/outings/post_2024-11-14_Neil-deGrasse-Tyson-back-at-San-Jose-Center-for-Performing-Arts_-An-Astrophysicist-Goes-To-The-Movies_-the-Sequel.html

20) ok, but why did I have to rescue my video from my phone because the H265 recompressed version did not work in the blog? Ah, because of royalties on H265 being too high, most browsers refuse to add support for it: http://marc.merlins.org/perso/linux/post_2024-11-17_Vidrename-Script_-Clean-up-Normalize-Video-Filenames-and-Add-Codec-And-Container-Format-With-Mplayer.html

21) Ok, sure, but now I need to upgrade my vidcomp script to support VP9 and AV1: http://marc.merlins.org/perso/linux/post_2024-11-17_Vidcomp-Script_-recompress-videos-on-linux-with-mencoder-or-ffmpeg-to-div3_-div4_-div5_-xvid_-mpeg4_-h264_-h265_-VP9_-and-AV1.html

22) then I find an Email from a chinese engineer who is willing to talk to me about making better LED shoes. That's exciting, let me reply to him first

23) ok, now I can recompress my videos to VP9, which I benchmarked to somehow be faster to compress and still smaller file size than AV1 (not supposed to be the case, but that's what I'm getting). On the plus side, VP9 works with more browsers than AV1.

24) what as I doing again? (now days have passed). Oh yes, I was supposed to write a blog on hackaday supercon: http://marc.merlins.org/perso/electronics/post_2024-11-01_Pasadena-Hackaday-Supercon-2024.html

25) of course the ridiculous amount of time spent to allow these 2 videos in that post, is a bit hard to justify, but it's really solving a problem I've had for over 10 years, and never got to the top of the pile, because, well, you see what happens when I try to put something on top of the pile :)

26) and I was good, I didn't even play with the micropython rpi micro I received in the mail this week, or the electromage pixelblaze and I/O board, or more LED panels that somehow showed up at my doorstep :)

27) mmmh, and there are all those webcams I ordered and need to configure, but now it's clear I'm going to have to re-install my camera controller, shinobi, from scratch, and that's yet another rabithole...

28) in the meantime I have to finish my LED hat, and design my new shirt and pants for Dreamstate in 4 days... Wish me luck :)

2024/11/01 Pasadena Hackaday Supercon 2024
π 2024-11-01 01:01 in Arduino, Electronics
After having such a great time at the linux.conf.au Open Hardware Miniconfs over the year, and missing them after the last one where I built those badges, I somehow missed a local-enough Hackaday Supercon that had been going on for years. Oh noes!

It was very cool that I got to wear my LCA SAO badges for the first time:


This post, because of its 2 video inserts, a new addition to my blogging software, was also an interesting exercise in non linear time and tasks, more on this page: Getting Things Done in an ADHD World

Day 1, Friday

Thanks to Anthony for letting me know about it, and I was able to attend. Went there early on friday for the pre-conf to work on the badges:


the conference badge was this 6 port micropython rPi micro with a couple of SAOs.
the conference badge was this 6 port micropython rPi micro with a couple of SAOs.

they nicely provided food all 3 days
they nicely provided food all 3 days

essential geek survival food :)
essential geek survival food :)

They gave us a quick primer on how the badge worked, although it would have been better on a webpage with links and info for total beginners who had never used micropython and thorny or knew what thorny was (that included me):


I'm glad I took pictures of these slides, they only made sense many hours later. They should have been online
I'm glad I took pictures of these slides, they only made sense many hours later. They should have been online

finding fellow LED geeks :)
finding fellow LED geeks :)

learning blinkies for beginners, scan this
learning blinkies for beginners, scan this

While I was there, I 9ound out they had a wonderful 4 bit computer some years back. I actually really regret not having been there that year, programming that in hand crafted assembly would have been epic:


someone hacked a basic I2C on it
someone hacked a basic I2C on it

people now hard at work
people now hard at work

I used the opportunity to bring previous LCA toys and show them off (and fix a few)
I used the opportunity to bring previous LCA toys and show them off (and fix a few)


People came with plenty of SAOs:



some came more ready than me :)
some came more ready than me :)

SAO extenders, cool!
SAO extenders, cool!

SOA badge holder bag, sweet!
SOA badge holder bag, sweet!

I found Tom Verbeure, the person who had been hacking on RGB Panels with open source FPGAs (colorlight). Cool project for sure. See: https://github.com/q3k/chubby75?tab=readme-ov-file#colorlight-5a-75b and https://github.com/lucysrausch/colorlight-led-cube/tree/master


Also, finally got to meet Henner Zeller, the rpi-rgb-panels author I've been working online with for years:


epic watch!
epic watch!

Also got to meet Daryll Strauss from precision insight, later acquired by VA Linux some 25+ years ago:



People still hacking at night:


I was lit up enough not to get lost :)
I was lit up enough not to get lost :)

Day 2-3, Saturday & Sunday

Saturday and Sunday were the main conference days:


went to attend a few talks
went to attend a few talks

hacking radio sound and B&W video from a chip, super cool!
hacking radio sound and B&W video from a chip, super cool!

learned about an online microcontroller emulator, wokwi, very nice
learned about an online microcontroller emulator, wokwi, very nice




I got to see a pick and place machine, nice to see them work:


this is what the machine was 'printing'
this is what the machine was 'printing'


I tried the SMD challenge, that was hard as hell:


we got old and fat irons, making things harder :)
we got old and fat irons, making things harder :)


I couldn't get the last 2 LEDs working, they were so stupidly small
I couldn't get the last 2 LEDs working, they were so stupidly small

I had someone help me fix mine :)
I had someone help me fix mine :)

and they all worked, thank you to the master solderer!
and they all worked, thank you to the master solderer!

added the result on my badge :)
added the result on my badge :)

Random fun shots :)


people hard at work
people hard at work



During the weekend, the SAO wall got populated:






Fun to see this SAO based on this burning man sign

Original from Burning Man
Original from Burning Man

more and more
more and more

and more :)
and more :)

Saturday evening party had a nice real time AI image generator:





some were far out :)
some were far out :)



The conf ended with a presentation of best SAOs:



This guy won the contest of biggest SAO, he had a printer working off USB, run by his SAO
This guy won the contest of biggest SAO, he had a printer working off USB, run by his SAO


Sunday ended with a party at a bar, thankfully I had my battery soldering iron :)


This was loads of fun, and I definitely learned some good stuff. Sad I didn't go earlier but glad I went this year. Thanks bunch to all the organizers and attendeers who contributed!

More pictures: https://photos.app.goo.gl/2hYRaaB5dF5mvv4N8

See more images for Pasadena Hackaday Supercon 2024
2023/09/22 Testing 1.5V AA Lithium Batteries
π 2023-09-22 01:01 in Electronics, Public
Lithium Batteries have a voltage between 3V and 4.1V, but recently they have been turned into the 1.5V form factor with some electronics that step them down to 1.5V and custom chargers that know how to recharge them via a special protocol, or for the EBL batteries, they have a micro USB plug onboard.

They are of course not all the same real usable capacity, and I've learned not to trust vendor capacity claims anymore either, due to the amount of sellers that plain lie on amazon. The good news is that Neither Xtar nor EBL lied about their cell capacity as long as you understand that the actual energy you can output will be lower due to conversion losses and some safety buffer to give the cell longer longevity.

https://docs.google.com/document/d/1z9o7O5o70SxJnQwKHJD8JdlPdScZZ1o09scHqUlDxeE/edit?usp=sharing

Here is a quick summary without pictures:

New Xtar: Rating: 4.15Wh, Charge: 5.5Wh, 3.45Wh Usable discharge at 1A

  • https://www.amazon.com/gp/product/B0CF8ZNZ33/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1
  • Summary:
  • This is the only lithium battery that drops its voltage to 1.1V to give you a low voltage warning. Other batteries I tested just die with no warning. That alone is a reason to select it. I tested it with my garmin GPS and it gave me 2H of low battery warning before finally dying. Very nice!
  • It is also the battery that gave me the most actual discharge capacity
  • Seller is not lying about cell capacity (thank you) which of course is higher than actual usable energy due to conversion losses
  • New charger is unfortunately bigger than the old one and drops the USB-A output feature to use your batteries as an emergency USB charger
  • Verdict: this is the best battery I tested and what you should buy as long as you don't need a built in charger like EBL
  • Old Xtar: Rating: 3.3Wh, Charge: 5.3Wh, 2.7Wh Usable discharge at 1A

  • https://www.amazon.com/gp/product/B09NLVJDY6
  • Summary:
  • This is the older Xtar battery. It had best in class capacity until the newer one that came out with added low voltage warning. There is no good reason to buy this battery anymore, get the new one.
  • Its capacity is equivalent ot the EBL battery with built in USB charging, so the EBL is more versatile
  • The charger is very compact and can act as a USB power source, that's a nice feature.
  • 10.6Wh to charge 2 batteries, or 5.3Wh charge per battery

    EBL 3.3Wh rating, Charge: 4.3Wh, 2.7Wh usable discharge at 1A

    # https://www.amazon.com/gp/product/B08RZ5NDMM

    Summary:

  • There is no low voltage warning, but the battery capacity is actually equivalent to the old Xtar despite the space lost to the built in charger. The new Xtars last longer than the EBL though.
  • Interestingly EBLs need less energy to charge than Xtar for the same output capacity, they are more efficient
  • Big warning: if you try to charge the batteries via USB while they are in use, they are going to output 5V instead of 1.5V. This is unexpected and fried one of my GPSes. You cannot charge them while they are being used.
  • Deleepow 3.4Wh rating, 3.8Wh charge, 2.4Wh usable discharge at 1A

  • https://www.amazon.com/gp/product/B09NLXQRP3
  • Summary:

  • These battery are not for sale anymore, and they were the least performing amongst the ones I tested.
  • The 3.4Wh cell capacity is probably untrue with the charge and discharge numbers I got
  • See more images for Testing 1.5V AA Lithium Batteries
    2023/08/29 2023 Burning Man Illuminaughty LED Meetup
    π 2023-08-29 01:01 in Arduino, Bm, Electronics
    It was great to be able to attend my 3rd Illuminaughty LED Meetup, a great way to see other cool LED stuff built by like minded LED maker geeks. Several had really cool LED builds I had never seen and looked very well done, happy I got to see them :)

    Just like last year, Illuminaughty was about as far across the playa as a camp can be, so it was nice when we arrived :)






    Ran into a bunch of people will cool gear:



    Very cool hat:


    Impressed that the newer panels can bend pretty well
    Impressed that the newer panels can bend pretty well


    i21*

    a lot of work went into these patterns
    a lot of work went into these patterns

    Anthony had a lot of cool gear he built, I was very impressed:








    Obligatory group picture:


    Thank you to Chuck for organizing this year again, it was lots of fun.

    2023/06/16 Party LED Outfit Version 6: Self Contained Power System on LED Panels
    π 2023-06-16 01:01 in Arduino, Clubbing, Electronics
    This is the untethered update to my v5 outfit. Please see LED Pants and Shirt v5 on ESP32 and Raspberry Pi with P2 RGBPanels and Wifi for how the entire setup works, and for the new LED strips on arma and legs, you can see Party LED Outfit Version 5.5: Flexible P15 LED Strings, LED Fanny Pack, Rez Inspired LED Goggles, LED Laces and LED Shoes

    And if you want even more details and history >>> See this full article on the why and evolution of my LED outfit <<<

    For all these years, my outfit has relied on a fanny pack filled with batteries, and with an unslightly tether from the fanny pack to the panels, bringing 2 feeds with 5V (as backup and to spread out the amps over 2 wires). That system worked for many years and would survive the failure of one of the 2 5V connections, or even the 16V connection meant to feed the rPi from its own power source stepped down to 5V on the panels (so that it doesn't see a voltage dip on the remote 5V rail when the display sare fairly bright). All in all, it worked, but the fanny pack tether and wires were cumbersome, and some security folks didn't like all the wires.

    After switching to a new neopixel controller that is directly USB powered, it made more sense to power the panels locally and put the batteries on the panels:



    For comparison, the old panel on the left only has the rPi and a small 16B to 5V converter and than relies on that tether cable to the white box on the left which has the DC-DC step down and the ESP32:


    finished design with padding, power routing from 3 lipos or 2 USB attery packs
    finished design with padding, power routing from 3 lipos or 2 USB attery packs

    While this was not new for v6, made sure the camera still worked, it turns out to not be super reliable on batteries, but when it works, it's a crowd favorite:


    The new version works like the old one, but with batteries directly attached to the panels, which in turn makes them much heavier, but oh well. Video with Lipos and DC-DC converter:

    However, the more interesting upside is that I could also replace the 16V lips that get stepped down to 5V, with 5V USB Battery packs. the reason I never did that at the time is that the entire system takes way more than the maybe 2.5A you can get from USB packs on a good day. A somewhat cumbersome workaround to this problem is to use 2 USB battery packs with 2 independent outputs each, meaning 4 independent 5V busses able to put out up to 2.5A depending on the battery pack. So, I split my power system in 4:

  • front LED panels (3 panels) (1A or more depending on pattern)
  • rPi (about 1A depnding on CPU load, but must be a nice consistent 5V or the rPi will complain)
  • Neopixel string run by the ESP32 output if desired. This one might brown out but can be put on a separate USB pack to avoid taking other things down with it
  • Rear LED panels (also about 1A).
  • In total it means the whole thing uses about 3A at 5V, or 15W, which means 180Wh for 12h. In theory 2x 99Wh battery packs would work for 10H, but in real life, the first battery pack gets a lot more load since it runs the rPi, so it only really lasts about 7H before I have to replace it. Not ideal, but still nice that I can run from USB instead of lipos if needed:



    Video of the USB version:

    After some unfortunate feedback soon after I built the new version, I added a makeshift back cover with duct tape, mostly to hide the "scary" electronics, while still giving me accesss to them since this is still a prototype that needed occasional work and tweaks:


    Since the original design with lipos, the good news is that lipo chargers have finally become much smaller. They are now small enough that I can simply leave one in my travel backpack forever:


    Now I don't need this "custom made" battery box ;) which worked for its time, but didn't allow bigger batteries being an issue during 12H festivals (2 batteries wasn't enough), and was an issue during airport inspections when they wanted to "see inside the box":


    I however found out over time that some airports really didn't like to see the panels in X-Ray with batteries attached. All airports were fine with the panels on their own, and the batteries on their own, but if I left the batteries in the outfit, which honestly is a lot more convenient to me, some airports really freaked out in totally irrational ways and now complained about "too many wires" "looks like a bomb" and all that good stuff. The 2 airports that delayed me enough that I barely made my flight (bangkok and Ontario, CA), literally said they would have been fine if I had packed the batteries together and still carried everything I was carrying, just not plugged in (of course everything was off, and plugged in is actually safer since you don't have loose power connectors that could somehow short).
    So I'm not interested in missing a plane due to this and honestly nonsensical and irrational reactions (after all, no one said fear was rational or logical), so I eventually made a "battery pack" that I can more easily slide in and out before and after each flight:



    Oh yes, it's still home made looking, could somehow get/make a box for it, but if I do they'll want to open it to see inside, going back to the original box I had earlier, so I'm not sure there is a good way to win this. Also if I make it look too much like one battery instead of 3, they'll complain it's 290Wh (over the limit) instead of 3x 98Wh (under the limit).

    And to show how things evolved, this was the v3 outfit with neopixels and only 24x32 instead of 128x192, but much brighter. I did use v3 a couple of times again at day festivals, as it can be made bright enough to work in full daylight, but after doing this a few times (and that required extra batteries), I decided not to bother anymore, and skip the LED panel during day hours (I still have LEDs on arms and legs that can be made bright enough if need be):


    Separately, I often have to explain to people, that my outfit is actually a scaled down version of the RGBPanels you see on stage. Once you have the display, it can scale up:


    And another question I get is "how long does it last?". 2 batteries of my old 5Ah 4S lipos, was a bit short for an all night 12H festival (EDC), but back then I was also powering the LEDs on my arms and legs, which took an additional non trivial amount of power. For wiring ease, the LEDs are now on a separate battery, which allows the main system to run longer. I also upgraded the batteries from 5Ah to 6.7Ah. As a result, I found out a bit after the fact that actually 2 batteries would have been enough, since I put 3 as per my old setup, I ended up with a full runtime of just under 19H (I stopped the test before the batteries were totally drained since it's not great for them to do so). As I'm writing this, I now realize that with just 2 batteries, I could last 12.5H, which is still more than enough (and it would remove some weight, so I may want to consider that.

    310Wh out of my 3 batteries, more than I thought, and almost 19H
    310Wh out of my 3 batteries, more than I thought, and almost 19H

    because all meters have measurement errors, recharging pushed back in 20.4Ah instead of 21.2Ah which doesn't quite add up, but close enough
    because all meters have measurement errors, recharging pushed back in 20.4Ah instead of 21.2Ah which doesn't quite add up, but close enough

    2023/05/17 Party LED Outfit Version 5.5: Flexible P15 LED Strings, LED Fanny Pack, Rez Inspired LED Goggles, LED Laces and LED Shoes
    π 2023-05-17 01:01 in Arduino, Clubbing, Electronics
    This is an upgrade of v5, keeping the same panels and controller, see LED Pants and Shirt v5 on ESP32 and Raspberry Pi with P2 RGBPanels and Wifi for how that part works.

    Version 5 was a bit upgrade with my P2 run rPi run RGB Panels for a resolution of 128x192 per side. The oldest part of the outfit at this point were actually the Neopixel strips I've had for about 5 years, and despite being more reliable WS2813B with backup data line, the PCB traces would break and the chips solder points would eventually break too. The amount of time I've spent fixing and replacing LED strips is more than I'm willing to talk about, but there was just no good alternative, until now.
    In the past, flexible LED strands with wires between each pixel did not have enough density, maybe one pixel every 5cm, which was not acceptable for my use. And after many years of waiting, a company finally made P15 flexible strands, one LED every 1.5cm, which looks much better and is even a bit more dense than my previous strips that were P16.6.
    Here there are: https://www.aliexpress.us/item/3256804447608449.html . Update, don't buy these, they are shit and broke within hours. See at the bottom

    While I was at it, I added a small programmable 16x32 panel to my fanny pack, because why not (the existing fanny packs didn't have sufficient storage, so I ended up decking out mine), and here is the end result:




    I have no idea how reliable the strips will be, and unfortunatley they are WS2811 without the backup data path that WS2813 had, but time will tell. I'm bringing it to EDC and we'll see what happens :)
    Update: these broke within hours, they were crap.

    Version 6.5.1: Ray Wu Strips

    Update #1: after the terrible failures of the first strip from the first vendor (the internal wires broke almost instantly), I picked this new one from Ray Wu: https://www.aliexpress.us/item/3256805296356090.html

    It ended up being more solid, but the flexing and occasional pulling on the bare strips that were attached with safety pins (I didn't want to glue or sew because it would then be unwashable), eventually caused the strips to fail, although it was more slowly. It worked for 4 festivals in Europe and required some resoldering, but it was not terrible. Still, it wasn't a long term solution either.

    Version 6.5.2: Full LED Tubing Protection

    So, I tried one more way to do it, this time I put the LED strings inside water tubing of the exact right diameter (fishing them in was a bit tricky), hot glued them on each side, especially the side they are soldered to RC servo connectors which I use for all the electrical wiring.
    The next challenge was how to fasten this, and clothes safety pins didn't do the trick, so I used rolls of velcro cut to the right size, and the glue is so good that I was able to glue the velcro strips directly to the fabric. If somehow it won't hold, I'll superglue it. End result looks like this:



    This is now going to burning man, I hope it will hold, especially with lots of biking :)

    2023/04/07 Managing a chicken coop door and checking water level with RC Plane Servo and ESP8266
    π 2023-04-07 01:01 in Arduino, Electronics
    I have these adorable silkie chickens, but have better things to do than to let them out every morning and close the coop at night after they get back in, so that was the first thing I had to fix. I had enough random hardware at home to open the door with a high torque RC servo:


    once I got the servo validated, I connected it to an ESP8266 as a wifi controller
    once I got the servo validated, I connected it to an ESP8266 as a wifi controller

    Here is the basic end result:

    The one downside of the ESP8266 is at least the one I have with the firmware I'm using, does not have super reliable Wifi connectivity, so my server keeps track of it being there or not, and can remotely power cycle it as needed. Not ideal, but it works...

    There are predators (hawks at least), so I had to add a full net around the area:



    cute chickens
    cute chickens

    This is the door in action after I added a switch to control it locally and wrote code on my home controller to talk it is via wifi:

    The last thing I wanted to add was a water level monitor, especially because I had issues with the dispenser leaking, and ending up without water, is bad obviously. My first plan was a predictable total failure;

    looks wonderful, but it's not meant to stay in the water and the board, failed
    looks wonderful, but it's not meant to stay in the water and the board, failed

    2nd try with pins
    2nd try with pins

    oh look, lots of metal ended up in the water, of course!
    oh look, lots of metal ended up in the water, of course!

    So yeah, all those classes in middle school about electrolysis are not just to bore you, it is a real thing, and sending current to sense the water through conductors causes ions to move and metal too:


    So, I tried again with new conductors and changed my code not to check for water constantly but only 20 seconds every hour. That's thankfully enough that it mostly stopped the issue I had:


    And obligatory cute chickens and chicks videos:

    2023/01/10 The fun of solar garden lights
    π 2023-01-10 01:01 in Electronics
    I've been using solar lights for a bit over 10 years now, they are easier to install since they do not require garden wiring (and the original wired lights in the garden stopped working after yard work, or sometimes gophers. When that happens, it really sucks to dig out the yard to figure out what wire went bad). So yeah, solar lights have downsides, like:
  • they ship with too small batteries I replace as soon as I buy them
  • the solar panels are sometimes too small to properly recharge them except during full summer with short nights
  • the plastic can be cheap and fall apart after several years of sun (lots of plastic actually does disintegrate in the sun after a few years)
  • and then, this, the coating/cover on top of the cheap solar panels, also gets damaged by sun after a while (less than a year for a few I got)



  • Sometimes, I'm also a bit of an overachiever, and analyzed the actual lights in power draw vs amount of light coming out since all the specs online are a lie:


    But despite the downsides, it gave me a chance to upgrade them over the year to better ones, including color changing ones which have somewhat held up so far:






    Oh yeah, I also got firefly lights, and here is the end result:

    See more images for The fun of solar garden lights
    2022/11/28 Comparing Newer LED Flashlights
    π 2022-11-28 01:01 in Electronics
    Lots of higher power flashlights on amazon now, finally some are brighter than Google's Firesword which was the brightest flashlight on earth for many up to 10 years ;)







    See more images for Comparing Newer LED Flashlights
    2020/05/04 Hacking Power Supplies and Battery Pack To Get Around ThinkPad P73 Broken Power Supply Design
    π 2020-05-04 01:01 in Computers, Electronics, Linux
    While I wrote this for my Lenovo Thinkpad P73, this is likely equivally relevant to P53, P72, and P52.

    Thinkpad P73 vs P70, not a win all around: only one 2.5" drive instead of 2, and a badly designed power system

    So, when lenovo came out with the Thinkpad P70, I wasn't very happy because if you had a 90W power supply, it refused to charge from it, at any rate whatsoever. I was not impressed, but eh, at least it would still power the laptop so that its batteries didn't go flat while plugged in.
    Well, leave it to lenovo engineers to make things worse the for the P73. The minimum power supply was raised from 135W (170W recommended) to 170W (230W recommended) which is understandable, but lenovo decided to ensure that the laptop will not take any power from any power supply that does not identify itself as 170W or more. This means that even ifit only needs 40W to sustain itself without digging into the batteries, it will completely refuse to use a 90W or even 135W power supply for anything at all, and kill the battery instead. Lenovo, you just plain suck, there is no excuse for this.

    P70 vs P73, they look pretty similar
    P70 vs P73, they look pretty similar

    *Update*: it seems if that if you get a cheaper nvidia chip with the P73, it is then configured to accept 135W power supplies as the minimum required. That said, it will still refuse to work with any regular 90W power supply or external battery back, unless you force it with the center pin resistor swap.

    While I have no plans to use windows on that machine, I thought I'd just try it out to see how it does on power. This is where I was impressed, windows can idle at less than 10W for more than 11H runtime, while I'm lucky if I can get linux at 15W. This is definitely a place where linux should do better, of course, it's not as if Lenovo put any work into making linux more efficient on their hardware either:


    *Update* : with tlp and using the nouveau driver just enough to turn off the nvidia chip, I'm now able to tune the laptop down to 10W, almost matching windows.
    See tlp issue 494 for details on how to setup tlp to run in low power mode when power is plugged in.

    Another disappointment is that the P73 is mostly the same size and weight than the P70, but it has less room for storage. It has a bunch of empty spaces that aren't used for anything, and it can't use two 2.5" SATA drives anymore, like the P70 could. Worse, the now single 2.5" slot uses a lenovo only ribbon cable that does not ship with the laptop and basically means you cannot even add a 2.5" drive without that special ribbon cable, which isn't in stock yet. Well done... Ah yes, the battery is also not hot swappable, even if it is replaceable (unlike a Mac laptop where everything is sealed shut).


    this shows the unobtanium lenovo cable for the now only single drive that fits, along the unused space
    this shows the unobtanium lenovo cable for the now only single drive that fits, along the unused space

    Ok, stop complaining, just buy a bunch of 170w or 230W power supplies and move on with your life

    Well, yes and no:
  • I literally have 10 power supplies between home and work, not really looking at replacing all 10. Lenovo wants $137 per power supply by the way, even if they are $85 from other sellers
  • those 170W/230W power supplies are huge. They also weigh as much as some small notebooks (!)
  • I have 12V to 20V car adapters, those won't work anymore
  • I have external battery packs for extended runtime, and I haven't found a single one that can deliver the amps a P73 tries to needlessly require
  • Tricking the P70 and P73 into accepting a power supply it wouldn't otherwise use

    Lenovo uses the a center pin resistor to know how much power they can draw from the power supply, see: http://www.thinkwiki.org/wiki/Power_Connector .

    For the P70, I built this power supply adapter with a resistor bridge to tell the laptop how big it should think the power supply, is:


    It's basically a configurable version of this. Yes, lenovo, I thank you for the hours I wasted opening up power supply plugs and replacing the center pin resistors:


    Here's how the P73 responds:

    - 230W works fine   4.6k => I have seen power supplies work with 170W but fail at 230W, so the laptop does draw more
    - 170W works ok     1.9k (1.8k also ok)
    - 130W rejected     1k
    - 90W  rejected     550 

    The rejected power supplies will be used to charge the laptop if it is shutdown, but they will not be used in any way otherwise. On the P70 the laptop would at least use the power supply to keep the laptop alive, and use half battery half external power supply. Not so with the P73, it just ignores it entirely.
    This is utter bullshit as I have plenty of 90W power supplies, including 12V car converters, or a 90W external 20V battery pack I can't use anymore.

    You can go read my Hacking a thinkpad slim tip adapter to output more than 90W (required to charge a Thinkpad P70) page for details, including this nice battery pack I couldn't use anymore:


    *Update* : so, actually with some serious tlp hacking (basically I told it to force battery mode even if a power supply is plugged in), I've managed to throttle the laptop enough, even when plugged in, so that it only uses 20W. At that point, I'm actually able to use my old external battery pack, as well as a 90W power supply, as long as I lie to the laptop and pretend they are 230W power supplies with the resistor trick. In my tests with windows, it was not possible to throttle the laptop enough when plugged in, not to have it overwhelm a smaller power supply (not that 90W is small for a laptop that normally uses 20-30W when it's not charging batteries).
    If you scroll to the bottom of the page, you'll also see a terrible buffer lipo hardware hack I did that allows to use the battery pack with higher amp draws, but it's a bit ridiculous (and bulky).
    See tlp issue 494 for details on how to setup tlp to run in low power mode when power is plugged in.

    Without the tlp hack or the buffer lipo hack, when I lie to the laptop and tell it is connected to a a bigger power supply, manage power draw with what I run, and disable battery charging in software, but the laptop will still draw the power supply for over 100W when you plug it in for a fraction of a second, and refuse it if the voltage drops.
    Obviously this would not be a problem if the laptop simply had a 90W power supply mode where it throttle things down and turned off battery charging. This is mostly what the P70 does.

    In the meantme, on top of hacking my power supplies, I also made this for my laptop, it looks silly and makes the thinkpad not look like a professional laptop, but well, that's lenovo's fault:


    this takes any power supply and replaces the center tip resistor with a 1.9k one to emulate a 170W power supply
    this takes any power supply and replaces the center tip resistor with a 1.9k one to emulate a 170W power supply

    From talking to Lenovo, they don't think that this is really a problem, so since I'm an engineer, I made my own external battery pack, but I otherwise recommend to road warriors to avoid thinkpads from now on, given the backward power design in this one.

    Making a Thinkpad P73 compatible external battery pack

    I did some testing and confirmed that the laptop is very picky about power supplies. It even rejects a 19.7V 20A power supply I had, because it's 19.8V and not 20V. Same thing for amps, it needs to be able to draw maybe around 5A for a short time to accept the power supply (they sure are putting a lot of effort into making sure the power supply is not under-spec'ed).

    Prototype with 150W step up converter which takes my 16V lipo to 20V while delivering enough amps to make the laptop happy:


    it works, and the laptop thinks it's connected to a 230W power supply thanks to the center pin resistor.
    it works, and the laptop thinks it's connected to a 230W power supply thanks to the center pin resistor.

    Here's a quick demo:

    Version 2 was to have a way to recharge the battery pack while it's being used. I've used this to use the battery pack as a buffer to absorb peaks from the laptop without tripping an external power supply, including in a car limited to 100W or a plane power supply limited to even less:

    this works in theory, but the lipo charger is quite slow and wouldn't keep up for long, but I made a better version shown lower down
    this works in theory, but the lipo charger is quite slow and wouldn't keep up for long, but I made a better version shown lower down

    Lenovo's P73 airplane mode simply stops using the external power supply and reverts to batteries. Sigh...

    Oh yes, let's talk about airplane mode. The lenovo engineers thought of everything: if they detect that the power supply drops a few times in a row, they offer a nice setting which is supposed to make the plane more airplane friendly. How friendly you ask? Well, you could throttle down the CPUs, disable battery charging, do smart stuff like that. Or, if you're lenovo, you can have airplane mode simply refuse to use the power supply altogether. Thank you lenovo, you wrote a feature that saves me the trouble of unplugging an otherwise perfectly good power supply that you refuse to use (to be super clear, my 230W power supply is plugged in and airplane mode just disabled it):


    Making a battery pack to act both as buffer for a smaller power supply, and as emergency external power (even power the laptop from 12v)

    Anyway, back to the battery pack, I found the ISDT H605 Air lipo charger which is small enough and can charge the lipo at 5A, which should be enough to keep up with the laptop when not doing CPU crazy stuff. This also allows using a 12V power supply or a lower wattage lenovo power supply to recharge the pack while it's in use, or not:


    version 1 was a bit bigger than I wanted, 90W power supply shown for scale
    version 1 was a bit bigger than I wanted, 90W power supply shown for scale

    here, the 90W power supply is recharging the battery at 2.5A while it's being discharged at 3A on the output side, using the battery as buffer
    here, the 90W power supply is recharging the battery at 2.5A while it's being discharged at 3A on the output side, using the battery as buffer

    I made version 3 a bit smaller, with a built in 12V lipo to act as buffer for a smaller power supply. Yes, it's a beautiful piece of art, I know :)
    I made version 3 a bit smaller, with a built in 12V lipo to act as buffer for a smaller power supply. Yes, it's a beautiful piece of art, I know :)

    Pushed to the extreme, I can now use my original external battery pack again by having it recharge my lipo+150W step up that can output more amps than the ravpower pack can. Of couse, it's inefficient, the ravpower pack outputs 20V that gets down converted to 12V by the H605 Air lipo charger, which charges the built in 3S lipo in the box, and then gets up converted back to 20V without the amp limitation (the phone used to control the lipo charger also inside the box):


    The really cool thing is that by using tlp, it's actually possible to tune the laptop down to very low power use, even when plugged in, something that windows probably can't do:

    7.3W with the screen off (and around 10W with wifi off and the screen on low dim) is not bad for a laptop that big
    7.3W with the screen off (and around 10W with wifi off and the screen on low dim) is not bad for a laptop that big

    4S Lipo vs 4x 18650 or 26650 batteries

    I do have a few lipos laying around, so that's free energy for my laptop if I'm willing to carry them. I have however found that for higher draws, the step up converter doesn't quite keep up at 20V/5A+ with just 12V input (3S), but is fine with 16V input (4S):


    That said, as I recently found out that 16650 (or better 26650) batteries are both lighter and smaller. The only thing the lipos do, is offer a better discharge rate, but while that's useful for a high power RC plane motor that can empty the batteries in 10mn, it's not needed for a laptop:


    Outside of 26650 batteries, there are other ones like https://www.18650batterystore.com/21700-p/samsung-50e.htm .

    26650s are 195 Wh/kg while the lipo I gave was 184Wh/kg. The 3rd battery listed is supposed to be 260Wh/kg which is much nicer, that said, it looks like those samsung batteries are actually smaller than 26650s, lighter, and yet offer the same 5Ah at 3.6V. If so, that's very impressive.

    As of this writing, I have however not found 26650 battery holders that hold 26650 protected cells that are a bit longer. This seems to the be only one available, and it's too short to hold the batteries: https://www.amazon.com/gp/product/B074GVPWSH


    A few months later, I ended up cutting them and taping them to make them longer. It doesn't work great, but it was enough for a few tests. In the end, I found that somehow I wasn't getting enough amps out of them, which surprised me, so they didn't work that well compared to a lipo:


    Conclusion

    Lenovo, please make the P73 work like the P70, and fix this airplane mode thing that turns off the external power supply. That's embarrassing...

    More pages: November 2024 September 2023 August 2023 June 2023 May 2023 April 2023 January 2023 November 2022 May 2020 January 2020 December 2019 April 2019 January 2019 June 2018 May 2018 June 2017 April 2017 May 2016 February 2016 November 2015 October 2015 August 2011 July 2011 May 2011 June 2010

    Contact Email