realA10001986 / Time-Circuits-Display

Firmware for CircuitSetup's Time Circuits Display kit, known from the Delorean Time Machine
https://circuitsetup.us/product/complete-time-circuits-display-kit/
Other
13 stars 2 forks source link

Schematic #1

Closed Fabiobttf closed 1 year ago

Fabiobttf commented 1 year ago

is it possible to have a schematic, how to connect light and temperature sensor ? e.g. for TSL2561: scl to i2c scl ? sda to i2c sda ? int not connected ? no resistor or capacitor?

in the code where I can change the address for various type of compatible sensor ? can i use sht41 instead of sht41, it have yhe same address ?

can i connect 2 sensor in the same I2c connector ?

thanks

realA10001986 commented 1 year ago

You can't wire the sensor(s) directly to the TC control board, it needs (at least) a dc converter. The TCD control board delivers 5V, most sensors only work with up to 3.3V. This goes for both the TSL2561 as well as the SHT4x series.

If you use eg Adafruit TSL2561 (which I used for testing, https://www.adafruit.com/product/439 ), the wiring is pretty straight forward:

Sensor: Board: VIN -> 5V GND-> GND SDA -> SDA SCL -> SCL

The SHT41 has the same i2c address like the SHT40 (0x44), no changes required. But again, the sensor needs a power converter. I used the Adafruit breakout: https://www.adafruit.com/product/4885

I am not the electronics guy, I only used readily made Adafruit and Seeed stuff for testing.

Yes, you can connect two sensors to the same connector, if their cables are reasonably short (20cm max in my experience). Optimally, the sensors should be daisy changed, i2c is a "bus" after all. (But it also works if they are in parallel, I never had any issues with such a config)

Fabiobttf commented 1 year ago

Thanks for reply I m electronic guy(analogic) but not a programmer, not problem to 5V goes to 3,3V thanks for suggesting

My problem is connecting logical port (sda scl) and if I can use the same i2c port for both sensor

Another thing I don't know where in the program change parameters as address, lux limit or temperature adjustment/correction

So thanks for your good job with this new firmware with that functionality

realA10001986 commented 1 year ago

The addresses are fixed in the code, and most sensors only have one address. Also, addresses must be unique on the bus, and there are already many devices on this bus (RTC, displays, i2c-extender). I would not recommend to change this.

The other parameters are in the Config Portal. You need to connect your TCD to your WiFi network, the README.md file is really very detailed on this.

realA10001986 commented 1 year ago

PS from the non-electronics guy: Beware that the bus signals (SDA, SCL) must also be converted!

realA10001986 commented 1 year ago

I added some wiring information:

https://github.com/realA10001986/Time-Circuits-Display/blob/main/README.md#appendix-b-sensor-wiring

Fabiobttf commented 1 year ago

thanks again but what do you mean he bus signals (SDA, SCL) must also be converted! converted in voltage to 5V to 3,3V ?

realA10001986 commented 1 year ago

yes

Fabiobttf commented 1 year ago

Hi

I upload your FW and successfully connect light sensor and temperature sensor; one per time at the moment

TSL2561 Light sensor work good

BH1750 not wirk is correct to use address 0x23 ?

in your FW there is no sound when press the button on keyboard for e.g. set the time travel is it normal ?

thanks

Fabio

Il 11/01/2023 14:09 A10001986 @.***> ha scritto:

yes

— Reply to this email directly, view it on GitHub https://github.com/realA10001986/Time-Circuits-Display/issues/1#issuecomment-1378725874, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5FYV6XSW3FLQ7ZMWN2P4STWR2WG7ANCNFSM6AAAAAATXDFWDM. You are receiving this because you authored the thread. https://github.com/notifications/beacon/A5FYV6Q7U3D3ESR2PFMDDNLWR2WG7A5CNFSM6AAAAAATXDFWDOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSSFWX7E.gifMessage ID: @.***>

realA10001986 commented 1 year ago

Address 0x23 is correct. Perhaps you accidentally set it to 0x5c (which is the only other address the chips knows)? Edit: Did you use an Adafruit/Seeed/xxx break-out board, or some self-made PCB? If the latter, did you read the data sheet's sections about "Application circuit example"?

As for the other issues, please read the documentation.

/Thomas

realA10001986 commented 1 year ago

Just checked, my BH1750 is working fine with current firmware.

realA10001986 commented 1 year ago

Another idea regarding the light sensor: Did you perhaps switch night-mode on or off manually? This pauses the sensor control for 30 minutes.

Is the sensor detected? Is there light sensor data in the keypad menu's "sensors" menu item?

Fabiobttf commented 1 year ago

Thank you for the patience to help me;

now its working, it was a bad solder in chinese circuit;

I red all guides, but i don't find why audio keypad not working (due also of my bad english);

Only DTMF tone doesn't work all other sounds works, also special custom sound as key3.mp3 and key6.mp3;

other strange thing , when a push zero to start time travel the display normally "crash" but i remember in the red clock (destination time) appear "malfunction",now this sign(malfunction) not appear

Il 20/01/2023 23:37 A10001986 @.***> ha scritto:

Another idea regarding the light sensor: Did you perhaps switch night-mode on or off manually? This pauses the sensor control for 30 minutes.

Is the sensor detected? Is there light sensor data in the keypad menu's "sensors" menu item?

— Reply to this email directly, view it on GitHub https://github.com/realA10001986/Time-Circuits-Display/issues/1#issuecomment-1399034672, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5FYV6QIGV3RWDEVHPGSM4LWTMHSXANCNFSM6AAAAAATXDFWDM. You are receiving this because you authored the thread. https://github.com/notifications/beacon/A5FYV6TBIUBPDA4SQGOTBQ3WTMHSXA5CNFSM6AAAAAATXDFWDOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSTMOJTA.gifMessage ID: @.***>

realA10001986 commented 1 year ago

Did you properly install the audio files? See "Audio file installation". The DTMF tones are not played unless properly installed.

The tt sequence was changed in order to avoid the red display to fail. The word "malfunction" was part of the sequence and this was changed because people thought it was an actual malfunction.

Happy to hear the the light sensor works!

Fabiobttf commented 1 year ago

I used DTMF sounds in SD card from original firmware, I'll try to change with your DTMF Files;

I'm sorry for the sequence changed I liked the word "Malfunction" ;) in the sequence;

I connected both 2 sensors (light and temperature) and works good;

light sensor works also when the temperature is display, great scott this is fantastic;

I write that strange problem for other people that wants use sensor light:

BH1750 works good;

TSL2561have problem with alogen lamps: sign always -1 Lux, with other lamps (incandescent lamp) work good and lux changed according to intensity of light.

a little difference with original FW (not a problem):

wi fi connection takes more times to connect and original FW after connect open automatically the browser, with your FW needs to open manually the browser (192.168.4.1) this is not a problem.

Il 21/01/2023 00:11 A10001986 @.***> ha scritto:

Did you properly install the audio files? See "Audio file installation". The DTMF tones are not played unless properly installed.

The tt sequence was changed in order to avoid the red display to fail. The word "malfunction" was part of the sequence and this was changed because people thought it was an actual malfunction.

Happy to hear the the light sensor works!

— Reply to this email directly, view it on GitHub https://github.com/realA10001986/Time-Circuits-Display/issues/1#issuecomment-1399059313, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5FYV6TYD4X7JHGKTNCRTMDWTMLSTANCNFSM6AAAAAATXDFWDM. You are receiving this because you authored the thread. https://github.com/notifications/beacon/A5FYV6R7F2XWDMAFSZUAJYTWTMLSTA5CNFSM6AAAAAATXDFWDOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSTMPZXC.gifMessage ID: @.***>

realA10001986 commented 1 year ago

You need to install the default audio files on the device. Copy the contents of sound-pack-xxxx on an SD card, reboot the clock with that SD in the slot, and either

Ad light sensor: Interesting, I don't have any halogen lamps here any more. No idea why that happens. I only know that if too much infrared is involved (for example if there is some IR camera around), the sensors don't give proper lux values. This goes for all sensors except the BH1750.

Can you tell me about the WiFi issue? What firmware did you use before mine? Was that some 2.x version from CircuitSetup or the old 1.0?

Also, as soon as the clock is connected to a WiFi network, the IP is no longer 192.168.4.1, so I do not understand what behavior you are describing or expecting :(

realA10001986 commented 1 year ago

PS: It light sensor issue is not really a problem:

Lux -1 means the clock assumes a sensor overload by (too much) light. So it will not go into night-mode!

The sensor is not there to measure lux, it is there to switch between night-mode and non-night-mode ;)

realA10001986 commented 1 year ago

PPS: You don't need to enter IP addresses to connect to the Config portal any more. Just go to http://timecircuits.local if your computer supports Bonjour or mDNS. You can change that "timecircuits"-part in the Config Portal ("hostname").

Fabiobttf commented 1 year ago

Ok I try to copy the audio files to the internal memory Strange all other audio work and only audio dtmf not working

Thanks for suggestions

Inviato da Libero Mail

Fabiobttf commented 1 year ago

Yes not real problem I used lux measurements to set the lux limit for trigger day or night

Inviato da Libero Mail

Fabiobttf commented 1 year ago

I connected tcd directly to WI fi not with router Connected directly wi fi to TCD-AP both with pc(win10) and smartphone (Android)

With original fw after connection a pop up appear to open the browser

With your firmware I have not a pop up just open browser manually and digit 192.168.4.1 to connect

I tried in browser set http://timecircuit.local but doesn t work Not a problem I use IP address, but respect original fw seems more slowly and instable to connect. So I enjoy the same your FW because is very beautiful and usable You make a great job

Inviato da Libero Mail

realA10001986 commented 1 year ago

Ah I know what the reason is for the WiFi issue is. The older FW had the "captive portal" enabled, but that prohibited using a domain name, because it always redirected to the numeric IP, and made mDNS (and using a domain name) impossible. So I disabled it.

What kind of device are you connecting from? Phone? Computer? What OS?

mDNS (Bonjour) is supported on MacOS/iOS since 2002, on Windows only since Win 10 (with some service pack). Maybe it needs to be enabled somewhere. I don't use Windows, so I really don't know.

I can't take credit for WiFi connection quality, that is some external library maintained by someone else.

Overall I am happy that you are happy ;)

Fabiobttf commented 1 year ago

PC Windows 10

Smartphone Android 13

So I think have a problem with memory card, tried 2 different memory card but i can't copy files (no menu appear)

wiyh original FW I can do it;

I try to set 4Mhz and remove the file "TCD_def_snd.txt", but nothing

Other strange things without memory card I have no one sound (but if I update your last FW (20th january 2023) no sound without sound card

the sound is integral part of the firmware and stored in the device's flash memory I red, so after update i think to have original sound without SD

Maybe I have a problem with some malfunction of ESP32 memory, If i want to buy a new esp32 which version is correct ?

https://www.amazon.it/AZDelivery-NodeMCU-Development-Arduino-gratuito/dp/B071P98VTG/ref=sr_1_1_sspa?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=1QVU3GM6ZNXPM&keywords=esp32&qid=1674305673&sprefix=esp32%2Caps%2C99&sr=8-1-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1&smid=A1X7QLRQH87QA3

with CP2102 or CH340 ?

Il 21/01/2023 12:07 A10001986 @.***> ha scritto:

Ah I know what the reason is for the WiFi issue is. The older FW had the "captive portal" enabled, but that prohibited using a domain name, because it always redirected to the numeric IP, and made mDNS (and using a domain name) impossible. So I disabled it.

What kind of device are you connecting from? Phone? Computer? What OS?

mDNS (Bonjour) is supported on MacOS/iOS since 2002, on Windows only since Win 10 (with some service pack). Maybe it needs to be enabled somewhere. I don't use Windows, so I really don't know.

I can't take credit for WiFi connection quality, that is some external library maintained by someone else.

Overall I am happy that you are happy ;)

— Reply to this email directly, view it on GitHub https://github.com/realA10001986/Time-Circuits-Display/issues/1#issuecomment-1399229988, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5FYV6RQBN6TLODUU72F4UTWTO7QNANCNFSM6AAAAAATXDFWDM. You are receiving this because you authored the thread. https://github.com/notifications/beacon/A5FYV6SSLIUZXGGXUEI7PS3WTO7QNA5CNFSM6AAAAAATXDFWDOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSTM2HCI.gifMessage ID: @.***>

realA10001986 commented 1 year ago

If you use my firmware, you need to use my audio files. The firmware won't accept the sound files from CircuitSetup.

If you have sound with the SD card, and no sound without SD card, it means the SD card works.

Your ESP32 works fine, no need to buy a new one.

realA10001986 commented 1 year ago

Also, can you please tell me what the "original" firmware was, 2.x from CircuitSetup, or the very old 1.x? If you can't tell by the number: Was there a keypad menu in the "original" version? If not, it was 1.0

realA10001986 commented 1 year ago

PS: The boards on Amazon are the wrong ones. You need "NodeMCU ESP32-S" boards, the ones you chose won't fit (they are wider).

Fabiobttf commented 1 year ago

If you use my firmware, you need to use my audio files. The firmware won't accept the sound files from CircuitSetup.

