Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mega2560 pro + 4pin OLED #22

Open
DaveStu opened this issue Dec 2, 2020 · 77 comments
Open

mega2560 pro + 4pin OLED #22

DaveStu opened this issue Dec 2, 2020 · 77 comments

Comments

@DaveStu
Copy link

DaveStu commented Dec 2, 2020

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
Copy link

dirkessl commented Dec 2, 2020

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
Copy link
Author

DaveStu commented Dec 2, 2020

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
Copy link
Owner

MartinNohr commented Dec 2, 2020

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
Copy link
Owner

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
Copy link
Owner

MartinNohr commented Dec 2, 2020

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
Copy link
Owner

MartinNohr commented Dec 2, 2020

"> 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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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
Copy link

dirkessl commented Dec 2, 2020

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
Copy link
Owner

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
Copy link
Owner

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
Copy link

dirkessl commented Dec 3, 2020

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Author

DaveStu commented Dec 3, 2020

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
Copy link
Author

DaveStu commented Dec 3, 2020

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
Copy link
Owner

MartinNohr commented Dec 3, 2020 via email

@DaveStu
Copy link
Author

DaveStu commented Dec 4, 2020

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
Copy link
Owner

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
Copy link

dirkessl commented Dec 4, 2020

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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
Copy link

dirkessl commented Dec 4, 2020

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
Copy link
Author

DaveStu commented Dec 4, 2020

@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
Copy link
Owner

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
Copy link
Owner

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
Copy link

dirkessl commented Dec 5, 2020

@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
Copy link
Owner

  • I like the #define idea, I've often done that in the past. It's better to have single code base. I can sometimes be done by selectively using classes, but in this case I think #defines work fine.
  • Manually installing libraries has always been a weak point for the Arduino IDE and the Visual Studio version I'm using. Painful. I haven't used platformio so I had no knowledge of how they handled it. Looks elegant.
  • Pressing two buttons at the same time means that you have a long enough timer to make sure they are both pressed and not just one. Contact bouncing, and finger bouncing makes this difficult, but not impossible. But I agree, it isn't ideal, especially given the cost of the rotary dial. It does save some wiring though.
  • My web design skills are approximately zero, so I am impressed that you can do the scaling and rotating from there Remember that my code needs it rotated to the clockwise (to the right) 90 degrees. That's a great solution! I only suggested a phone app because I knew how to do that.
    Please be patient as I learn some of these new things. I'm 70+ and I don't learn new ideas quite as fast as I used to. :-)

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!

@DaveStu
Copy link
Author

DaveStu commented Dec 8, 2020

@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
Copy link

dirkessl commented Dec 8, 2020

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
Copy link
Author

DaveStu commented Dec 8, 2020

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

@dirkessl
Copy link

I now have some aluminium extrusions with diffusers on order and will try to build a connector that doesn't leave a gap between the two 144 LED strips. @MartinNohr is the number of LEDs configurable in the menu? I tried to port your code to the TTGO-display, but without too much luck, yet. But as we will have a hard lockdown in Germany from Wednesday on and I am off work, I will have a bit more time to look into it.

@DaveStu
Copy link
Author

DaveStu commented Dec 13, 2020

Thats cool. Your wand will be quite high! Should produce some fantastic large images, I was thinking of doing that too, but perhaps later. I've been looking at how to connect two strips together without a gap. I'm sure Martins handle design solves that,
Without knowing how Martins connects, you could stack one strip behind the other? So one strip is 144 pixels and on the other you'll lose about 10 LEDs, then use a connector to join them.

I'll keep tinkering with the design, as I'll need to wait for the coding. Btw Dirk, If you're on windows, what driver you using so I can test the board. When I plug in, blue LED pulses fast, screen flashes through colours then stays on yellow. Is that how yours was?
Thanks

@DaveStu
Copy link
Author

DaveStu commented Dec 13, 2020

@dirkessl I figured out the ttgo driver and arduino control. digregard previous part of message.

@MartinNohr
Copy link
Owner

Sorry guys, I had a really busy week last week and didn't get any time to work on this project. This week is looking better. I see lots of things happened while I was away. Among other things my LAN mysteriously stopped working and I spent hours tracking down a bad switch and some wiring. :-( Oh well, all is working again.
Porting the code to the TTGO is a bit of work, I'm getting really close though. I have the SD and display working. There were lots of problems to solve. I first loaded the adafruit library for the TFT display. It works, but.... it is terribly slow! So after many hours of looking and experimenting I found that the TFT code from Bodmer works nice and fast and without all the blinking I was getting from the Adafruit code. The bad news is that it then caused the SD code to stop working! I figured out it was an SPI conflict so I got them working nicely together now. I also switched to the sdfat code which supports cards bigger than 32GB. exfat. Unfortunately, to make all this work I had to make changes to the TFT code, so downloading the standard code won't work. I'll list the changes as soon as I get the new repo going.
I'll set up a new repo soon and we can then continue this discussion over there.
About using 2 led strips: I didn't put a led count in the new code, I did that in the original but then I changed it to a boolean for just 1 or two strips. The data for both starts in the middle (I did that to avoid running a wire down to the end of the strip), but it means that 2 strips is the max, they can't be chained, but two is likely enough. Both strips are assumed to be 144 but that could be changed in the code.
More later, I have to run my son downtown.

@MartinNohr
Copy link
Owner

Regarding the gap between the two strips, I haven't really solved that one, so I hope you can up with something. I removed the wires and then soldered new ones on that went sideways so I did minimize the gap, but it can be seen in some images. If you look in thingiverse.com for the new version you can see how I soldered the wires. Note that there is always a slight gap in the middle of the 144 led strips because they are actually two 72 led strips soldered together. I have looked at strips from several different companies and they are all made that way. I can see a small black line in the images where that join is. Have any of you seen any strips without the solder joint at 72?

@dirkessl
Copy link

@MartinNohr I have desoldered and soldered my strip back together tightly to get rid of the gap, as it was really annoying and showing in all the images. As those strips are not really meant to show pictures, companies might just not care about the tiny gap.
I guess it will not matter how to connect the strip, either serial or on in the middle, I just need to design something that mechanically connects without showing a gap. This way, a "foldable" stick would also be possible with configurations of 72, 144, 216 and 288 LEDs. When my aluminium extrusions arrive, I can start working on the mechanical design with an integrated connector.

@dirkessl
Copy link

I had a quick go for the connector, no idea if it will work out. the goal would be to bring the wiring down into the printed plastic connector to allow a gapless connection. The wiring itself is not shown in the CAD drawing.

Screenshot 2020-12-14 at 22 11 07

Screenshot 2020-12-14 at 22 12 57

Screenshot 2020-12-14 at 22 13 34

Screenshot 2020-12-14 at 22 10 10

@MartinNohr
Copy link
Owner

That certainly looks interesting. Remember that the LED's only feed input data from one side so this won't work with feeding both LED's in the middle like I did. I only did that to avoid running a wire down the length of the strip. I had to play a bunch of tricks in the software to do that since one of the strips is effectively "upside down". I like your idea though and it would be easy enough to change the software back to just treat the strip as a length of N leds. In fact, it would probably execute the code faster! The only drawback is three wires down to the bottom of the strip. The good news is that we could easily support as many or as few strips as you want. I love the idea of a foldable one, but even a pluggable one would be great. That black line can be annoying! We will soon have the absolute best "pixelstick" around.

@MartinNohr
Copy link
Owner

I wonder if we can bend that join at 72 pixels to mash them a little bit closer? I'll have a look at that later today.

@MartinNohr
Copy link
Owner

lightyGO would be ok as the name, but it doesn't really give a hint as to what it does. If we can't come up with anything better we could certainly use it, but lets think about it a bit more. That's why I haven't create a new repo yet. I want a great name!
GO doesn't have to be in there, tomorrow we might find a better processor board!

@dirkessl
Copy link

there could as well be a connector on the back which joins the 2 two strips from the middle, so no additional cable would be needed. In theory the PWM cable should be enough, as it doesnt matter if power comes from either side, or am I wrong? could the aluminium extrusion itself be the pwm signal 'cable', or will it imply too much noise?

