-
Notifications
You must be signed in to change notification settings - Fork 23
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
Second try :) #56
Comments
Hey! |
Thanks, that would be nice :) I live in France. |
A little update on my side. I did some reading this week-end and now I know how to read the octocoupler pinout and manage to use one for another simpler project. I did find out as well that without the resistor the octocoupler burn, so the resistor must be useful :) I just don't know how to calculate the needed value yet, so I just use the same as you. |
Hey! Jup that pretty much answers it. Looking at the datasheet we learn that pin 1 is marked by a shiny dot on the top of the chip ("Anode mark"). On my PCB it is marked by a rectangular pad. The resistor follows the standard rules for an in-series resistor for an LED. Seems like I went with a bigger resistor, which in this case does not hurt and is often good practice. Am I correct to assume that you are on a beginner level in electrical engineering?
And you definitely shouldn't! Please buy a ready to be used component as I did, or permanently power the D1 Mini with a separate USB power supply.
I did consider this a couple of times. We didn't feel the additional components and effort were justified. It's certainly possible to disconnect the buttons from the Senseo and directly to the ESP GPIO pins. One blocker today: The D1 Mini does not have enough GPIOs free to connect three buttons. Happy to send over a PCB if you carry the postal service fee. |
Yes, you are totally right :) I purchased a book recently and having a lot of fun! Hopefully, I should be soon able to calculate the right resistor value myself :)
I assumed the red wire on your picture are the 220v one, right? So you still have to solder your own cable (obviously bigger section) to the step-down PCB? Is that safe? I feel like the part where the red wire meet the step-down PCB is totally unprotected. On that same topic, if I understood correctly it's safe to have the ESP connected to the computer with the USB cable AND the Senseo operating on 220v at the same time? (Of course the Senseo cover should be put back in place or extra caution should be taken not to touch anything inside while it's powered on).
Oh, I didn't think about that :-/ I didn't open my Senseo yet, how much space do we have inside? Do you think a full-size esp 8266 would fit in or did you pick the mini because of the tight space?
I'll see how it goes with my test and I might ask you for one when I'm ready, thanks for offering. |
This is great. Carry on! 🎉
As you can see, I used T-tap connectors on the wire side: https://www.amazon.fr/120-pi%C3%A8ces-Connecteurs-%C3%A9lectriques-tap/dp/B077YB123S However, you might be right, the red wires are soldered on the PCB side. In this case it is totally fine: The consumption of the additional electronics is minimal, so is the power over the AC input of the power supply. No need to be scared by these steps, but cautious. Keep the machine disconnected; install T-taps and ensure proper soldering results; feed 5V wires out of the machine for testing; ensure that the power supply is properly fixed and protected inside the Senseo (I suggest to hot glue to the floor). Only after everything is installed and sealed away start your first testing and measure that stable 5V are supplied. As before: Do not connect AC power (Senseo and/or AD-DC power supply) and USB at the same time. This is first and foremost a safety precaution. The Senseo is not properly AC separated. Somewhere between the Senseo electronics, the AC-DC power supply and your laptop/PC you might encounter voltage/potential differences which can give you a scare, damage your ESP, or your Laptops USB port.
Not sure what that is but the component looks okay otherwise
If you really wanted to make this happen, you could work with pin A0, which is not actually used in conjunction with the TCRT5000. This looks like a nice explanation: https://electrocredible.com/multiple-buttons-on-one-analog-pin-arduino-adc |
This is the part that didn't make sense to me, I didn't realize that since the power supply draws very little power, there was no danger on the power supply PCB
This is brilliant! I love that idea :) So you don't use the analog output of the TCRT5000 even if it's wired up in your diagram into A0 and use only the digital output wired to D6? |
Correct: https://github.com/ThomDietrich/SenseoWifi/search?q=cupDetectorAnalogPin
The high voltage is still there and dangerous :) but the current flow over the solder points is small, hence you don't have to worry about heat damages |
Just a quick message to tell do that I flashed the firmware yesterday and I'm pretty impressed with the setup process. I know it kind of come for free with Homie, but it add a nice professional touch to the whole things :) In the meantime, I'm working on automatic Home assistant discovery. I have managed to publish the proper message with MQTT explorer, I just need to find a way to make the getMqttClient()->publish() method works now :) (for some reason it doesn't seem to be connected when the MQTT_READY event fire). |
Got it working, it wasn't a connection issue, it was just payload that was too big for async-mqtt-client (even if they were only 300 bytes). I had to bump async-mqtt-client to 0.9 to make it work. I hope it won't interfere with Homie usage of the lib, but so far so good. |
Interesting. Keep me updated on your journey! ;) |
I love EspHome, I started playing with it recently. So do you intend to write a "SenseoComponent" for EspHome? It sounds like a totally different project to me. And it means your project won't work anymore outside of Home Assistant which I don't care personally as I'm a huge fan of Home Assistant :) But it sounds a bit like a step back from the point of view of your project. Regarding Home Assistant Auto Discovery, I got it working for all the entities from your senseo_wifi.yaml with the right icon and everything. It's pretty straightforward actually. The nice thing about it is that it respects the name of the device you gave during the setup. Thanks to that you can easily configure more than one senseo (it should give you two sets of sensors). Does it make sense I create a pull request, or is it worthless since you are moving to a totally different direction? The only thing is that I didn't get a chance to test it yet on a "real" senseo, and since I changed async-mqtt-client version, it might have introduced some bugs, so I'll need further testing anyway. |
I finally reach the interesting point where I open my Quadrante open. I can understand why it's easier to let the button working as they are and just solder on the back. I still wan't to give my idea a try though and I'd like to plug myself between the male and female connector you can see on the picture below. For that I need to know the name of those kind of connectors to see what I can find on internet :) If by any chance you happen to know it, it would be very helpful |
Me again :) Go it working with a custom PCB in the middle and a bunch of Dupont cable, but I'm still interested in the name of the connector if you have it. I'm not sure the PCB will fit under the plastic cover. This kind of work, but the behavior is a bit erratic, so I could use some clarification/help on a few points :
Ps: on my breadboard I use a "regular" 8266, not a D1 mini, don't know if could have any impact. |
Hey,
No not really. I would just expose digial inputs and outputs as entities to Home Assistant, which HA can then work with based on automation rules as we already do. I would need to investigate how to best implement the LED and Senseo state machines, maybe a custom component is needed for that.
It still uses the same PCB and the same logic, just with a different software framework underneath. With ESPHome the project would indeed be more focused at HA, however ESPHome can be connected to all other systems via MQTT. We are not excluding anyone, technically.
Yes absolutely! Please do! I can test your PR with my working machine and feed back any issues I observe.
The LED times should always be accurate. If not, you are bound to experience issues. Enable
It was part of the machine code before but that wasn't dynamic enough. The new way is through the set of automations in Home Assistant, which work flawlessly. https://github.com/ThomDietrich/SenseoWifi/blob/master/home-assistant/senseo_wifi.yaml#L247
Didn't understand that.
There is a "debug" topic on MQTT.
Doesn't. It just wouldn't fit on my PCB design. |
A lot of progress has been made since my last post :) I prototyped the voltage divider to read all the buttons with A0, it turns out to be more complicated than expected because the switch share their ground wire with the LED but I managed to make it work and I intend to put that part of the circuit in the little PCB on my picture which might make it compatible with your PCB. As a nice addition, I gain control over the Senseo Led which allow me to handle custom blinking patterns that actually match the esp state machine. Now brewing is 2s on and 200ms off. I find out that not all Senseo are born equal. Mine doesn't have the feature that turn-on, warm up brew and turn off when you press the cup button. Well... it was before I took control over the input button :) Now it's handled by the esp firmware! Most of my weird behavior was caused by me sending command to senseo esp via MQTT while the Senseo wasn't plugged and then plugging it afterwards. It seems the FSM was totally desync after that. It shouldn't happen during normal operation and it is only possible because it's powered on USB for now. So what next for me?
I feel like doing something stupid like turn off the light of my kitchen when I press two buttons of my Senseo, just for the fun of it. But unfortunately the voltage divider doesn't give me different reading if I press more than one switch at the same time, if you have any tricks left in your bag concerning that, I'm interested :) |
Wow that's great progress! Congrats!! Voltage divider: It is possible to detect more than one button in parallel. The theory is that you can dimension your circuit to generate something like a binary encoding:
Value=5 --> Buttons 1 and 3 pressed The problem with this is the margin of error! You should open Excel and play around with some combinations of resistors to see how you might keep all relevant values reasonably apart from each other. Google for "resistor ladder binary" to learn more: https://www.best-microcontroller-projects.com/R-2R-ladder.html |
Bitfield with resistor!! :) Once again it's exactly what I was looking for, thanks a lot! |
Hey! I'm back :) After almost 2 years, I want to give it another try. Printing the PCB online was a bit daunting, so I want to give it a try with a protoboard. I do have a few questions though (forgive me for the dumb one)
The last thing is more of a suggestion. Have you considered to hack the buttons directly into the ESP to add nice behavior like:
The text was updated successfully, but these errors were encountered: