MartinNohr / LightWand

LightWand code, improved version from mrossphoto.com
4 stars 0 forks source link

mega2560 pro + 4pin OLED #22

Open DaveStu opened 3 years ago

DaveStu commented 3 years ago

Hi, Martin. I'm new to to Github and didnt know another way to discuss or ask questions. During this covid lockdown madness decided to build a similar lightwand, after finding a post on a photography website for a cheap build. I followed this guide: https://www.essl.de/2020/03/14/lighty-a-pixelstick-on-the-cheap/. Incidentally, he also found inspiration from Michael Ross's original design, albeit Dirk swapped out some parts. My question is, with your added/tweaked features could I transition you code to my hardware. Please keep in mind, I have no clue in programming, though I have been trying to understand it with Arduino. Thank you

dirkessl commented 3 years ago

I have already started to port Martin's code to my hardware, so Martins code will be supported in the future. I have also moved the code to VSCode and platformio so it should be easier to get it compiled in the future. I will get you posted once I have a release that's worth publishing.

DaveStu commented 3 years ago

Hi Dirk. That's excellent, I rather have you experienced people do the final programming, though I will tinker about as would like to learn as I've got some other ideas I've written down for years. These arduino based boards are interesting and possible ways I could evaluate/test my ideas. Looking forward to your next code. It seems Martin has progessed to another board and started again. All good fun.

MartinNohr commented 3 years ago

I have moved on, the Mega ran out of memory and speed for what I was trying to add. I went to the little esp32 with the OLED attached. I have made a very nice little PCB and enclosure for it. I've redone most of the code and it has many more features now! It even has a nice little menu system. https://github.com/MartinNohr/LedImagePainter I also posted the plans on Thingiverse. https://www.thingiverse.com/thing:4660045 and the original https://www.thingiverse.com/thing:4613446 There is a pdf explaining the menu system and options with the original version. The new version has more features, I'll update the pdf description soon. I also made a YouTube video showing both the old and newer versions. By old I mean the first esp32 version. https://www.youtube.com/watch?v=2L3TWKf_4T8&t=6s and the new version https://www.youtube.com/watch?v=_nibSs949mA The new code is here https://github.com/MartinNohr/LedImagePainter

MartinNohr commented 3 years ago

I am also working on a version using the TTGO T-Display. It will be in full color. I had made a version using a 3.2" color touch screen but I didn't make the code public. I found that the touch screen wasn't all that easy to use, that's why I switched to the single button in the handle. The only advantage I found with the large screen was that I could show a preview of the file. Interesting I suppose but perhaps not all that useful. So far I really like the rotary push button. It works with one hand and is fast and easy to use.

MartinNohr commented 3 years ago

You can't build my new one for $22, but I think it is much better. The PCB (printed circuit board) is much easier to build and very compact. It has the card reader, logic level translator, and rotary dial attached so the only wiring is the battery and the LEDs. I can sell the board without the ESP for $10, fully assembled with wiring harness for $50. I am also planning to make it available directly from the PCB shop in China. I haven't done that yet because I made some changes to it and I want to make sure it is still working. The samples should be here in a couple of weeks.

MartinNohr commented 3 years ago

"> Hi, Martin. I'm new to to Github and didnt know another way to discuss or ask questions." It is perfectly acceptable to post questions and comments here. I'd really like ideas for improvements as well. Note however that I'm not actively supporting this old version anymore. I have moved to the esp32 with OLED display. It is smaller, faster, and allows me to add lots of new features. It can display images much quicker. The menu system is cool and makes easy to navigate all the options.

MartinNohr commented 3 years ago

BTW, I posted the schematic on thingiverse so you can build one by hand wiring if you wish and don't want to spend very much. For me, my time is worth more than hours of soldering and fiddling!

MartinNohr commented 3 years ago

I created a phone app to control the new esp32 version. The esp32 has bluetooth builtin so I thought it would be fun to use it for something. It works right now, but it isn't really feature complete enough to post. I'll do that when I think it is good enough. You can select the bmp file, set the repeats and the frame time, and start the display. It works on both iPhone and Android. Is it useful? Not sure, but it is kind of fun to play with. You can control it while somebody else is holding it or it is just sitting there. You could put it on something moving like a merry-go-round and then start it with the phone.

MartinNohr commented 3 years ago

I should look at VSCode. I only used Visual Studio because I was already using it for other projects and for my business work. I'm now retired so the business part doesn't matter at all.

dirkessl commented 3 years ago

I should look at VSCode. I only used Visual Studio because I was already using it for other projects and for my business work. I'm now retired so the business part doesn't matter at all.

Yes, indeed :-)