@MartinNohr
Copy link
Owner

Have you seen this one?
https://www.youtube.com/watch?v=eBem0EzGR6Q
Easy to do with our hardware and a few enhancements to the phone app.

@MartinNohr
Copy link
Owner

Yes, the power can come from either side. It isn't a PWM signal (it is an interesting way to send binary data), but it only requires the data and ground connections.

@MartinNohr
Copy link
Owner

The way it works is that it sends 24bits of data. Each 24bits is sent on to the next chip. This color data is latched in each chip. When the data line stays low for (if I remember right) > 50uS the data is transferred to the leds. What this means is that the data has to come from one end as a stream of data, the first 24bits end up at the end of the strip. So, I guess we could still feed the data to two strips from the middle, but it does make it more complicated if we wanted to support other sizes like 3 strips or 72 leds etc. If you always feed from one end then you can just add as many leds as you want, you just chain them together.
Using only 1 data line from the end also means that we only need one control line from the controller board. Make sense? Or am I confusing?

@MartinNohr
Copy link
Owner

more... the data line gets 24bits for each led, so if you had 144, then 14424 bits is sent. Or you could also say 1443 bytes. If you only send 6 bytes then only the first two leds will change color. The timing is how 0 and 1 are determined, the stream is terminated by sending digital 0 for a long time.

@MartinNohr
Copy link
Owner

Hey, it changed my text... 144 x 24 and 133 x 3.

@MartinNohr
Copy link
Owner

144 x 3...

@dirkessl
Copy link

What about PixelWand, as this thing is magic and sends pixels.

It's amazing how much light painting stuff you can buy for way too much money. Have a look at https://github.com/Aircoookie/WLED . I have already build some stuff based on this firmware and it has really everything you need, but no local display, so it relies completely on a phone app or other network methods. If WLED gets a local display and some input buttons, it is very easy to make great light painting equipment for small money.

As said, I myself prefer using the stick without an app, because it is just easier in my opinion and I dont want to rely on another piece of hardware if I am out shooting.

Your explanation totally makes sense, thank you very much! I guess this is a minor thing how more strips can be chained together. Whatever works is fine. ;-)

@dirkessl
Copy link

And also your menu system is one of the best (if not the best) that I have seen.

@MartinNohr
Copy link
Owner

Appreciate that! I like my menu system too.
Anyway, by reversing the bottom strip I got rid of the wire running down the strip, not a big deal if we can make a really tight joint and eliminate the black line.
PixelWand is of course already used, did you want the word magic in there also?

@dirkessl
Copy link

MartinsMagicPixelWand?

@dirkessl
Copy link

MNPixelWand, MagicPixelWand, LightPixelWand, MagicLightWand, MNMagicPixel

@MartinNohr
Copy link
Owner

We don't need my name in there, I'm not the only guy working on this design now, and I'm not that egotistical!
Wait.... or am I? :-)
How about MagicImageWand? I couldn't find anything matching that name.

@dirkessl
Copy link

MagicImageWand sounds absolutely spot on. also .miw files are not taken by anything. I think you can be egotistical, as you do all the coding work. I need to get some sleep now and dream about this gapless connector

@MartinNohr
Copy link
Owner

regarding the WLED comments. I like the standalone operation especially for photography. I don't want to have to grab my phone or a computer to control the thing. The only app use I could see was to have an assistant start the camera and light from somewhere else. I solve that problem by having a radio control on my camera. Then I open the shutter and start walking. Works fine.
We could add many more features to the code, WLED is inspiring, but is it useful? Sending patterns or images through the wifi connection is pretty easy. Let's consider that for a later version. I want to get the code working with the TTGO first.

@MartinNohr
Copy link
Owner

I'll go ahead and create MagicImageWand repo, I'll send you a link later, I have to go to the shop to do a little woodwork to fix my neighbors table, then I'll get back to this. Goodnight.

@MartinNohr
Copy link
Owner

Let's continue our discussions on the new repo.
https://github.com/MartinNohr/MagicImageWand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants