-
Notifications
You must be signed in to change notification settings - Fork 52
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
Is it possible to turn the bulbs off in software? #17
Comments
Hello.
We have a Hardware pinout and logic on the Board for the PIR sensor.
However we did not implemented its usage in the Software (Firmware).
One of our buyers have implemented several similar functions in our
Firmware as a mods.
Please use link below to his blog and ask him for code and other info:
https://www.buildxyz.xyz/nixieclock-build-guide/
This blog should be useful to you.
Write back if there will be any other questions.
Regards.
ср, 7 окт. 2020 г. в 17:30, Sapient Hetero <[email protected]>:
… I'd like to integrate a PIR sensor with a NCS314 V2.2 in order to extend
bulb life by turning them off when nobody is in the room to see them. Is
there any way to do this in software?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#17>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAROBMWBROT6THP3XPCUIJTSJR3PLANCNFSM4SHPIA3A>
.
--
Alexey [GRA & AFCH]
|
You can turn off the bulbs by writing 0's into these. |
Line 108 in adb9bca
Write this variable LOW and they shut off. |
Can you shed more light (information) on the logic / pinout for a PIR sensor on the NCS314 board (I have v3.4) that you refer to. I note from the board schematic that pin D8 is not used by the shield and potentially could be used to connect a PIR sensor. I was thinking of using this to set BL (SHDN) on pin D5 “LOW” when the sensor did not detect any motion for a period, which would turn off the high voltage to all of the tubes, but there is probably a more elegant way of accomplishing this. The link you suggested to another customer didn’t really help me with this as much as I had hoped. |
I ended up switching from the PIR sensor to an ultrasonic sensor: https://www.amazon.com/HiLetgo-HC-SR04-Ultrasonic-Distance-MEGA2560/dp/B00E87VXH0/ref=sr_1_9?crid=3RQ8SC81A2C1C&keywords=proximity+sensor&qid=1676989931&sprefix=proximity+sensor%2Caps%2C110&sr=8-9 because the PIR sensor kept detecting the airflow from air conditioning vents in the ceiling and no filter algorithm I tried could reject it well enough while still sensing human presence. These aren’t perfect either but they’re better than the PIR sensors.
Here's the code I use with the sensor
|
Thank you. I'll try and get my head around that. I still haven't figured out the best way to actually turn the tubes off / on. |
I'm thinking of using LEpin as suggested above, and only allowing it to go HIGH if recent motion has been detected. Is that too simple? |
It was too simple! Setting LEpin LOW only stops the tubes from changing from what they are already displaying. However my original idea of using BL (the Blanking pin) by setting pinSHDN LOW does turn them off, and restoring pinSHDN to HIGH turns them back on again. 🙂 |
Glad you got it working.
You can also dim the bulbs by using pulse width modulation on LEpin.
// these values determine how dim the bulbs are when dimming is enabled. Lower pulse width + lower delay = dimmer bulbs
uint8_t dimPulseWidth[4] = {15, 30, 45, 65};
uint32_t dimDelay[4] = {500, 1000, 1500, 2000}; // in microseconds; this matters more than pulsewidth
Then insteading of setting LEpin high to display the time, set it to your desired pulse width
if (dimming) {
delayMicroseconds(dimDelay[Settings.dimmingSetting-1]);
analogWrite(LEpin, dimPulseWidth[Settings.dimmingSetting-1]);
}
From: regorwislon ***@***.***>
Sent: Tuesday, February 21, 2023 11:23 PM
To: afch/NixeTubesShieldNCS314 ***@***.***>
Cc: Sapient Hetero ***@***.***>; Author ***@***.***>
Subject: Re: [afch/NixeTubesShieldNCS314] Is it possible to turn the bulbs off in software? (#17)
It was too simple! Setting LEpin LOW only stops the tubes from changing from what they are already displaying. However my original idea of using BL (the Blanking pin) by setting pinSHDN LOW does turn them off, and restoring pinSHDN to HIGH turns them back on again. 🙂
—
Reply to this email directly, [view it on GitHub](#17 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AJMYQI65Q3XXDB2K76J6YZ3WYWIDLANCNFSM4SHPIA3A).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Many thanks for your help and for sharing your knowledge and work. much appreciated.
… On 22/02/2023, at 5:41 PM, Sapient Hetero ***@***.***> wrote:
Glad you got it working.
You can also dim the bulbs by using pulse width modulation on LEpin.
// these values determine how dim the bulbs are when dimming is enabled. Lower pulse width + lower delay = dimmer bulbs
uint8_t dimPulseWidth[4] = {15, 30, 45, 65};
uint32_t dimDelay[4] = {500, 1000, 1500, 2000}; // in microseconds; this matters more than pulsewidth
Then insteading of setting LEpin high to display the time, set it to your desired pulse width
if (dimming) {
delayMicroseconds(dimDelay[Settings.dimmingSetting-1]);
analogWrite(LEpin, dimPulseWidth[Settings.dimmingSetting-1]);
}
From: regorwislon ***@***.***>
Sent: Tuesday, February 21, 2023 11:23 PM
To: afch/NixeTubesShieldNCS314 ***@***.***>
Cc: Sapient Hetero ***@***.***>; Author ***@***.***>
Subject: Re: [afch/NixeTubesShieldNCS314] Is it possible to turn the bulbs off in software? (#17)
It was too simple! Setting LEpin LOW only stops the tubes from changing from what they are already displaying. However my original idea of using BL (the Blanking pin) by setting pinSHDN LOW does turn them off, and restoring pinSHDN to HIGH turns them back on again. 🙂
—
Reply to this email directly, [view it on GitHub](#17 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AJMYQI65Q3XXDB2K76J6YZ3WYWIDLANCNFSM4SHPIA3A).
You are receiving this because you authored the thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
By the way, I am using a combination Mega/ESP8266 board to control my Nixie Clock [https://www.amazon.com/gp/product/B07THDDFSJ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1. Instead of using the non-user-friendly buttons on the back of the clock to change settings, I run a webserver on the ESP8266 and control it via WiFi. |
Nice idea. I have played around with the ESP32Cam board which also runs a webserver to monitor the camera so I might explore this combined board when I have a bit of time. Still have to build a case for my clock. |
I'd like to integrate a PIR sensor with a NCS314 V2.2 in order to extend bulb life by turning them off when nobody is in the room to see them. Is there any way to do this in software?
The text was updated successfully, but these errors were encountered: