Marc's Public Blog - Arduino Hacking


vvv Click on the categories below to see other topic specific pages vvv



Table of Content for arduino:

More pages: January 2026 October 2025 March 2025 January 2025 November 2024 June 2024 August 2023 June 2023 May 2023 April 2023 March 2022 January 2022 January 2021 December 2020 March 2020 January 2020 May 2019 April 2019 March 2019 January 2019 July 2018 May 2018 April 2018 January 2018 June 2017 April 2017 January 2017 February 2016 January 2015 September 2013 January 2012 December 2011 May 2011 January 2011





π 2026-01-05 01:01 in Arduino
Github: https://github.com/marcmerlin/FastLED_ESP32-HUB75-MatrixPanel_FrameBuffer_GFX
>


This is a display driver for Framebuffer::GFX that displays on RGB Panels using https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA . It runs on top of the same code that https://github.com/marcmerlin/Framebuffer_GFX and therefore provides access to the usual trio of APIs: FastLED, Adafruit::GFX (via Adafruit::NeoMatrix compatibility using FastLED::NeoMatrix) and LEDMatrix compatibility too. To get example demo code, go to: https://github.com/marcmerlin/FastLED_NeoMatrix_SmartMatrix_LEDMatrix_GFX_Demos



Here is a video demo of a 24bpp framebuffer based set of demos that simply can't run on ESP32-HUB75-MatrixPanel-DMA without this framebuffer driver:

Installation

You need:
  • https://github.com/marcmerlin/Framebuffer_GFX (framebuffer that everything goes to)
  • https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA base hardware driver
  • https://github.com/adafruit/Adafruit-GFX-Library 2D API
  • https://github.com/FastLED/FastLED another 1D/2D API used by some demos
  • https://github.com/marcmerlin/LEDMatrix (optional, it's an added 2D API) that runs on top of Framebuffer
  • How to use?

    Please see this code to see how to use the framebuffer driver:
  • This is where you edit or add a new matrix definition: https://github.com/marcmerlin/FastLED_NeoMatrix_SmartMatrix_LEDMatrix_GFX_Demos/blob/d416eb81f084631a9fc5023a7efaac34a9faeba4/neomatrix_config.h#L565
  • Look for ESP32_HUB75_MATRIXPANEL_S3_PORTAL_64BY64 and ESP32_HUB75_MATRIXPANEL elsewhere in the file, although you should not need to modify anything but the first section with pin definition and layout, but if you have multiple kinds of panels, you're better off making new ifdefs for those new options
  • the rest of the hub75matrix init code is in matrix_setup() which you call from your own setup(), and should not need to be modified: https://github.com/marcmerlin/FastLED_NeoMatrix_SmartMatrix_LEDMatrix_GFX_Demos/blob/d416eb81f084631a9fc5023a7efaac34a9faeba4/neomatrix_config.h#L1511
  • If you want something a bit simpler, you can look at https://github.com/marcmerlin/FastLED_ESP32-HUB75-MatrixPanel_FrameBuffer_GFX/blob/main/matrix_config.h which will get basic demos working but it does not provide the full list of definitions and helper functions available in neomatrix_config. It gets the work done for basic demos, you can look at BasicTest, which shows you the beauty of those include files, as the demo file is super short
  • Why not use mrcodetastic's library gives Adafruit::GFX compatibility?

  • Framebuffer_GFX gives you full compatiblity with FastLED, Adafruit::GFX, and LEDMatrix APIs
  • As per its name, Framebuffer_GFX is a full framebuffer, so you can read back its content, scroll a frame or portion thereof (whereas, for memory and efficiency reasons, ESP32-HUB75-MatrixPanel is write only, like a TFT)
  • Framebuffer_GFX comes with over 10 hardware backends that your code can run un-modified against (including native compile and running on linux). This means your code will run unmodified on plenty of other hardware ( So this layer on top of ESP32-HUB75-MatrixPanel allows you to write your 24bpp framebuffer code, and run it against ESP32-HUB75-MatrixPanel displays, as well as the 10+ other displays supported by https://github.com/marcmerlin/Framebuffer_GFX
  • What you get is this:

    Low Level Drv|Glue Driver for FrameBuffer::GFX
    FastLED     - FastLED_NeoMatrix  -------------\     FastLED CRGB Array 
    ESP32-HUB75-MatrixPanel -,                    |
    FastLED_ESP32-HUB75-MatrixPanel_FrameBuffer_GFX
    SmartMatrix - SmartMatrix_GFX -----------------\    24bit FB storage        API Support
                                                    \   CRGB methods like
    AF:ILI9341-\                                     \  scale8/fadeToBlackBy
    AF:SSD1331  |--- FastLED_ArduinoGFX_TFT ----------|        |               ,FastLED API
    AF:ST7735  /     FastLED_SPITFT_GFX (for AF)      |        |              / (XY 2D to 1D mapping)
    ArduinoGFX/  AF:Adafruit (ArduinoGFX is all in 1) |        |             
    | |
    ArduinoOnPc-FastLED-GFX-LEDMatrix arduino - FrameBuffer::GFX------ Adafruit::NeoMatrix + emulation for linux / Raspberry Pi: | | \ Adafruit::GFX APIs ---------------------------------- / Adafruit::GFX \ rpi-rgb-led-matrix - FastLED_RPIRGBPanel_GFX ---/ LEDMatrix (optional) `LEDMatrix API ArduinoOnPC X11/linux - FastLED_TFTWrapper_GFX
    FastLED_SDL (linux) - FastLED_NeoMatrix -

    So you write against any of the 3 APIs in Framebuffer::GFX, and you get to run on all hardware backends without having to change your code, including switching from teensy to ESP32, or rPi to display on RGBPanels.

    you can run your code natively on linux
    you can run your code natively on linux

    I should stress that for RGBPanels, if you're writing code for ESP32 and ESP32-HUB75-MatrixPanel, you absolutely want to use this glue driver, because when you decide to scale up, you can switch to an rPi, get 3 parallel outputs for a display that is 3 times as large or refreshes 3 times faster, and all your code will just work with no changes required outside of the matrix init. So the same code can run on these bigger displays (those run with rpi-rgb-panel):

    or on bigger arrays with triple channel using rpi-rgb-panel, no code changes needed
    or on bigger arrays with triple channel using rpi-rgb-panel, no code changes needed

    And one more reminder of how awesome it is to be able to compile your arduino code on linux, run it on linux with full display, and debug it on linux with gdb and ASAN to find your memory leaks and dangling pointers. You get this for free by using FrameBuffer::GFX for all your code.



    Github: https://github.com/marcmerlin/FastLED_ESP32-HUB75-MatrixPanel_FrameBuffer_GFX

    π 2025-10-31 01:01 in Arduino, Electronics
    I had a great time in 2024 for my last and first Supercon, so it was fun to go back this year:

    new board this year, radio communicator
    new board this year, radio communicator



    People working hard:


    and fun stuff
    and fun stuff


    Met someone who made LED shoes, which predictably broke because they can't take the flexing:


    I came decked out:




    Random slides and talks:








    SAOs are still fun things to play:





    Evening parties:







    A fun workshop was a 64x64 matrix connected to an ESP32 S3 with adafruit shield, I actually ended up spending more time on that because blinky :):




    a new badge :)
    a new badge :)

    Good times, looking forward to next year

    See more images for Pasadena Hackaday Supercon 2025
    π 2025-10-10 01:01 in Arduino, Electronics

    eyes are drawn with math, they aren't sprites or animated gifs
    eyes are drawn with math, they aren't sprites or animated gifs

    So, I already built a 64x64 Matrix the hard way in 2018, including early uses of the ESP32 FastLED parallel output code that was still being written in 2018 when I built it. Building the matrix from scratch with 64 strips laid out one by one, was a pain, it took close to a week just to build. Code-wise, it took a little while, but I had a sweet running 110fps 16 parallel channel output setup, it was lovely.

    professional wiring work, haha
    professional wiring work, haha

    yeah, that's why I wanted to use a nice expander board this time around
    yeah, that's why I wanted to use a nice expander board this time around

    not counting that I had to add level shifters to get full 110fps speed from 3.3V output to 5V pixels
    not counting that I had to add level shifters to get full 110fps speed from 3.3V output to 5V pixels

    but eh, it did work and it survived 2 burning mans until the playa ate the pixels from the inside
    but eh, it did work and it survived 2 burning mans until the playa ate the pixels from the inside

    I was honestly quite sad about my 4096 pixel array that took so much effort having been eaten by the corrosive playa, so when I saw pieces of pre-made matrices at a more reasonable price, I I kind of impulse bought 6 bunches 10x60 pre-made strips of much better quality just before the Trump tariffs came in. It was still $500 just in LEDs tough, but that's actually a good price for that many high quality pixels. I however figured I'd try using pixxelblaze with it because progress and not writing my own code for everything (although it was already written, haha). I also hoped to use the PB expander board to help with wiring.
    I also was curious to try out the library of 2D patterns available with pixelblaze. In the end I found around 40 2D patterns that looked decent enough. Is 40 a lot? It's not bad, but when using my own Framebuffer::GFX in C++, I've easily gathered over 200 demos that are overall better due to more speed and obviously a lot faster (almost unlimited speed limited by the LEDs themselves).

    I figured I'd live with the limitations of Pixelblaze and the limited amount of demos compared to C++ framebuffers, But things didn't really work out as planned. Namely:

  • I found out the hard way how slow the interpreted code actually was when scaled to 3600 pixels (most demos ran at 2 to 10fps tops, the 2fps ones are painful to watch)
  • I thought the port expander would allow me to drive 3600 LEDs at high speed, but due to the 2Mbit/s bus limitation, it's actually only about 2x faster than asingle neopixel bus, or barely 20fps raw speed. I still thought about using it until realized that most demos didn't really go faster than 10fps anyway, so why bother (for comparison, my 4096 array did 110fps with 16 channel parallel output on the same ESP32 chip).
  • Wizard recommended I use multiple PBs to spread the compute load, sure I could use 2, or 3, or 6 to run the 6 strings of 600 pixels, but after many hours of even trying to figure out how to use master/slave output as it was not officially documented, and pulling my hair on how on earth the coordinate mapping works across devices, I did eventually got it working just to realize that the devices weren't time synced, so the demos ran at slightly different speeds and the display was now out of sync, so it wasted a day of my time trying just to give up in the end.
  • Here are pictures of the build

    all 6 sub matrices connected, turns out single power was good enough even if the matrix power wire was a bit thin and ran a bit hot
    all 6 sub matrices connected, turns out single power was good enough even if the matrix power wire was a bit thin and ran a bit hot

    my 300W 12V power supply was definitely overkill, note the small step down converter to power the 5V PB from 12V
    my 300W 12V power supply was definitely overkill, note the small step down converter to power the 5V PB from 12V

    power was good
    power was good

    I tried to split the output in two by using a spare PB pico I had laying around
    I tried to split the output in two by using a spare PB pico I had laying around

    coordinate mapping was a huge pain due to lack of docs
    coordinate mapping was a huge pain due to lack of docs

    with 2 devices, without magic in the code, a single PB would not know to display the left or right half
    with 2 devices, without magic in the code, a single PB would not know to display the left or right half


    sadly the lack of sync was a showstopper


    more 'this is not working' :-/

    In the end, I gave up and went with a single 3600 pixel output, and make peace with patterns that ran as slow as 3 to 5fps:

    I used a 110V power cord to re-inject 12V power in the middle, not fully required but nicer on wires
    I used a 110V power cord to re-inject 12V power in the middle, not fully required but nicer on wires

    sadly my setup didn't come with the right plug to connect to the output and backfeed power from the other side, so I made my own from spare connectors
    sadly my setup didn't come with the right plug to connect to the output and backfeed power from the other side, so I made my own from spare connectors

    it worked without the power backfeed, but it was better with it
    it worked without the power backfeed, but it was better with it

    now came the job of connecting 60*5=300 knots between the sub-sections with twisty ties
    now came the job of connecting 60*5=300 knots between the sub-sections with twisty ties

    didn't take too long, time for install
    didn't take too long, time for install

    wee!
    wee!

    for a display that doesn't have a framebuffer and things are drawn with math, not bad
    for a display that doesn't have a framebuffer and things are drawn with math, not bad




    and it looks cool from inside the house too :)
    and it looks cool from inside the house too :)

    Do you want the same demos without spending all the time it took me to download them one by one? Marc's Favorite Pixelblaze 2D demos pbb config you can directly install

    The magic file above will install everything you need all at once, you'll just have to re-set Wifi, change the name and resolution.

    If anyone is interested, here are the demos I settled on, the ones prefixed with '_' were downloaded from https://electromage.com/patterns :

  • _2D Bouncing Additive Primaries
  • _2D Clock
  • _Animated Asterisks 2D
  • _Blinky Eyes 2D
  • _Blue Holiday Candle 2D
  • _Blue Holiday Star 2D
  • _Coronal Mass Ejection 2D sliders
  • _distance function kaleidoscope 2
  • _Doom Fire (v2.0) 2D
  • _Eye of Sauron with movement
  • _fractal flower 2D
  • _Geometry Morphing Demo 2D
  • _Halloween Wavy Bands 2D
  • _Heart 2D
  • _honeycomb 3D
  • _Ice Floes 2D
  • _Infinity Flower 2D
  • _Line Dancer 2D
  • _Matrix Green Waterfall 2D
  • _perlin fire wind tunnel
  • _Perlin Kaleidoscope 2D
  • _Plasma 3D
  • _Scary Pumpkin
  • _Shimmer Crossfade 2D
  • _Sierpinski Rainbow 2D
  • _Spinwheel 2D
  • _Scrolling text marquee 2D
  • _Traffic 2D
  • _Tunnel of Squares 2D
  • _Wavy Bands 2D
  • blink fade
  • color bands
  • color twinkles
  • fireflies
  • firework dust
  • slow color shift
  • sparks
  • sparks center
  • spiral twirls 2D
  • xorcery 2D/3D
  • π 2025-03-07 01:01 in Arduino, Clubbing, Electronics, Festivals
    History of the LED outfit:
  • Version 3: LED Pants and Shirt Programmed With Arduino on ESP8266
  • Version 4: EDM Festival and Burning Man LED Pants and Shirt v4 on ESP32 with RGBPanels and SmartMatrix::GFX
  • Version 5: LED Pants and Shirt v5 on ESP32 and Raspberry Pi with P2 RGBPanels and Wifi
  • Version 5.5: Party LED Outfit Flexible P15 LED Strings, LED Fanny Pack, Rez Inspired LED Goggles, LED Laces and LED Shoes
  • Version 6: Party LED Outfit Self Contained Power System on LED Panels
  • Version 7: Party LED Outfit USB Powerbanks Powered Flexible LED Panels, LED Hat, and LED Shoelaces
  • And for shits and giggles, I wrote this full article on the why and evolution of my LED outfit
  • Prototype of new version:


    The previous v6 was an attempt at simplyfying v5 by integrating the batteries directly to the back of the panels. In the case of Lipo batteries that I cannot let run flat or they'll be damaged forever, and need for extra wiring for the balance connector, it was simpler to attach everything to the back of the panels, but it made the panels quite heavy and more bulky looking.
    That outfit served me well, but outside of bulk and weight, one issue was getting the lipo batteries through airports. They are totally legal and allowed, but they had to be removed from the outfit every time I flew, which was a pain in unwiring/re-wiring, but even then, I would get stopped more than half the time I went through Xray while they got a supervisor to confirm that yes indeed the batteries were fine. A few times, I got less educated people who reacted in lesser ways, and called more people, a few times causing delays of 30mn or more. To be more specific:

  • I met the bomb specialist of the day at SFO airport, twice. Very nice guy both times, for 30mn+ delay
  • In Thailand my first trip was fine, but my last flight of the 2nd trip, I got 12 people including the army asking me why would I fly with this?
  • more than once, I was told my lipo batteries had a simliar shape to C4 explosives, which I guess is true, but not my fault. I have learned however that once people say "it looks like [something scary]", even if they agree it's not, I have still lost
  • Another time in France, I had to argue with the police who were mostly being dicks that day and told me I had too many batteries because I could only carry as many as I would need in flight (which was entirely untrue and made up, but they had the guns)
  • The batteries are in green below, they showed up pretty reliably on Xrays and the whole thing would get flagged and then they would have to look at them and the wires, and often were not super happy:


    So, I ended up making a removable battery pack that was wired correctly, and putting it the right way was tricky, so set it up to be correct and in one piece that could be removed and re-added with less work for each flight:


    But it didn't take long to find out that even carrying the batteries separately that way still made TSA unhappy at times, and unless I unplugged absolutely everything and rebuild the whole thing every time, they would not be very happy and that was a pain for me to take apart and rebuild every single time. They still occasionally said it looked like C-4.

    I wasn't being a contratrian for fun, and see how many world TSAs I could win an argument with, I just didn't really have many other options, I did need those big batteries because my outfit does need lots of power, and 5V USB battery packs simply do not output enough amps.

    tried with USB packs
    tried with USB packs

    it was not fun, I had to segment power use in different busses plugged into different ports of battery packs, very cumbersome and the first tone to die could shut down everything
    it was not fun, I had to segment power use in different busses plugged into different ports of battery packs, very cumbersome and the first tone to die could shut down everything

    But after multiple years (and to be fair, it was many flights and most were fine, but the 5-10% that were not, were _not_ fun), technology finally evolved into whas that gave me better options: using less scary looking USB powerbanks that were finally able to output enough watts to power my panels without dipping power enough to cause reboots and crashes from the CPUs.

    so I built a new system with dual 20V input (each one is sufficient on its own)
    so I built a new system with dual 20V input (each one is sufficient on its own)

    I have 2 USB-PD selector boards that output into a diode to avoid backfeed, and this goes into a DC-DC converter that takes the 20V down to 5V at up to 20A although probably only 5A max is really needed
    I have 2 USB-PD selector boards that output into a diode to avoid backfeed, and this goes into a DC-DC converter that takes the 20V down to 5V at up to 20A although probably only 5A max is really needed

    It of course runs fine from a single battery:


    At the same time, I made a big upgrade on the panel side by using flexible PCB panels that are differnetly thinner. At the same time I switched to RPI0 2W which is slightly more powerful than an RPI3a while being much smaller:


    Now the whole thing looks nicer and lighter:


    I did switch the big ESP32 to a smaller smaller ESP32 C3 (2 shown in this picture), which can still output to an LED strip if I really want/need. I also tried to switch to a smaller electrodragon passive-3 board that was custom designed to fit the RPI0 2W. It doesn't have the room for the level shifters, but turns out for an ABCDE panel, the passive board worked just as well (top on the picture vs the bigger red one in the middle):


    The old setup had 300Wh of battery capacity, and that was real capacity, no BS. I measured it to give me a bit over 18H of runtime, which was very nice indeed, and helpful for places like tomorrowland where I had to camp and go 3 nights without ability to recharge.

    This new setup differs a good amount because:

  • the panels are similar resolution and size, but they are a new design with flex PCB panels that are much thinner
  • they are still not as thin as LEDs inside the clothing, but in order to make it lighter and thinner, the batteries were moved back out
  • at the time of my original design, USB batteries were just not really on par with what I needed. My setup does use 5V, but it needs a lot more amps than any battery pack can take, and last I tried, it required an awkward setup where I used 3 different USB ports. But 3 years later, there are finally USB battery packs that can output 100W on a single port as 20V/5A via USB-PD, and that is more than plenty to run the panels as well as than run a Raspberry Pi without the voltage dipping and causing a reboot.
  • the new battery packs, while sold as almost 100Wh, all deliver around 75Wh of real power, which unfortunately is only good enough for 5.5h of runtime per battery. The loss of capacity is due both marketing lies, and the capacity that is given is the ideal capacity of the lithium batteries inside the USB pack, but that power has to be up-converted to 20V and losses happen in that process. Later I confirmed that up-converting to 15V was sufficient, so that helped a little bit. On the plus side, 11H is enough for most uses, and worst case I can hot swap an empty battery without even shutting down/rebooting the system
  • I also changed the rPI3a for a smaller rPi0 2w and a smaller ESP32 replaced with ESP32 S3. The rPi+ESP used 28% of the power, while the 6 panels used 72% of the power. The smaller Rip0 2w + ESP32 S3 probably takes probably just a bit less power, but it's a small enough percentage that I didn't go measure it.

  • End result

    Same on youtube:

    But of course, nothing can be simple, this new design brought some new issues:

    After using it the first time at ASOT NL 2025 the wooden frame got detached in no time, failure of the 2.5mm screws

    very early version without clips on both sides
    very early version without clips on both sides

    just a bit of tape to hold things together, clips on sides and top
    just a bit of tape to hold things together, clips on sides and top

    it was built until the flight and I didn't have time to add a protective frame
    it was built until the flight and I didn't have time to add a protective frame

    the panels were so cheaply made that the screws receptacles came unglued
    the panels were so cheaply made that the screws receptacles came unglued

    Another issue I didn't like with these ABCDE panels is that the screws were 2.5mm instead of 3mm for unknown reasons and it was hard to attach to something that small.

    Switching to a different 128x64 P2 Flex Panel vendor, but ending up with ABC panels that barely worked with rpi-rgb-panel

    The ABC panels had 3mm screws, which was better, but I found out even those things also popped out. I had to carefully re-glue them in without leaking glue on the panel pixels:


    Sadly those ABC panels had different chips that required huge gpio slowdowns or suffered from noise and display issues:



    new chips
    new chips

    It took a few weeks, and very kind help from board707 and multiple issues to make a new line addressing shift register pusher that was faster and didn't have the noise/corruption issue:

  • https://github.com/hzeller/rpi-rgb-led-matrix/issues/1725#issuecomment-2757492829
  • https://github.com/hzeller/rpi-rgb-led-matrix/issues/1773
  • https://github.com/hzeller/rpi-rgb-led-matrix/issues/1774
  • https://github.com/hzeller/rpi-rgb-led-matrix/issues/1788 where I found subtle timing issues. between chips, kernel and compilation options causing -led-slowdown-gpio to have to be changed between 1 and 2 to get a stable output
  • while doing all this, I did confirm that the smaller electrodragon passive-3 board does pick up more noise and isn't able to drive as fast as the bigger active-3 board
  • once I figured all that out, finally got the ABC panels to work almost as fast as ABCDE and now have a nice screet/pixel protector
    once I figured all that out, finally got the ABC panels to work almost as fast as ABCDE and now have a nice screet/pixel protector

    USB powerbank failures

    It didn't take long before I found out that many powerbanks do very badly at outputting 20V long term, and some of their ports half die and only do 5V after a while, which is not enough for me:


    It took some tracking down to catch real time failures:

    Flexible PCB solder point failures

    This is now the biggest and unsolved issue with my new setup. Anything that moves and flexes, fails, and sure enough the same law applies here:

    flexing the PCB can cause any of those points to fail, causing the above
    flexing the PCB can cause any of those points to fail, causing the above

    and they fail in different ways :(
    and they fail in different ways :(



    Oh no, it looks terrible when it fails in the wrong place
    Oh no, it looks terrible when it fails in the wrong place

    Easier Replacing of Panels

    I wish I could say I have a great solution to those panels that fail due to flexing and solder point failures: 5165*|2 different failures 5165*|by hand flexing the panel, it brings the connection back, but it's not a solution 5164*|my new design makes swappping panels faster, and not requiring a soldering iron

    This is not a great long term solution, but I have no better idea for now outside of going back to bigger and bulkier non flexible panels.

    New Pants

    I redesigned the pant straps to use smaller black loops first glued and then sown into the pants:


    looks more tidy
    looks more tidy

    end result
    end result

    New LED Hats

    this was my old Dreamstate Hat, it looks cool but it's heavy
    this was my old Dreamstate Hat, it looks cool but it's heavy

    so I made new ones that are much lighter
    so I made new ones that are much lighter

    funny thing is the very first time I flew with the new hats, I was detained because of them :)
    funny thing is the very first time I flew with the new hats, I was detained because of them :)

    Upgraded LED Shoes with bright Shoelaces

    I got new brighter shoelaces but the batteries didnt even last a day
    I got new brighter shoelaces but the batteries didnt even last a day

    So I made a connector to plug into the shoe's bigger batteries I upgraded
    So I made a connector to plug into the shoe's bigger batteries I upgraded

    End result:

    Extending battery life

    Originally I setup my battery packs to output 20V, which means the power is upconverted to 20V and then downconverted to 5V but with 10A (way more than needed), Trial and error showed that my battery packs do seem to output more energy when I lowered the voltage to 15V, and after modifying my code a little bit, I was able to make it run off 12V (the battery pack only outputs 3A at 12V, or 36W. Normally my code should not use 36W, I've measured it to use around 8W average, but in peak use situations it can draw more, and if the 5V voltage dips a bit too much as a result, the rPi will crash and reboot).

    I have a "few" battery packs, different sizes and weights, but the weight adds up:


    The good news is that I'm now able to use smaller packs that can still output 60Wh, but only up to 12V. The bigger packs can do 100W at 20V and output up to 75Wh on a good day, although most of mine often seem to do less (they are of course rated for 99Wh)


    in the process, I found out the Wh totalizer in these meters, is garbage and can't be trusted
    in the process, I found out the Wh totalizer in these meters, is garbage and can't be trusted

    nicer/bigger 100W capable pack (more than I need) with better totalizer
    nicer/bigger 100W capable pack (more than I need) with better totalizer

    new test at 15V instead of 20V (the red boards can be changed to ask any voltage) with diodes to prevent backfeed
    new test at 15V instead of 20V (the red boards can be changed to ask any voltage) with diodes to prevent backfeed

    measuring the loss between 15V input and 5V output
    measuring the loss between 15V input and 5V output

    trying again with 12V, we can also note the voltage drop at 1.4A
    trying again with 12V, we can also note the voltage drop at 1.4A

    some surprising results, some 75Wh packs emptied quicker than expected, only got 65Wh from thsi one
    some surprising results, some 75Wh packs emptied quicker than expected, only got 65Wh from thsi one

    a fun part of this exercise is figuring out if the Wh totalizers are even good
    a fun part of this exercise is figuring out if the Wh totalizers are even good

    Here are the results I got so far:

  • small 60Wh pack, pack #1: 49Wh, pack #2: 56Wh, 12V meter: 108Wh, 5V meter: 98Wh, 12h28 total, 7.8W avg (5v), 8.6W avg (12V)
  • big 75W pack (12V), pack #1: 63Wh, pack #2: 53Wh, 12V meter: 110Wh, 5V meter: 99Wh, 12h23 total, 7.8W avg (5v), 8.9W avg (12V)
  • big 75W pack (12V), pack #1: 63Wh, pack #2: 73Wh, 12V meter: 125Wh, 5V meter:114Wh, 14h30 total, 7.8W avg (5v), 8.5W avg (12V)
  • big 75W pack (20V), pack #1: 70Wh, pack #2: 68Wh, 20V meter: 120Wh, 5V meter:108Wh, 13h30 total, 8.0W avg (5v), 8.8W avg (20V)
  • So, what comes out of this is:

  • I'm getting a bit longer runtime by only using 12V intead of 20V and this allows using smaller battery packs that only do 12V
  • I'm pretty disappointed in those 100W/99Wh packs that seem to output as little as 55Wh at 12V
  • on the plus side I can now get 14.5h with the bigger battery packs, but I should be getting a lot more if they did output 75Wh
  • There is a 10% loss from down converting from 12V to 5V with my DC-DC converter, probably acceptable
  • The smaller packs seem to work almost as well for a much smaller size, their main downside is they don't charge nearly as fast (the 100W packs can charge in 1.5h at max speed given the proper power supply).

    π 2025-01-17 01:01 in Arduino, Electronics, Linuxha

    got a few extra colorful yard lights ;)
    got a few extra colorful yard lights ;)

    To debug some early issues I had with the pixelblaze, I soldered a few extra wires to add serial monitoring:


    the serial port is temporarily going to a rPi3a which in turn makes it available over an ssh connection
    the serial port is temporarily going to a rPi3a which in turn makes it available over an ssh connection

    up left if the pixelblaze pro expansion board that gives 8 channels, handles power distribution and converts the 12V to 5V for the pixelblaze itself
    up left if the pixelblaze pro expansion board that gives 8 channels, handles power distribution and converts the 12V to 5V for the pixelblaze itself

    For the pixels, I picked rolls of 1000 pixels at 5cm and 10cm pitch from Ray Wu, trusted seller of blinky stuff, and one bonus of not doing this installation a few years earlier is that new pixels have been designed: WS2818.

  • WS2813 were a improvement for having a backup data line but still running on 5V which would have clear voltage drop issues.
  • WS2815 are the 12V version, which is good for dealing with voltage drop
  • WS2818 is yet another improvement over WS2815, still 12V with a backup data line, but more reliable and efficient
  • The last bit "more efficient" actually worked to my advantage as I was able to make a string with 600 pixels and not have to re-inject power anywhere. I measured line voltage at the end and it was only 5V but the pixels still worked great at the reduced voltage.

    The advice I got on the leds are awesome group was to try hot glue, and it was a good idea. Thankfully I had a battery powered hot glue gun, which was a must have. The other important bit was a solder reflow hot air gun, which did have to be plugged in the few times I had to unglue strips to move them after I found a better routing or visual pattern:


    And in all, I actually need 3 tools, the 3rd one was a battery operated air can replacement which allowed me to blow cold air on the hot glue points and have them dry in 10 to 15 seconds instead of 1mn. That was a lifesaver:


    After laying strips, house looked like this:



    After the first 2 days of work, I had 4 strips, around 1500 LEDs:

    or on youtube:

    But it really got better once I added 2 more strips and upp'ed the count to 2000, which was a lot more visually pleasing:

    or on youtube:

    This is my current demo list:

  • Blink fade
  • Color twinkles
  • Fireflies
  • Honeycomb
  • Matching rainbows
  • Rainbow melt
  • Show color shift
  • Sound blink fade
  • Pew pew
  • Sound rays
  • Spark center
  • Static random colors
  • These look interested but are too fast:

  • Millipede
  • Pulse 2e
  • Spin cycle
  • π 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 :)


    More pages: January 2026 October 2025 March 2025 January 2025 November 2024 June 2024 August 2023 June 2023 May 2023 April 2023 March 2022 January 2022 January 2021 December 2020 March 2020 January 2020 May 2019 April 2019 March 2019 January 2019 July 2018 May 2018 April 2018 January 2018 June 2017 April 2017 January 2017 February 2016 January 2015 September 2013 January 2012 December 2011 May 2011 January 2011

    Contact Email