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

progress and suggestions #1

Closed
MartinNohr opened this issue Dec 15, 2020 · 84 comments
Closed

progress and suggestions #1

MartinNohr opened this issue Dec 15, 2020 · 84 comments
Labels
info Information only/base for discussion

Comments

@MartinNohr
Copy link
Owner

MartinNohr commented Dec 15, 2020

Let's continue our discussions from the lightwand post here.
I'll start by saying that I now have my test code on the TTGO getting closer.

  • SD card works, even with exFat formatted cards larger than 32GB.
  • Rotary dial switch works
  • LED strip works
    I have some text working on the display, but I have some work left to do to get the full menu system up and running. Later this week if I don't get too many interruptions.
    I also have a schematic that I'll post tomorrow.
    I'll have the code up as soon as it works.
@dirkessl dirkessl added the info Information only/base for discussion label Dec 15, 2020
@dirkessl
Copy link
Collaborator

That's great news. I have tried for way too long to get the code to compile in Platform.io, but it just doesn't want to compile. In the Arduino IDE it compiles just fine. Not a big deal, as I am using the Arduino IDE for other stuff as well.

@DaveStu
Copy link

DaveStu commented Dec 19, 2020

Hi gentlemen, hope all are well. It's been a while, been busy with covid life and the ever changing rules.
Anyway, seems much has been progrssed, the excitement is overwhelming.
Haven't had much time to design enclosures and attaching mechanisms, though I did look at Dirks design on previous thread and looked great, hows that going?
Whilst I've been away/waiting, ordered another LED strip, the temptation for a £5 deal with coupons was too good pass.

So, are we still using Arduino to compile?

@MartinNohr
Copy link
Owner Author

Sounds fun. :-(
It can be compiled and it is running more or less on the TTGO now. I have a lot of display issues to resolve, but most of them should be done in the next couple of days. The LED's are running ok as far as I can tell.
I'm going to improve the fonts a bit, I think they are a little bit too small. I can read them ok, but I have really good eyes for a 70+ old engineer. I know a lot of my friends won't be able to read them.
As soon as I get that stuff done I'll add the preview feature and then start on other ideas that we think (or thought) of.

@MartinNohr
Copy link
Owner Author

We've had a number of our friends get Covid now, One died, he was 5 years older than me. Kind of scary. Everybody else we know has recovered. We mostly stay at home. I'm retired so it hasn't affected me very much really. We have started going to the store for food more now. I have about a 1/4 acre garden so during the summer we grow a lot of our own food, but now it is winter and the vegetables don't grow very well. We have a lot in the freezer, but fresh food is nice.

@dirkessl
Copy link
Collaborator

dirkessl commented Dec 20, 2020

@MartinNohr yes, covid keeps us all busy. I'm sorry for you losing a friend due to it. A close friend of mine also had it and recovered, just his sense of taste hasn't come back, yet. As I live in the middle of Munich, I have no chance of growing my own vegetables, but this would be wonderful if I would be able to do that.

@dirkessl
Copy link
Collaborator

I have put all the info from the Word file into the wiki here, this makes it easier to maintain (at least for me :-) ). Once I will have the hardware running, I will put examples pictures for the inbuilt patterns and other stuff. BOM list needs to be updated.

I have also designed and printed a new case, as on my previous case the TTGO was upside down. Everything fits neatly inside now and there is enough room for the wiring harness. ToDo on the case are snap connectors to make the case close without screws.

I received my aluminum extrusions with a diffuser and they are very low profile, just as I like them. When the hardware runs I will try to put more effort into the gapless connector and look for mounting options for handles and the battery. There is the beauty on open source designs, as the way Martins MIW is constructed does not fit my very minimalistic approach, but might suit others. This way we can supply more options for cases, handles, etc. Just Beautiful.

@dirkessl
Copy link
Collaborator

@DaveStu It works a breeze with the Arduino IDE, as Martin has ironed out all the issues with special libraries. I will provide an detailed instruction on how to install the Arduino IDE and the needed libraries shortly. We will also share an already compiled binary which can be flashed by an inexperienced user with a small tool. We can use the releases feature of github and share a nice changelog.

@dirkessl
Copy link
Collaborator

Documentation is done for compiling it in the Arduino IDE https://github.com/MartinNohr/MagicImageWand/wiki/9.-Compiling-from-source

@MartinNohr
Copy link
Owner Author

I got the BMP preview working nicely now. It's on the first menu. You can use the dial to scroll left and right by screens. It does have a bug for images less than 240 pixels wide. I'll fix that tomorrow, it's past midnight here and my brain goes foggy. :-)
Thanks for all the help guys. This is a great project.

@MartinNohr
Copy link
Owner Author

Preview working fine on everything I tested. I'm sure you'll let me know of any problems. :-)
It's a neat feature.
Dirk: thanks again for the nice image samples. I especially like the space and the flame ones. I had created a simple wall of flame, that was the limit of my talent.

@dirkessl
Copy link
Collaborator

Preview works fine, really amazing. Just I think scrolling is reversed on the wheel.

My physical build is done, everything works amazingly well. I have some minor issues with the hardware, but will sort them out for sure. I have not run the LEDs on full brightness, yet, but have never needed full brightness on my previous build. Timing on the ESP is much faster which is very nice and will help for sure in the future.

Martin, your talent to code this is out of this world, I am absolutely blown away by the features you have implemented. Truly stunning. I guess it can easily be extended to be of use for other projects, a VILTROX Weeylite RB08P could easily be made for much less money. The TTGO also has a Lipo charging circuit and this would make for a nice affordable RGB LED light. An SD reader is not needed and probably the inbuilt buttons would maybe be enough (but I admit the wheel is very nice) to drive very minimalistic menu system for hue, sat, and brightness + some inbuilt effects (they all have inbuilt effects these days like TV, Police, fire, etc.) A lot of hobby film makers are on a budget...

I will open issues for the bugs, I have found :-)

@DaveStu
Copy link

DaveStu commented Dec 21, 2020

@MartinNohr Sorry to hear about your loss, it's been an unprecedented year and much sadness. I've had a few friends and ex collegues go through the covid illness, and with some friends of friendswho have been taken away.
Plus UK has got one of the most inept governments in power right now, they've ruined brexit and handled covid so disastrously.

Your fresh foods gardening sounds wonderful, to have the ability. The most I've got to ability to grow are tomatoes and some herbs. The taste experience is very different indeed, comapred to commercial grown produce.
I used to have a friend in Tampa, who bring us florida oranges and admittedly the best oranges I've ever tasted.

@DaveStu
Copy link

DaveStu commented Dec 21, 2020

@dirkessl Thanks for the uploads.

Now that I've temporarily connected the parts (haven't got a breadboard), I'll compile/upload the code and give it a test run.
I've been running it through many test programs from various blogs. Had fun playing with all manner of light sequences, testing WIFI which works finding signals, also testing the display but now to some serious stuff.

Look what I found, though not what we need, just found it fascinating. The world of programmable RGB LED's is truly amazing.
https://www.twinkly.com/whats-new/

@DaveStu
Copy link

DaveStu commented Dec 21, 2020

@dirk I'm not sure how much further your connecting mechanism has got, perhaps you've finished it. I had this idea for the pin connection layout. Apologies for the crude sketching.
Image001
The wires would then be fed through a hole in the extrusion and hidden inside the connection block, with only the pogo style pins showing until connected together. This should allow you to bring the LEDS closer. The data line will obviously have to come from the other side, which can be hidden underneath the LED strip. Maybe use ribbon or FFC cable?

I've pencil sketched something like this, but with a thicker body to hold the two extrusions which I need to sketch in modelling software

@dirkessl
Copy link
Collaborator

@DaveStu Yes, this is basically the idea for the connector, but all very slimline. the things you added will be inside the black parts already.

@MartinNohr
Copy link
Owner Author

MartinNohr commented Dec 22, 2020

Currently the data lines at the junction are not connected to each other, each one goes to a control line on the ttgo. If you want them connected here then we need to run the 3 wires down to the far end of the strip. The software is simplified if we do that. I originally thought it was clever to avoid the long wire by feeding both strips in the middle. Doing that also means that you don't really need those pogo pins you just need connections to the 3 wires. I'm ok with either way of doing it.

@MartinNohr
Copy link
Owner Author

If you do it my then the pogo pins won't be on the strip buy rather on the carrier housing. Make sense? I'm still trying to avoid that long ugly wire.

@dirkessl
Copy link
Collaborator

I will think about it what's the best way

@dirkessl
Copy link
Collaborator

so I took the MIW for a quick spin to try out the inbuilt patterns. Most of them look really awesome. They look indeed that good that I need a nicer location to shoot them for the documentation. I also found some images do not look really good, as they have no pure black background. I will either fix those or remove them from the standard set

@MartinNohr
Copy link
Owner Author

Excellent! I haven't been out with the new one yet. I've been too busy to even make one yet. I could of course use the images on my older wand to see what they look like. Any kind of non-black that shouldn't be there really does show up. I had that image with some of mine, I just went into Photoshop and used the levels control to clean them up.

@MartinNohr
Copy link
Owner Author

That twinkly site is inspiring. I'm getting some pattern ideas for the built-ins. Thanks, I hadn't ever seen that device. Very clever.

@DaveStu
Copy link

DaveStu commented Dec 23, 2020

@dirkessl Oh I see, excellent. They always say, if you've thought of it, someone has probably done it ha.

Sorry for my amateur hour, but having problems with the rotary encoder, the switch works but unsure as to where
positive connection goes too, 5v or 3v rail or other.
I have this type of encoder.
s-l1600

@DaveStu
Copy link

DaveStu commented Dec 23, 2020

@MartinNohr I thought you may like the twinkly products, well find inspiration from. Just surprises me what can be achieved.
The possibilities are endless and has given me more ideas, some crazy of course ha

@MartinNohr
Copy link
Owner Author

I don't know about that kind of switch. I designed it around the switch with nothing else. You can see on the schematic how I wired it. Do you have a schematic of that switch board?

@MartinNohr
Copy link
Owner Author

I just expect the switch contacts to connect to ground, no power connections at all.

@MartinNohr
Copy link
Owner Author

In other words I expect the switch to pull to ground. If it does have its own power it would have to be 3.3V. 5V will fry the chip. My worry is that that board inverts the signals. The software can handle that if I put in an option for inverted signals.

@MartinNohr
Copy link
Owner Author

I found the switch schematic. They have pullup resistors on the board. I'm turning on the internal esp32 pullups. You could just ignore the + connection or connect it to 3.3V. Do NOT connect to 5V! It will work fine with no connection. It might have a little better noise immunity with the 3.3V connected.
Clk=A dt=B and sw is the button on our schematic.

@DaveStu
Copy link

DaveStu commented Dec 23, 2020

@MartinNohr Thanks, appreciate the help. I updated the code but still needed the 3.3v line, so had to solder that connection.
The switch/encoder works! The way it boots has changed though, without the switch it boots immediately, with the 3.3v line connected, only when I rotate the dial a few times it boots. By design or possibly my switch/encoder type?

Going through your menu myself, I can truly appreciate your intelligent thinking, options galore!
Though I may have a grounding issue or related to switch/enoder.
The LEDS turn on randomly during pattern selection. For example, choosing the solid colour sequence, some LEDS turn on some dont. Cycling through the hues, they are not constant. If for example, I choose 100, then go to another hue then return to 100, the colour will be differernt or some LEDS do not light up.

I'm powering the strip from a usb powerbank and the TTGO from laptop.

@MartinNohr
Copy link
Owner Author

Don't connect the 3.3V line to the switch. I just remembered pulling one of the those lines high will prevent booting. The switch only needs the ground and the contacts connected.

@MartinNohr
Copy link
Owner Author

MartinNohr commented Dec 27, 2020

I noted in the WiFi comments, but I'll mention it here also. I fixed the file upload to SD using WiFi.
It does need some improvements.

  • handle existing filename, don't just overwrite it.
  • show a list of existing file, maybe from a button press.
  • show settings and allow starting playback.

@MartinNohr
Copy link
Owner Author

I added a little feature. Pressing button 0 (on the board) will always display the image no matter what else is on the screen. Pressing it again restores whatever was going on before. Note that it doesn't work if an image is actually being shown on the LED strip of course.
I suppose we could make button 0 do other things, but I got tired of selecting a menu item to preview the file.

@MartinNohr
Copy link
Owner Author

Dirk: Would you consider adding the sources for the STL files? Some people might need to modify them slightly for different extrusions.

@dirkessl
Copy link
Collaborator

@MartinNohr sure, but as I use TinkerCAD for all of this, I can only supply online links. I guess I need to learn some Fusion360, I already have a license for it and think I will be much faster once I mastered it.

