-
Notifications
You must be signed in to change notification settings - Fork 2
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
Hardware different on non-BT model CC-RT-N-EQ3 #1
Comments
Hey Christian, a few other people already mailed me and confirmed that the pinout of the non-BT version and the display are different. I bought a non-BT one as well to check this issue. Regards |
I finished the address picking and got a nice clean display now. Problem with the bar graph was the PM2 (0x5406) which was set to 0x03 on the BT version and has to be set to 0x7f for this (main.c:99). I think this could be a base for some sort of update. |
Hey that's awesome dude! Good work! If you can put this into a file like the one for the other display, we can merge that into here ^^ |
Sure, glad I can help. ^^ The segments for the pixels at 10:80, 10:10, 10:02 and 0f:40 are separate and had to be added to display numbers and letters with the "-" element right. At that point I also added the vertical center line and the "R" slash, so now I have segments A-J. One last open change is the "void Disp_Bargraph(uint32_t dwNumber)" block. When I have that finished, I'll upload it here. |
Is it possible that the other pins are different, too? My measures gave me for (resistors ignored): Button1: PA3 (MP1) Could you please check this with yours? Best Regards Edit: button3, rotary encoder and crystal are the same, as I can see from your cube file on youtube. The buttons 1 and 2 are on the pins that you use for USART1_TX/RX ... is that a problem for serial communication? The ADC for the motor and temperature_in have switched positions. |
Hi, yeah the layouts of the BT and non-BT version are completely different. To use the UART, you'll need to reroute the buttons to other pins of the STM8L. For the interrupt as well, because the device supports pin-interrupts only on specific pins afaik. Looks like the firmware needs to be completely redone for the non-BT version. Oh lord -.- |
Here is mine: There are no free pins left for serial :( with the original implementation: I think about putting the 4 motor drivers togehter on 2 pins, as two of them are always switched sync. Does that make sense? Then I could use the free pins for the buttons 1 & 2.
Yes, thats what I thought, too. |
Hi there. For now I've managed to get the calibration routine working. The ADC treshold of 2025 was too low to be reached. At end position closed it is 2033 and opened it reads 2037. Running is between 2044 closing and 2046 opening. While stopped it reads 19. Values were taken without attaching the device to a heater. I don't know yet if this is another circuit difference, but anyway this issue is way more complicated than just the display. My next steps are to figure out if the motor can be driven by two instead of four gpio pins. If this works, I'll put the two buttons on the free pins and re-enable the serial on the old button pins. Final problem then will then be the interrupt. Hopefully the motor ADC can somehow be pulled below the 19 to fire that. Any thoughts on this? Considering the necessary adaptions this is really far from beeing compatible. For me this is now some "proof of concept" thing. I'll keep you updated here if you like. If not, feel free to close this issue as "wontfix", I won't mind. Regards |
The motor can be driven by two gpio pins, here is how I did it: I cut the traces from PE6 (T2/R11), PE7 (T1/R7) and PC4 (T3/R6). Then I made a connection from the PC4 side to the T2 and T1 traces. Next the T3/R6 end was bridged to the T4/R12 trace. The code was adapted to use only the PC4 and PC7 gpio pins. It works exactly like before the mod, the ADC values are the same, too. I moved on to rewire the buttons 1/MP1 to PE6 and 2/MP2 to PE7, freeing the PA2 and PA3 gpio pins for serial. Then I re-enabled the serial interface, which I commented out before. So far so good. Maybe the image helps to understand the mod. |
The serial is connected to PA2 > TX and PA3 > RX (plus a gnd wire) and for now is confirmed working for TX. The RX is only triggered by an ext.int in the code and I still lack one gpio for this, so I can't test this right now. Considering the process made I expect this to work as well. To get this working I think about changing the separate ext.int to something else. In one of my arduino ESP-01 projects I talk serial to an external module. The RX is pulled low while communicating, so maybe a function for recieving serial data could be triggered from this. I use such a function to recieve bytes until a number of bytes or e.g. a '\n' char is received as part of the protocol. Then a crc check is performed and if successful, the received data gets processed. If the crc check fails or a timeout occurs, the reception has failed and nothing happens. As long as nothing is received, no cycles are required. Could this be a way to implentment it in your project? |
One last problem from the beginning of this project also remained. The buttons 1 and 2 don't work. Even after changing the connection and code the problem persists. It looks like I miss some configuration spot for this, could you please help me out here? I've changed:
I've tried to switch the order of the second block to match the first, but nothing changed. in fx UI_Buttons_Read(void)
in file user_interface.h I found this block, which I don't undesrstand yet:
|
Hey man, sorry for my late delay, I'm not really in the mood for my smart home stuff currently ^^" I'm very impressed about your progress on the non-bt version! Looks like you figured a lot of stuff out already! But lemme tell you about my honest thoughts about this: The bt and non-bt version seem to have huge differences. There are a lot of hardware modifications necessary to make the non-bt one work with a co-processor. I think the modification in the bt-version (3 wires) is already challenging for a lot of people and the price difference of ~5$ isn't worth the effort to modify it as hard as you describe. So I think I wanna leave my code to work with the bt-version only. You can make your own repository and you can use and modify my code to match the non-bt one. I can link your repo into the README of my project and vice versa if you like. The button-defines you mention are just bitcoded aliases I used as parameters for my UI_Buttons_Get() function. I could've also used an enum for that. |
Hi there, first of all, you've made a real nice job with this device so far, and I'm confident it's gonna be way better than the factory version when you're done with it! I highly appreciate your work because based on it I was able to get things working for me. Big thanks! Yes, it was a quite tough piece of work to sort the pieces for the no-BT version. o.o' In the meantime you've taken a way (thread) that I can't follow atm, reason is just the lack of hardware ^^. At the current point of development the device stays on "Init" and doesn't move anywhere, waiting for some thread stuff to happen. I've thougt about your idea to make a seperate repository for the no-BT version, but for now decided to go another way. I want the thermostat device to be less advanced and complex. Just some "actor" device with a direct human interface and an ESP-01 in the back, which handles the communication via wifi or esp-direct. A repository for a real sophisticated firmware has to be groomed and kept up-to-date to be useful, and I don't think I can handle that for now. To get more into the mcu development I'm giving a try to a start from scratch, using the StdPeriph_Driver lib and the display driver you prepared. If this leads somewhere, I'm gonne make a repo for it. Until then I'll keep an eye on your project and hope I can contribute some useful stuff one day :) Regards |
@ceekay1 Seeing I have a bunch of these non-bt units lyin' around I am really curious about any progress you've made on your project. Cannot see any public gits from you, so I took the liberty of using this topic to inquire about it :) |
I am also interested in your code @ceekay1 I plan to abandon two of the buttons in favour of a serial port, the only controls I need are rotary for temp settings and push button for a boost. I think my mods would simpler perhaps |
Hi there. I've managed to get the build environment running. Then I flashed the firmware built from the unchanged code to the device. As you mentioned in a video, the display driver settings may vary between the BT and non-BT models. For me it looks like this is the case. I made a time lapse gif:
Every change takes about 15 seconds in real time. This tells me the firmware is somehow working right. Assuming an identic micro controller and display type, there may be just a shift in registers between the two models. What do you think?
As you went through this process already, what would be a good starting point to change things?
Regards Christian
The text was updated successfully, but these errors were encountered: