IV-3A/IV-6 VFD Clock LDR sensor working "backwards"

More
4 months 6 days ago #12999 by ozi_uno
Hello everyone!

This is my first post on this forum, but I joined and follow it for some time.
So far I have built four nixie clocks, all of them are based on Classic Rev6 Clock by Ian Sparkes, and all of them are working perfectly (3 years now!).
I do like the software on them clocks, there is so many options and they can be easily changed via wifi.
So, for a change, my current project is based on IV-3A/IV-6 VFD Clock by Ian as well.
I know this is still not finished project, but I decided to build it anyway, and it works mostly fine.
Here is the link to the firmware: ESP8266 VFD Clock

But there is a problem with LDR sensor, it works, but the other way around, meaning when its dark the tubes are in full brightness, and in full light they are dimmed.
I think it is a software problem, but unfortunately my programming skills are very limited, and this firmware is way too complicated for me.
Any idea how to fix this? Tbh, I am hoping for Ian to answer this, because he is an author, but any help and insights is appreciated.

Thanks in advance,
Lukas

Please Log in or Create an account to join the conversation.

More
4 months 4 days ago #13005 by Ian
Hi Lukas

can you show me a picture of the board you have? There are two versions and they work completely differently.

It should be easy enough to invert the sensor, I just need to know the code to start from and that depends on the board version you have.

Ian
The following user(s) said Thank You: ozi_uno

Please Log in or Create an account to join the conversation.

More
4 months 4 days ago #13006 by ozi_uno
Hi Ian,
Actually I am not using any of them. I made the pcb myself (oldskool toner transfer metod:), because I am using IV-11 tubes, four of them. Also I replaced optocouplers with two UDN2981LW drivers. When I stated the clock first time it was showing some gibberish, but then I found that in the code there is an option to change the 74hc595 outputs from inverted to normal, and after I did that, the clock started to work ok. I can upload some pictures later, when I come back from work.

Thanks, Lukas

Please Log in or Create an account to join the conversation.

More
4 months 3 days ago #13007 by ozi_uno
Ok, here are some pictures:

First one with LDR sensor in full light, second with LDR covered with some shrinking tube. You can see LDR value and digit brightness on the screen behind.
Few more things:
-all connections are according to the schematic, so one end of LDR goes to VCC and another one goes to pin A0 of Wemos,
-I am not using LED backlights, because I prefer natural look of them tubes,
-l am using firmware from the link in my first post, the only change I made is this:
#define INVERT_595_OUTPUTS // INVERT_595_OUTPUTS | NORMAL_595_OUTPUTS
changed it to:
#define NORMAL_595_OUTPUTS // INVERT_595_OUTPUTS | NORMAL_595_OUTPUTS

I have tried to alter the formula in line 2552 of the code:
float digitBrightness = ldrManager.getLDRValue() * 100.0 / (float) COUNTS_PER_DIGIT;
but i discovered, that it is only responsible for value of brightness displayed on the website and it does not affect the actual tube brightness.
Then I tried to make some changes in LDRManager.cpp file, but did not succeed. Too advanced for me, can't decode the Matrix :)

thanks, Lukas
Attachments:

Please Log in or Create an account to join the conversation.

More
4 months 3 days ago - 4 months 3 days ago #13008 by Ty_Eeberfest

ozi_uno wrote: Ok, here are some pictures:
-all connections are according to the schematic, so one end of LDR goes to VCC and another one goes to pin A0 of Wemos,


Well there's your problem. Look again at the schematic. One end of the LDR goes to GROUND and the other end goes to A0. Also A0 must be pulled up with 10K resistor to Vcc, This results in the voltage on A0 decreasing as the LDR sees brighter light. The connections you describe would result in the voltage on A0 increasing as the LDR sees brighter light, thus the inverted operation.

P.S. I apologize for not being Ian. :S

Look into it later when the dust is clearing off the crater.
Last edit: 4 months 3 days ago by Ty_Eeberfest.
The following user(s) said Thank You: ozi_uno

Please Log in or Create an account to join the conversation.

More
4 months 3 days ago #13009 by ozi_uno
Of course! You are right!
It works fine now!
Oh, silly me, how did I miss that? I thought that R15 (10k) on the schematic actually IS LDR!
Well, problem solved, thank you very much!

thanks, Lukas

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.097 seconds
Go to top
JSN Boot template designed by JoomlaShine.com