If you have sound with the SD card, and no sound without SD card, it means the SD card works.

Your ESP32 works fine, no need to buy a new one.

Works !! thank you very much to spend your time to help me to find a solution,

I thought the audio files is the same, checked the dimension (5kb) and name and i found equal In the circuit setup FW in files detail there is your name (Artist) for some sound and so I think the same

Fabiobttf commented 1 year ago

Also, can you please tell me what the "original" firmware was, 2.x from CircuitSetup, or the very old 1.x? If you can't tell by the number: Was there a keypad menu in the "original" version? If not, it was 1.0

I used 2.2.0 and 2.4.0

and your last FW with new function countdown, tested and OK

realA10001986 commented 1 year ago

That's nice to hear!

I just added a notice to the documentation about mixing my and CircuitSetup's audio files.

Also:

I updated the sound-pack yesterday, so please use this new version, if you use yesterday's or today's version of the firmware. The "timer" sound was added and the "alarm" was re-done.

The firmware itself got another update just a few minutes ago, with a new way to install the audio files: After power-up, you are asked if you want to install the files.

No need to go into the keypad menu or the Config Portal to start installation.

realA10001986 commented 1 year ago

OK, you wrote that while I was typing ;) So you are up-to-date anyway.

Fabiobttf commented 1 year ago

just try new firmware now and work good; the audio files at the moment installing at first power up In the follow power up not appear this function, i think is correct in this way in the menu now there isn't "installing audio file"

Fabiobttf commented 1 year ago

For curiosity, if it possible to know, wich difference between sound DTMF.mp3 (Circuit setup and yours)?

realA10001986 commented 1 year ago

That's all correct.

realA10001986 commented 1 year ago

The sounds are mostly identical. However, the people at CircuitSetup wanted to keep their "enter" and "startup" sound. These two are different in length and timing, so it is not only a matter of the sound file, but also the timing in the firmware.

Fabiobttf commented 1 year ago

Thanks for the explanation

Inviato da Libero Mail

realA10001986 commented 1 year ago

Now I am curious:

1) What version of Windows 10 are you using? (they seem to use 4-digit build-numbers, like 1511 or 1703 etc)

2) Does the Android 13 phone connect when using "http://timecircuits.local" (or the hostname you configured in the config portal) in the browser? Android 13 should be able to do that, from what I read. Edit: Since a system update from Nov 2021.

Fabiobttf commented 1 year ago

Widows 10 Windows 10 Home 22H2: I connected both with "http://timecircuits.local/" or 19.168.4.1 but connection is not stable frequently disconnect and connect (with Circuitsetup FW is more stable)

Android 13: Connection is stable using samsung browser I connected only with IP 192.168.4.1, but not with http://timecircuits.local/ using chrome I connected also using http://timecircuits.local/

let me ask if you need more experiment

realA10001986 commented 1 year ago

Thanks. So Android 13 really supports it, that's good. (No surprise that the Samsung browser does not, it probably hasn't been updated, unlike Chrome and the OS core responsible for mDNS.)

The "original" firmware (which was also written by me, as were all 2.x versions) only used a previous version of the WiFi library, but that does not affect connection stability. The changes were only with regard to the Config Portal and some other minor internal stuff.

The major difference between my compilation and CircuitSetup's is that I using an older version of the ground layer (esp32-arduino), so that might have an effect. Since it is absolutely stable on my setups, I will not upgrade anytime soon. esp32-arduino 2.x has numerous issues and IMHO is not to be considered "production ready".

However, I never experienced any disconnects, neither in access point mode (which is what you are using), nor when the clock is connected to the WiFi network. I have one clock here (the wall clock) which has been connected since November 2022 without the slightest problem.