@dirkessl
Copy link
Collaborator

Quick Update, I took the time today and learned Fusion 360 and created the basic case. I need to print one first, before I can make more adjustments, as I guess I did not include enough tolerances for 3D printing. But it is a good start and Fusion is really powerful.

@DaveStu
Copy link

DaveStu commented Dec 31, 2020

Morning/Evening gentlemen. Hope the Christmas holidays was a happy and healthy one. I've been busy with things, so havent had time to check in, but see progress in well ahead. I won't get time until a few days into 2021 so with that
I'll say Happy New Year to you both and to all your family and friends. Lets hope 2021 is a true turn around from the fiasco of this year. Cheers and salut.

@MartinNohr
Copy link
Owner Author

Thanks Dave. Happy New Year to you all. My daughter and grandson recovered from Covid in a couple of days. It must be nice to be young! Even though we were in the same car for an hour the night before she developed symptoms, we didn't get it. She did lose her sense of smell, but it is coming back.

@MartinNohr
Copy link
Owner Author

Dirk: I started out with TinkerCad, but I was never very good at it. Due to my teaching part time at the University I got the educational license for Fusion 360. I'm always amazed at the good designs people can do with TinkerCad, even yours, I can't do that much with it. Fusion however is a very powerful tool. I found rounding edges and editing shapes much easier in fusion. It also handles multiple shapes that fit together in a single file very nicely. Fusion does have a longer learning curve. Threads and holes are handled extremely well in Fusion.
And yes, 3D printing is not like machining, tolerances have to be accounted for, and even worse, unless the printer is well calibrated (mine is), then things won't fit!

@MartinNohr
Copy link
Owner Author

Links to the TinkerCad are ok, as long as the project is shared. Many people so use TinkerCad. You can import TinkerCad models to Fusion but I find they don't always work well, so I often start over. One big problem is that only basic shapes from TinkerCad get imported, not any of the fancy extension/plugin features.

@krealab
Copy link

krealab commented Jan 25, 2021

Hi! Im a photographer with interest in tinkering and some programming. I would love to make a light wand for light painting pictures. Do you know if this code could be tweaked for use with m5 stack core or core2 ? It has a screen and a Sd-card reader, so i think it should be perfect for such project. I just dont have the knowledge to program it yet. Stay safe and all the best from Northern Norway. Kolbjørn.

@MartinNohr
Copy link
Owner Author

I could probably make it work on that m5 stack. I thought of using one once. I would have to get one and see how hard it would be. And I would have to find the time to test it. If you want to keep it simpler I do have a PCB made with the TTGO and an SD card reader attached.
Anyway, I'll go look at the m5 stack specs to see how easy it might be to port the code.
I've been to Norway a few times. I was born in Århus and until I was 18 I lived in Ryomgård Denmark.
Jeg kan godt læse norsk, dog ser det ud som om der er mange stavefejl. :-)

@krealab
Copy link

krealab commented Feb 1, 2021

Always good to hear that people visit Norway! You hva probably not been so far north as i live in Vesterålen. :) I just thought it would be a perfect project for the M5 Stack system. I have the Core and Core 2. By the way i have been to Århus once. Thats a tech city right?

@MartinNohr
Copy link
Owner Author

No, I have not been that far North! I walked up and down Holmenkollen and decided that skiers were crazy people. I was mostly in and around Oslo. Loved that big park with statues all over.
I ordered a core 2 from China that I will experiment with. I looked at the docs and it looked like it should be easy enough to port.

@MartinNohr
Copy link
Owner Author

I'll be back working on this project now. I want to improve the web interface. I also want to make the remote camera control work. I've got the cable for my Nikon and I have verified that it works!
I have been busy finishing another project and haven't had much time to work on this one.
https://www.thingiverse.com/thing:4723557

@krealab
Copy link

krealab commented Feb 5, 2021

I will have to get a TTGO and test it. Never tried. I actually started a makerspace up here for kids. Maybe we could hire you for a weekend or so after corona. https://www.facebook.com/makerspacevesteralen

@MartinNohr
Copy link
Owner Author

I'd love to come up to Norway... but it's a bit of a trip now, I am currently living in Utah.

@dirkessl
Copy link
Collaborator

Long time no read, I started a new job in January and everything is going well. Currently I am off the Computer in the evenings and am painting figures from my new resin printer. Very relaxing and a lot of fun. Weather is also pretty bad in Germany, so photography is not nice at the moment. We also need to wait for the government to lift the curfew, as my favourite places are out of reach at the moment as we have to be home at 9pm.
But I am ready to make more tests and help with ideas, of course. Looking forward to get some progress on the remote functionality.
@krealab I have built a remote timer based on the M5, you can read about it here: https://www.essl.de/2020/10/23/timy-the-open-source-camera-timer/
We decided against the M5 as its logic circuit is 3.3V and while this works with most LED strips, some might have issues so a Logic shifter is needed. Martin has created a board which has this integrated, but its not needed with the TTGO as it is a 5V board. I also find the buttons not really good on the M5 and power management is a mess on this device.

@MartinNohr
Copy link
Owner Author

The TTGO is a 3V3 board, it is not 5V. It will take 5V input because it has an onboard regulator. The TTGO is an ESP32 and it is 3V3.
I have finished my new PCB with the level shifter and the rotary switch on the board.

@MartinNohr
Copy link
Owner Author

I made a change to the code today. The other button now acts like a long-press so you can use it to jump in and out of the menus.

@DaveStu
Copy link

DaveStu commented Feb 19, 2021

Afternoon/Morning gentlemen, it's been a while and hope all are well. Similar to Dirk, i've have been working with photography mostly dead in the UK rules changing constantly, I've been juggling between 2-3 jobs to keep things going and now has been shifted to one for the time being.
I'm eagerly trying to catchup on the progress of the wand and all the new changes, which to me feels like months ago when last last I worked on it.

@DaveStu
Copy link

DaveStu commented Feb 20, 2021

Found an interesting program, especially for people who don't program as such. It uses visual logic to interface with controllers and help to create code for them. Its this https://xod.io/
Probably help any future projects I get into

@MartinNohr
Copy link
Owner Author

xod is interesting but I have seen many attempts at that kind of thing in the past, none have really interested me, but then I'll admit that is largely because I'm already a moderately competent programmer.

@MartinNohr
Copy link
Owner Author

Note that in the latest code I added an information screen to the preview, just click the button. It now shows the distance to walk to maintain square pixels. I found in using the wand that I had to make several test shots to get the ratio correct of images. for some patterns it doesn't matter, but often it does. That info screen also shows the approximate number of seconds using the current frame hold time.

@MartinNohr
Copy link
Owner Author

MartinNohr commented May 18, 2021

I created a new branch with new features and many internal changes to the code.
There is now a preview of built-in patterns.
The display can mirror the LED as it is being displayed to give a better idea of the image progress.
The code has been improved for ease of managing variables.
The EEPROM library is no longer used. I replaced it with the much better preferences.h library.
I have also started to implement a new feature in the macros that will indicate how long it takes to display the macro. There might also be a feature to over-ride the macro settings like the hold time, but I am still thinking about how best to do that.
I will leave this as a branch until it has been tested more to make sure it all still works.

@MartinNohr
Copy link
Owner Author

I added sideways scrolling to long lines. They now scroll to the end, and then back again so long lines can be seen. This is especially useful for long filenames and paths. It is also useful for longer menu names. There are adjustable settings to control the scroll speed, return speed, and the pause at each end.

@MartinNohr
Copy link
Owner Author

I added a confirmation screen to anything that deletes files or settings. I accidentally deleted a macro file because it just quietly erased it.
I also added a switch to ignore the settings that are stored in the macro file. Sometimes you might want to change the settings.
I have merged the new code into main. Please let me know if any problems are found. I'll update the documentation soon to reflect the new features.

@ThomasKlee64
Copy link

I got the stick working and everything is working great, thank you for this great work. One more thing I noticed or I do not operate the menu correctly. For example, when I start the stick, all the settings I made in the System Settings (Display Brightness, Text Color, Show BMP on LCD, etc.) are always reset to the original state. Is this the way it should be or am I doing something wrong here.

@MartinNohr
Copy link
Owner Author

Under saved settings: set autoload to yes and save the current settings.
I have considered making all the system settings automatically saved. That probably makes sense. I'll change in a future version soon. The LED controller and count settings are always saved and loaded regardless of the autoload setting, but I agree, the system ones should also be saved and loaded all the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info Information only/base for discussion
Projects
None yet
Development

No branches or pull requests

5 participants