The goal of my project really is to make this technology accessible to everyone, without needing special parts. That's why my parts cost 22 dollars from china and 50 from amazon (at least here in Germany) I do like some of your additions, but as I use my pixelstick very often, there is nothing that I really miss from my version. Personal preference, I guess and maybe I am emotionally attached to my cheap pixelstick :-) So I guess I will stay on the mega with it's limitations and will port back some of your code into lighty.

An ESP32 Board which looks promising for a project of this kind is the M5Stack, as it has everything needed already on board (SD reader, full color graphical display, buttons, bluetooth, Wifi, etc. A rotary encoder can easily be added, I think they also sell a ready made modul for it. The newer version has also a touchscreen and 3 capacitive button. If you will have a look at it and and to port the code to it, we could make a collaboration and I would be willing to donate a M5Stack to you. Price is slightly higher, but no soldering is needed which is also a big plus for users that want to make a cheaper pixelstick.

MartinNohr commented 3 years ago

I just noticed the M5Stack yesterday. It does look interesting. No need to donate one, I'm more short of time than money. I'll order a couple of them soon and experiment with them. I had already made a touchscreen version and to be honest I found the rotary button much easier to use in the field, it's hard to beat one-handed operation. As far as building, I also agree, the less soldering the better! I've done lots of soldering over the years and made many PCB's, but I don't like to do it much anymore, especially since my eyes are getting older. I also order many parts from China, but I have had some disappointments. They once sent me some Heltec ESP32 Devkit clones that had the display mounted without a header so I couldn't use them in the same case. The picture they showed was the correct Heltec device, but they actually sent some cheap clones. They didn't want to let me return them either. I have also had some very poor quality WS2812B strips. So, buyer beware! I'll admit to adding perhaps too many features to the new software, but in my defense, I'm a retired software designer and I have always tended to add lots of features to make sure my software was top notch. I try to anticipate anything that anybody might try to do! I was born in Denmark, moved to Canada when I was 18 with my parents. Years later moved to California (Silicon Valley) and started a software company there. Sold it, retired now in southern Utah. I spoke pretty good German when I still lived over there, but I'm afraid I haven't maintained it. I can still read, but not speak well.

MartinNohr commented 3 years ago

M5Stack with color display. It seems to have 5 io pins available. I need two for the two led strips. I haven't found a rotary encoder, so we would need 3 more pins for that and of course it would have to be mounted and wired somewhere. Another problem, the ESP32 is a 3.3V device, the LEDs need 5V logic signals. I have tried using the 3.3V and it works for some 2812's and fails on others. I have also trued running the 2812's on 3.3V. The logic controls work, but the color change in strange ways with some LED's that I have here. I solved this problem on the PCB by using a 3.3 to 5 V logic level converter. To do this with the M5Stack would require some more wiring and parts outside. There is a trick that uses one of the LED's running on 3.3 and the rest running on 5V. This requires a modification to the LED strip on the first LED. It does work though. It's too bad we don't get 5V from the controller and the LED used 3.3. It is always easier to translate down than up! A couple of resistors can do that. I wonder if the LED would work with 4.4 V. We could drop from 5 to 4.4 with a diode. They require 0.7 times the supply voltage for logic 1 according to the spec sheet. That might work reliably without any strange color shifting. Then we wouldn't need a logic level up translator. I'll see if I can find some time in the next couple of days to try that. We can't run the LED's at full brightness anyway with the USB battery supply, but that doesn't matter, they are bright enough for night photography even at a fraction of full power. Full white at 5V is 60mA per LED. From an engineering perspective I still like the PCB, but I understand your point of view and goals also. It's bedtime here, I'll sleep on it, and see if I have any ideas tomorrow. The 4.4V with a drop diode might work, it is cheap and easy. The 2812 spec sheet says 4.5 to 5.5 V, but 4.4 might work ok and it should work with the 3.3V logic from the ESP32. Instead of the rotary switch we could perhaps use the 3 buttons. 1 for select/activate, and the others for up/down or forward/reverse. Clumsy but workable.

dirkessl commented 3 years ago

Strangely all my LED Strips work with the M5Stack and also with several Wemos D1 Minis which is also 3.3V. But the sacrificial LED with a diode is indeed a very easy option that can be done in case it doesn't work as expected. IN addition, SK6812 LEDs can be used which should just work with 3.3V out of the box. You are right, there is no rotary encoder unit for the M5, but a Joystick Module which could also be used. Units are Plug and play so very easy to connect and as the are already encased, it is also easy to print a case around it to fit everything. I will look out for an easy to connect rotary encoder, as I like the idea. It could be modular, so if anyone doesnt want the rotary encoder, the inbuilt buttons can be used. I prefer buttons over a touch screen, as they can be used with gloves. In addition a bigger, easier to use Start/Stop/Pause Button could be connected to a more convenient position.

MartinNohr commented 3 years ago

This one looks interesting: https://www.banggood.com/M5Stack-Core2-ESP32-with-Touch-Screen-Development-Board-Kit-WiFi-bluetooth-Graphical-Programming-WiFi-BLE-IoT-M5Stack-for-Arduino-products-that-work-with-official-Arduino-boards-p-1736409.html?rmmds=search&cur_warehouse=CN But... it costs more than my custom PCB with all the parts already installed. I found most of the LED strips I tested also worked, but the spec sheet says a logic 1 is 0.7 times the supply voltage, so it being out of spec, it might fail sometimes. 0.7x5 is 3.5, close to 3.3 but not quite there. That's why I put a level translator on my PCB. I'm an electronics engineer by training, so I like to believe the spec sheets. :-) There sure are a lot of M5Stack variations, I had no idea they made so many things. I'm having all kinds of ideas that they could be used for. Engineering: The art of making things work by compromise...

MartinNohr commented 3 years ago

The ttgo with color display: https://www.banggood.com/TTGO-T-Display-ESP32-CP2104-WiFi-bluetooth-Module-1_14-Inch-LCD-Development-Board-LILYGO-for-Arduino-products-that-work-with-official-Arduino-boards-p-1522925.html?rmmds=search&cur_warehouse=CN $8 + $10(my custom PCB assembled) is total $18. Still competitive! And it is has 5V outputs and is easy to assemble.

DaveStu commented 3 years ago

Thanks Martin for the information, I watched your product videos, quite extensive with a feature rich system. Your second one has come out exceptionally well. From your career and experienced background, you have the knowledge for these projects. I knew I should of done software develepment, alas I went into product design and engineering, though over time much of the engineering design&engineering has been sold out of the UK. We're extensively a services country. In recent times, I've been pursuing wedding photography and 2020 was suppose to be my year, but for some reason my plans got changed ha.

As I've got the parts and being my first one, I'll want to continue with what Dirk continues to tweak, plus budget constraints. Life of an artist is somewhat frugal ha. I do however like some of the sample patterns you've added in, and the idea of using the wand as a static light bar is fantastic. I've done some studio work and that would work well, akin to using gels. I've seen some of the photography segment coloured led light bars, and they're super pricey.

That rotary button seems like a good addition, the control seems very fluid and intuitive. Plus the tactile feel of it, reminds of a high end amplifier volume knob. It's interesting where your taking your ideas, much further than pixel stick. Hopefully, I'll create another one, trying on of your "final" builds. I do like tinkering about, and am always sketching or inventing some ideas and these miniboards have inspired me to pursue some ideas, perhaps get to a point of commercial manufacture, if design is feasible.

I would be interested to see how you created the mechanism, that allows another bar to be attached. My own goal is to stay with the 144 strip, split in half, then be able to snap together when needed. This will aid in transport/portability. I was thinking of pogo pins, to allow the electrical connection or something similar. I'm waiting on some aluminium led profile, plus my LED strip, from spain.

DaveStu commented 3 years ago

I'm also trying to quickly educate myself, to get an understanding of the technical speak you both are discussing around electronics. I only know the basics from university days, tickering with bread boards and motorola cpus ( If I remeber correctly). I will also look into VSCode and platformio Dirk mentioned. All good fun

Martin, that TTGO T-Display ESP32 you linked, is that what you base your current design on? It's crazy cheap, as I paid £10 ($13) for the mega2560 from a UK seller on ebay. That TTGO T-Display ESP32 CP2104 is availabe at £7.58 (about $10)from UK distribution!

MartinNohr commented 3 years ago

The PCB for my design is about $10+shipping from China, PCBWAY.com. All the parts except the esp32 are installed by them. I’m switching to the TTGO ESP32 instead of the Heltec one, the TTGO is $8 from China. So the cost is pretty reasonable in my opinion at least, <$20 (plus some shipping of course). PCBWAY also sells the TTGO, so I have asked them if they could install it on the PCB. They haven’t responded yet, but if they do that, there will be minimal work to build my system. The TTGO has a color display, so it will be very cool. It has enough pixels to do a preview of the image also. 140 pixels, so I’ll have to chop a few off the top and bottom, probably not noticeable anyway. It is my intention to have way more features than the real PixelStick. 😊 I visited England a few times when I still lived in Denmark, it was pretty easy to get there. My favorite fish and chips was a dingy little place somewhere in Liverpool. I did find the “English” hard to understand in Liverpool though. I thought my command of English was excellent until I got there! I understand about budgets, I grew up dirt poor, we didn’t have much. My dad was a wonderful gardener though and we lived from his garden for a good part of the year. We mostly had meat when somebody gave it to us, other than that we were largely vegetarians, of course of necessity more than philosophy. I was a news photographer (like my dad) before I studied engineering. I tried weddings for a while, good money but too stressful for me. News photography was easier, if you messed up, 24 hours later nobody cared. Where are you in England?

Sent from Mail for Windows 10

From: DaveStu Sent: Thursday, December 3, 2020 10:46 AM To: MartinNohr/LightWand Cc: MartinNohr; Comment Subject: Re: [MartinNohr/LightWand] mega2560 pro + 4pin OLED (#22)

Thanks Martin for the information, I watched your product videos, quite extensive with a feature rich system. Your second one has come out exceptionally well. From your career and experienced background, you have the knowledge for these projects. I knew I should of done software develepment, alas I went into product design and engineering, though over time much of the engineering design&engineering has been sold out of the UK. We're extensively a services country. In recent times, I've been pursuing wedding photography and 2020 was suppose to be my year, but for some reason my plans got changed ha. As I've got the parts and being my first one, I'll want to continue with what Dirk continues to tweak, plus budget constraints. Life of an artist is somewhat frugal ha. I do however like some of the sample patterns you've added in, and the idea of using the wand as a static light bar is fantastic. I've done some studio work and that would work well, akin to using gels. I've seen some of the photography segment coloured led light bars, and they're super pricey. That rotary button seems like a good addition, the control seems very fluid and intuitive. Plus the tactile feel of it, reminds of a high end amplifier volume knob. It's interesting where your taking your ideas, much further than pixel stick. Hopefully, I'll create another one, trying on of your "final" builds. I do like tinkering about, and am always sketching or inventing some ideas and these miniboards have inspired me to pursue some ideas, perhaps get to a point of commercial manufacture, if design is feasible. I would be interested to see how you created the mechanism, that allows another bar to be attached. My own goal is to stay with the 144 strip, split in half, then be able to snap together when needed. This will aid in transport/portability. I was thinking of pogo pins, to allow the electrical connection or something similar. I'm waiting on some aluminium led profile, plus my LED strip, from spain. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

DaveStu commented 3 years ago

A custom PCB for $10+shipping, thats very reasonable and that's a single units? I assume that includes the rotary dial too. All parts except the TTGO board? If so, I maybe interested earleir than expected ha. IF I were to, I'd solder the TTGO myself, I like soldering. A colour display, thats spoling us now. I don't mind the more features philosophy, I've already hinted the knight rider car light sequence 😁 I'm most likely to have other ideas too. So, all I would need is them to supply the PCB and TTGO (or source locally) and Im prtty much all in, albeit without the case. I would then tinker about with two devices. oops.

Oh so you had visited ye olde England and partook in fish & chips, I liverpool of all places. The Football team which I wholeheartedly support, small world. Yes, english in Liverpool is a complex drive, even a seasoned pro like me, can easily lose my bearings ha. There are plenty of more towns and cities where the experience is the same or more mind boggling. I've been to europe several times, though never Denmark. I'm live near to the city of Birmingham.

Yes weddings can be very stressful, but rewarding too. I like engaing with people in such an art, to be part of their day/journey and try to capture something for them to remember forever. I've never truly thought about press photography, I think nowadays though, like so many markets, its saturated.

MartinNohr commented 3 years ago

When I worked for the paper, I also ran the darkroom. You had to know a lot of arcane stuff to get good photos. The cameras are a lot smarter now, anybody can get the technical aspects right. You still need a good eye for engaging photos though. Cameras are really just a tool for the artist. I was born in Århus, and lived mostly in Ryomgård. You can look them up easily these days. The Night Rider light, I already have that if you didn't notice! It is called Cylon eye though. Same effect. You can change the color and width and speed. I had to put that one in.. :-) The pcb price is without the TTGO. I did forget the switch though. It costs another $1.26. So the price is really quite reasonable. I have designed a version with 3.2" touch screen, but it is pretty expensive and I didn't really like using it. The rotary switch is way better. That touch screen did let me have the ability to preview the bmp file. I'll bring that back with the TTGO. I am amazed how cheap I can get assembled PCB's from China. I suspect there is a PCB fab shop on every corner competing with each other. I just ordered 5 built samples for $47 with shipping. The cards are about $1, and the rest is parts and assembly. But I did forget the rotary switch because I hadn't included it on this build. This is a new layout and I need to test it to make sure it all works. The major change is that they are assembling the SD reader for me.

dirkessl commented 3 years ago

Amazing progress here :-) Martin, I think the TTGO is the way to go, it's an amazing little device. I guess if we settle on the hardware and can all have the same base, we can build something great which is still accessible to many people for a reasonable price. Do you mind sharing a BOM list and also vendors so we can all have the same hardware for testing? I would then also create a 3d printable snapfit case for all the components.

MartinNohr commented 3 years ago

How about this idea? 1 - I'll continue with my PCB version, kind of the Cadillac model, It will have the logic level translators and everything on a PCB. 2 - I'll make another version that is barebones using easy to get components. I have done some more testing without the level translators and the strips I tested do work. I have one that is a little bit flakey, but I was running it on a lower voltage from NIMH batteries. All the rest work fine. That will keep the hardware pretty simple, just an SD reader, the TTGO, and the rotary dial, all easily available from multiple sources throughout the world. Many people sell those SD reader for cheap prices.

I have done some testing using 4 AA NiMH batteries and it seems to work fine. That gives a nice option instead of the USB pack, which might not be available in the future anyway, at least the model I designed the case around. We can use a standard case or design one for 3d printing.

I have noticed that the LED strips tend to go pink in color when the voltage drops below about 4.5, but the 4AA NiMH stay above for that for long time. We can't use regular AA because the voltage will be too high. We could add an LDO regulator, but that is one more part to add, and it will have to be sized for 3A to be safe. I prefer rechargeable batteries anyway, less garbage.

I'll work on a new schematic in the next couple of days. We should probably create a new GitHub entry for this project. Do you have a good name for it? GoWand, GoLight, Golem(haha, probably not),, LEDGo, GoCheap PixaGoGo... :-)

MartinNohr commented 3 years ago

BTW, I have already designed a 3D handle that has a mount for the rotary dial. It attaches to the aluminum extrusion for the LED strip. It is posted on Thingiverse. https://www.thingiverse.com/thing:4613446 It was done in Fusion 360.

MartinNohr commented 3 years ago

After using my wand last night I noticed that I sometimes bumped the dial and selected the next/previous bmp file and then when I pressed the button the wrong image was displayed. It was cold and my fingers were shaking! So I added a setting to control the dial sensitivity. You can now set it so more than one click is required to actually change the selection. I also made the timing between clicks adjustable so you can tune it to work the way you want. Problem solved!

dirkessl commented 3 years ago

Your ideas are just brilliant, as there are so many options once this finished. I drive a KIA, so I will skip the Cadillac Version and go for the standard components. I also want to make the case as small as possible by stacking the boards on top of each other.

I use a special Powerbank for my pixelstick which works fine and also balances my stick, as the powerbank sits at the bottom and the controller is on the top. This way there is no chance in accidently bump into the dial. I have two handles, one in the middle and one on top. They use GoPro connectors, so they are easily adjustable. My complete stick weighs about 250 grams, weight is an issue for me as I carry the pixelstick around in the German Alps.

I have just ordered the TTGO, a rotary encoder, an sd reader and a 1m LED Strip. I am really looking forward to this. I will also create a web converter for easily converting images of all types into the right size and format (this is on my list since I built my pixelstick)

How about lightyGO as for the name?

I still have a Darkroom in my basement, a pretty small one. At https://www.youtube.com/watch?v=2C-RCoH6YP0 you can have a look :-)

DaveStu commented 3 years ago

@MartinNohr If I can get the PCB as single unit, then it seems reasonable and get the rest parts elsewhere, but am thinking of putting a handle design in the centre of the light wand. I find that theoretically more ergonomical and maneuverable in use, plus I'm still thinking of how to split the 144, with some sort of hingle locking mechanism within a aluminium profile. I'm also evaluating the use of 18500 cells, procured from laptop batteries, I use these batteries in flash lights as well and have many. Perhaps stack these cells in alumium tube, which doubles as a handle. Nothing concrete, just ideas.

@dirkessl My led strip has arrived today from spain, from the link you gave. I'm confused somwhat as to the connections. Looking at the schematic, do I power the LED strip via the external usb connector using the two wires? Do I Ioop these same wires into the arduino or via the JST connector?

MartinNohr commented 3 years ago

Power the LED strip directly from the USB connector, or at least the shortest wires, they use a lot of power! I posted a picture of the wiring harness that I made on the thingiverse entry. I ran power to the JST connection if I remember right. The ESP32 doesn't use very much power.

MartinNohr commented 3 years ago

Dirkess: I had another idea for keeping the cost even lower. The TTGO has two buttons on the top. Put some tabs on the case to push those buttons. Then we have up and down and click both for select. Hold down both and we have the long press! Now we can skip the rotary button for the absolute cheapest and easiest. We can also skip the SD reader. The TTGO has BLE and Wifi. We can write some code to send the files to the TTGO. I'll have to check the memory usage, but there should be enough room for a couple of images on the board. We could jpeg the bmp's to make them smaller, but then we have to put in more code to expand the jpeg so that might not save us anything. We could strip the header from the bmp when we store it, since we don't really need it anymore, that would save a little space. If we want to be really clever we could at RLE the data, there is often lots of redundancy so they might shrink. I've already written a phone app that can read the files and control the system. It would be a simple matter to send a file to the TTGO. If this could work then we can build a system where the only thing you have to wire is the LED strip and battery. And the cost is truly minimum. $8 for TTGO and $11.32 (banggood today) for WS2812B.

dirkessl commented 3 years ago

@MartinNohr amazing idea. I really think we should go the modular way, it will make managing the code easier, having only one repository. With variables on the top everyone can compile the code for their specific hardware something like this:

define SDREADER //skips SD init and saves files on onboard storage

define ROTARY //enables Control through a rotary encoder

define ADDITIONALBUTTON //to use this option, connect a button to GPIO999 to act as select and start/stop button if disabled, pressing both buttons on the TTGO act as select/start/stop

If using VScode with platformio people also dont need to manually install libraries, as we can supply a platformio.ini with references to the libraries and they get downloaded on demand. For instance:

lib_deps = adafruit/Adafruit SSD1306@^2.4.1 adafruit/Adafruit GFX Library@^1.10.3 fastled/FastLED@^3.3.3 greiman/SdFat@^2.0.1 bitbucket-fmalpartida/LiquidCrystal@^1.5.0 contrem/arduino-timer@^2.2.0 adafruit/Adafruit BusIO@^1.6.0 adafruit/Adafruit NeoPixel @ ^1.7.0 Wire

I have just received my TTGO and it is truly a nice device. The buttons are a bit fiddly to press and from my experience, pressing two buttons at the same time is not reliable enough. I have the same problem on my M5Stack and will remove the two button functions in the future. Adding a third button would be a cheap option, but the rotary encoder I bought was EURO 1.5, so this will not break the bank and they are available on amazon as well.

Inbuilt storage is also very nice idea. I guess easiest would be a small webserver where you can upload and delete images. No App needed. 4MB is not a lot, but better than nothing. My current SD card has 81 images with 14MB in totaI.

I have created a first version of the web application to convert image files for a 144 LED pixelstick at https://www.essl.de/static/lighty/ it scales images down and rotates them. I will add an option to configure the LED strip length. I can add it to the repo once you have set up a new one if you want.

MartinNohr commented 3 years ago

I've got a little code cleanup to do before I start moving it to the TTGO. I used SD because at the time I couldn't make SDFat work on the ESP32. I've learned how to do that now, SDFat is much better, I used it on my older Arduino projects and found it to be much faster. I'll put SDFat back in the code. I think I'll also move the rotary dial handling into a class. I wrote my own because I couldn't find a library one that worked the way I thought it should. Maybe mine should be published as a library.

Thinking about the BLE interface, that should be #defined out as well. It uses an enormous amount of space that might be better utilized for BMP storage. I'm not sure the phone app is all that useful. It was one of those "I wrote it because I could" projects.

It'll be a couple of days before I can get a lot done on this. I have some other duties that are swallowing my time. Rental property, taking care of grandson, and garden cleanup.

I'm excited about the project though, and I really appreciate your input and assistance. We will have the absolutely best device!

MartinNohr commented 3 years ago

BTW, I've been using Adobe Photoshop to convert my bmp images. Your way sounds much easier.

DaveStu commented 3 years ago

You two are full steam ahead ha. Good stuff. I'll just watch and admire, as I excitidly play around with my setup. Though once things have established nicely, I'll also get the TTGO and other parts.

Thanks Martin, I had connected and powered through the external USB socket, was concerned in regardsto grounding and the noise aspect Dirk had mentioned. So far it works, and ran through Dirks code smoothly, though I must admit, theres definately an art in timing the movement of the wand to get good captures. I also realised that my images were upside down, so probably connected to wrong end of strip? I sound so amaterish at this 😁

I agree with Dirk, I'd also keep the rotary encoder, than the onboard buttons, they are rather fiddly in use. Currently, the joystick one I'm using is hit and miss when trying to press the central execute button, as it deviates to the other directions too easily. The rotary would be easy to press and control with precision. I'm an aficionado of classic Pioneer car stereos, and the ones which had rotary encoders, are a joy to use whilst being very efficient.

I do like the idea of using bluetooth/wifi with a phone, either with an app or as Dirk suggested, to send the images over. May I also suggest that we keep the sdcard reader as external storage? It essentially becomes infinite space, where the user can either upload via sdcard or wireless. This will negate the need to strip back the bmp files, and keep it simpler in code too and not worrying about limited internal storage?

@Dirk your parts arrived rather rapidly! Kudos to your image converter, that was quick too.

Thanks for your patience

dirkessl commented 3 years ago

@MartinNohr in ase you want to try platformio in vscode, rzeldent has a project with the TTGO-T-DIsplay: https://github.com/rzeldent/esp32-openweather-TTGO

DaveStu commented 3 years ago

I've been playing around with capturing some images and and getting use to with shutter times and wand movement. The results are decent, especially with simple colours, those close to the RGB spectrum but any complex hues are odd. First I thought it was a white balance issue, so tried different settings and also specific adjustments in kelvin but the captured colour range was limited, at least for me.

I then started reading up about FastLED and the use CHSV instead of CRGB for better colour reproduction, as the CHSV calculates with hue, saturation and and brigthness value of course, and the library provides fast, efficient methods for converting into CRGB colour, resulting in better colour reproduction. Pardon my ignorance, but is this something we're using?

There are also WS2813 LED strips, which are an improvement over WS2812B. They have a seperate white led as well as the RGB as before, though not are about exact advantages in colour accuracy. Also, if one LED fails, the rest continue working, unlike WS2812B. This is all cost depending of course.

dirkessl commented 3 years ago

The image converter now has options for clockwise and counterclockwise rotation, and you can select numbers of LEDs. I also created a case for my build. hopefully the gif plays alright lightyGOcase

DaveStu commented 3 years ago

@dirkessl Had a test of your image converter, smart. Works perfectly, nice job. What did you use to design your case? And that gold coloured board, what is that, are they shieds? I'm trying to figure out how to connect all boards together, sharing the GND and 5v rails.

Which rotary encoder did you get? Thanks

dirkessl commented 3 years ago

I use Tinkercad for quick designs as it is easy and runs in the browser. I download the used components from grabcad and convert them into stl so I can import them into Tinkercad and design the case around the components.

The board on the bottom is the Micro-SD reader. I usually first test everything on a breadboard and then take thin wire and solder everything together to fit everything into the case. I also desolder the pins from all the boards to get back some space.

I bought this rotary encoder (on the expensive side, but I didnt want to wait weeks for delievery. https://www.amazon.de/gp/product/B07TKK4QQD/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

MartinNohr commented 3 years ago

Random comments to the above comments... I started out using Tinkercad but I found it extremely limited in what I could design with it, so I switched over to Fusion 360. Hobbyists can use it for free anyway. It does have a little bit longer learning curve, but it is fantastically powerful. It is very easy to make more organic shapes. You can click on edges and push and pull them to make nice rounded edges, etc. However, it looks like you are much more skilled with Tinkercad than I ever was. I used the rotary switch without the board, it is easy enough to mount and solder to. Look at my thingiverse original handle. That's also what caused me to switch to Fusion, I couldn't figure out how to design that handle in Tinkercad. My esp32 software has a system menu, where you can change all kinds of settings. Like the dial direction and sensitivity. You can specify how many clicks equal one click and how fast they have to follow each other. That wasn't in the documentation that I wrote since I just added it last week. I need to update that pdf file. White balance, I did put gamma correction in the code to make it closer, but at lower light levels I find that the colors tend towards pinkish. I changed a bunch of the controls in the software to use HSV instead. For example the lightbar uses that and it is easy to use. The gamma correction does make a big difference, I'm getting pretty good colors with mine. You might try a slightly higher brightness setting. I have a color spectrometer hiding on a shelf somewhere, I suppose I could use it to map the colors more accurately and build better gamma tables. But that sounds like a lot of time to use for minimal return and I strongly suspect that the WS2812 strips are not all the same. I'll get a WS2813, I just noticed those a couple of weeks ago, but I hadn't studied the changes yet. It's hard to keep up with all the tech going on! I agree with keeping the SD reader, they are inexpensive. The biggest problem is that the SD software doesn't support exfat, so the max size is a 32Mb card, and they will get harder to find. There is a newer version of the SdFat library (vsn 2) that claims to support exfat, but I haven't tried it yet. I wish TTGO made a device with an attached SD reader. I wonder if anyone has suggested that to them. It would be useful for many applications. Dirk: Thanks for my name on the screen. I feel famous now in my old age! I mostly developed process controls and system software in my career so I didn't get much publicity or visibility. I did some system software work on these devices: satpaq.com and Rimage.com.

MartinNohr commented 3 years ago

Well, well, well, look at this: https://usa.banggood.com/LILYGO-TTGO-T-Display-GD32-RISC-V-32-bit-Core-Minimal-Development-Board-1_14-IPS-p-1652870.html?utm_source=googleshopping&utm_medium=cpc_organic&gmcCountry=US&utm_content=minha&utm_campaign=minha-usg-pc&currency=USD&createTmp=1&utm_source=googleshopping&utm_medium=cpc_bgcs&utm_content=frank&utm_campaign=pla-usg-rm-all-purchase-pc&gclid=CjwKCAiAn7L-BRBbEiwAl9UtkE1CMJXWBvbxSSJzL9RYzMan2e2t8vVAS4tQkg4GF7YK_7VZmMbUxxoC778QAvD_BwE&cur_warehouse=CN

MartinNohr commented 3 years ago

I sense a last minute component change. :-) The software can of course be made to work with different cards. This one means we only have to wire up the dial and power of course.

dirkessl commented 3 years ago

@MartinNohr the board you mention does not have wifi/bt which is something that could be useful in the future. I do like the small form factor of it, however.

dirkessl commented 3 years ago

The case is really small in person, I like that. I might even make it a bit taller to allow a bit more clearance inside. IMG_0274 IMG_0273

MartinNohr commented 3 years ago

Yep, no BLE or WiFi, There are always trade-offs!

MartinNohr commented 3 years ago

BTW, I forgot to make a comment to the comment about the challenge of walking at the right speed.

dirkessl commented 3 years ago

The encoder wheel is a brilliant idea for those straight lines. I am always having a hard time for the correct speed on wider pictures. I just have another idea for an additional module. Are there any small RF modules that could be added? So the stick could also fire the shutter of the camera with an RF receiver plugged into the cameras remote release port. BLE could also be an option, but I don’t know the range of BLE

DaveStu commented 3 years ago

Well, I guess I couldn't wait, sort of. I knew I should of ordered from Banggood earlier, as they had UK supples for ther TTGO board. Oh well, I've ordered from China, so I'll have to be patient. Besides the rotary encoder was cheaper from China, so I've ordered 2. One similar to Dirks link (Thanks) and a different one. Plus a rain sensor for another project I can use the mega2560 with. In the mean time, I'll continue to play around the the Mega2560 based one and also start designing a handle/case concept whilst chiming into this thread, reading the progress. I truly can't wait.

I'll have a go using Tinkercad and Fusion 360. Maybe I should reacquaint myself with Rhino3D (used at uni).

@MartinNohr Thanks for the guidence and tips using the wand. That's exciting about the colour accuracy, because I find that a must.

@dirkessl Ha. I was having the same thioughts last night, if the wand could trigger camera when doing solo work. I think BLE distance would be around max 10 meters(32ft), maybe less. Though for me, it's a after addon, as costs would easily addup. Some camers have Infrared receivers for shutter releas, like my Nikon, though distance is max 5 metres (16ft) in ideal conditions. RF would probably be best for long distance. Btw, nice case btw. The cool thing of having 3D printing.

@MartinNohr You'll soon be really famous, especially as your wand is becoming a Maybach or Rolls-Royce.

dirkessl commented 3 years ago

I had another go on an even smaller case, moving the encoder wheel to the side. Screenshot 2020-12-08 at 10 20 51

DaveStu commented 3 years ago

@dirkessl Thats nice and compact. Are you still using an external USB power supply?

My LED profile arrived today. Was thinking of how to design and attach to it. Then I had a crazy eureka moment. I have these unused flash/umbrella adpaters for lightstands and they fit the extrusions in the aluminium, like they were made for each other! _SPP8333 _SPP8339 _SPP8337 _SPP8335

In theory, I can get a small lenght of pipe with a spigot, insert into that adapter and use as a handle, and attach the electronics and power suppler. These adapters can use be angled, which I what I wanted so this has really been a lucky idea and it holds on tight. It also spins, but that will only work if the electronics are on the strip side. I decided on a transparent cover for the aluminium strip, I can then tweak myself how much light I want to pass through, but using some opaque tape or something similar.

dirkessl commented 3 years ago

Yes, I will keep using my powerbank, it’s basically part of my USB charging kit that I use when I am on the road. It’s so simple and convenient, I explain it from minute 9:20 in this video https://youtu.be/y_f5ck0Whnc

On your flash holder, please make sure to replace the screw which holds the aluminum extrusion with something that can add a bit more torque, as there will be a lot of force one you start swinging it around and I have lost 2 flashes already with that holder.

I think I need to make trip to the hardware store, these extrusions look very slim and adding a diffuser is something I miss on my current build

DaveStu commented 3 years ago

Oh Ok, I was just curious. I'm still using the power bank too, as you said, it has many purposes. I have a few to use, one even a car jump starter one with lots of juice and one that uses single 18500 batteries.

Thanks for that tip, you're right. I will definately look for a better screw, only problem is, the threads are plastic. I will see If I could add metal screw mounts. I also want something that has a better grip to use with gloves. From previous experience, I had already used epoxy to glue top plate to main body. Thats what happens with cheap stuff. This is just the first go, I may still design something instead.

These are the dimestions of my extrusion. Very slim, but fairly strong as the the walls are thick The WS2812B fits in easily, plus some space allows 2-3 wires inside if needed. s-l1600