💬 Livolo 3 buttons US/AU switch adapter



  • @Nca78 - makes sense 🙂 When are you going to upload the gerber files?


  • Hardware Contributor

    @achurak1 said in 💬 Livolo 3 buttons US/AU switch adapter:

    @Nca78 - makes sense 🙂 When are you going to upload the gerber files?

    When I can confirm all problems are solved 😛
    Should not be too long I will send to Seeed tomorrow or Friday and use Fedex or DHL, their prototype PCB price is so insanely low now (4.9$ for up to 10*10cm) that from the 2nd PCB it's cheaper with them using DHL than with DirtyPCB 😮


  • Hardware Contributor

    I just posted new design files and gerber files (but please don't order now, I will receive PCBs only on Friday and then I need a few days before I can test them...

    I also put a bit of documentation but it still needs (a lot of) improvements 🙂



  • @Nca78 - Thanks for the update! Looks like shipping takes a lot of time even with the DHL delivery. Will be waiting for you to test and give us green light to order the PCBs 🙂


  • Hardware Contributor

    @achurak1 said in 💬 Livolo 3 buttons US/AU switch adapter:

    @Nca78 - Thanks for the update! Looks like shipping takes a lot of time even with the DHL delivery. Will be waiting for you to test and give us green light to order the PCBs 🙂

    I took a lot of time to finish all my other PCBs before sending to Seeed.
    Then they didn't like my panelized boards (they changed rules but didn't update their website) so I lost over a day to repost.
    Then they packed the boards at the end of last week just in time to go on holidays and DHL picked them up only yesterday 😞


  • Hardware Contributor

    And now blocked at customs and I have to deal with the insane local DHL customer service again...
    Last time I waste my money with DHL 😠



  • @Nca78 - I ordered my PCBs (not Livolo) around the same time you did using Hongkong post and they just arrived yesterday. Never had to deal with the customs...


  • Hardware Contributor

    @Nca78

    Oh man...I wanted things to come faster at my door like you did and in the end I had to pay 6 times!!! the price of the boards because of the customs, DHL fees and so on. But I learned from that and I'll NEVER EVER AGAIN go that way. That's just crazy.


  • Admin

    @mtiutiu, that's crazy.


  • Hardware Contributor

    @mtiutiu said in 💬 Livolo 3 buttons US/AU switch adapter:

    @Nca78

    Oh man...I wanted things to come faster at my door like you did and in the end I had to pay 6 times!!! the price of the boards because of the customs, DHL fees and so on. But I learned from that and I'll NEVER EVER AGAIN go that way. That's just crazy.

    I had many PCBs to order so it didn't reach those proportions: 39$ for PCBs, 30$ for shipping.
    Then 8$ of DHL fee and 8$ of VAT.
    That's too much shipment and customs fees for the time it took to get my order (over 2 weeks)

    @achurak1 last time I ordered with HK Post and I had an endless wait without tracking, over 1 month, so I decided to never use it again.


  • Hardware Contributor

    @achurak1 said in 💬 Livolo 3 buttons US/AU switch adapter:

    @Nca78 - makes sense 🙂 When are you going to upload the gerber files?

    Soldered a few components today, I will try to finish and start testing before the end of the week.
    0_1497360785601_IMAG1748_1.jpg



  • @Nca78 - great! By the way, will I be able to use it with my dimmable switches (even if I lose the dimming functionality) or do I need the non-dimmable version?


  • Hardware Contributor

    @achurak1 said in 💬 Livolo 3 buttons US/AU switch adapter:

    switches

    I'm not sure it will work with dimmers. I bought a dimmer version to have a look and there's another MCU on the "main" board. So I will need to see how the communicate to implement that on a new version.
    I will make the test with the dimmer version anyway, and tell you.



  • @Nca78 - thanks! I can order the non-dimmable versions, but would prefer to avoid this if possible.
    Is it necessary to use EIA3216 package for the tantalum capacitors or is it just something you've had handy and can be replaced with any other package (e.g. 0805 or 1206)?


  • Hardware Contributor

    I used this size to have some margin to put big tantalum capacitor if necessary. But you can use smaller size and ceramic capacitors.
    The only two that are mandatory are the radio and the input caps, other are just reserve capacitors to help the power supply. Not sure they are really necessary with nrf24 buy it would be a bit stupid to save 0.x$ and risk having an unstable board.



  • @Nca78 - great, thanks! I don't mind soldering all of them, just wasn't sure if I needed to buy the specific type/package. Is the voltage regulator (SOT23-3) only necessary if I want to encrypt the messages?


  • Hardware Contributor

    @achurak1 said in 💬 Livolo 3 buttons US/AU switch adapter:

    @Nca78 - great, thanks! I don't mind soldering all of them, just wasn't sure if I needed to buy the specific type/package. Is the voltage regulator (SOT23-3) only necessary if I want to encrypt the messages?

    It's the ATSHA204A chip, used to sign the messages (not encrypt them). So yes if you're not planning to sign the messages you don't need to solder it. You could also use software signing but at 1MHz it could be slow, I have never tested.


  • Hardware Contributor

    Found a bug 😞
    Small one, one connection was not good in the schema so the resistor of the "extra" led 3 has no ground connection and the led cannot be used.

    Everything runs on the bench (touch buttons, other leds, output pins for relays),
    I need to test in the wall switch now, but I'm afraid the sensitivity for the button below the radio (1) is still not good enough.


  • Hardware Contributor

    Not too bad ! I will still improve a bit the button at the bottom (behind the radio) because it's not perfect, but it's still usable as you can see in the video 🙂
    https://youtu.be/1LaFgjvSPj4



  • @Nca78 - great news indeed! So you think it's OK to order the PCBs? Did you fix the bug with the resistor or I should add the ground connection myself before ordering the PCBs?
    Did you test it with the dimmable switch by the way?


  • Hardware Contributor

    @achurak1 said in 💬 Livolo 3 buttons US/AU switch adapter:

    @Nca78 - great news indeed! So you think it's OK to order the PCBs? Did you fix the bug with the resistor or I should add the ground connection myself before ordering the PCBs?
    Did you test it with the dimmable switch by the way?

    I fixed but didn't publish. I'll reduce size of traces and pads of nrf24 to improve touch performance on the button below the radio. Sometimes (after long period without use) it doesn't react well and I have to use thumb to trigger it, I think because of the auto calibration of the TTP223, so I also have to test that with different caps to adjust sensitivity and see if it improves.
    I didn't test with dimmable switch yet, I'll try to do it on Monday.
    So my advice : do not order yet 😉


  • Hardware Contributor

    @achurak1 I have some good news and some bad news.

    The bad news first :

    • I decided to redo all the layout of the PCB, this is the only way to be sure to solve completely the touch problem
    • Related to this I have changed LED size to 0603, hope it's not a problem for you and you didn't order too many 0805 leds ? Not sure about the size of resistors and capacitors yet.
    • the main PCB of the dimmer switch cannot be triggered using the "relay" pins of the touch PCB. The layout and connections on the touch PCB are exactly the same for dimmer and relay switches to save money in production, but programming of the PIC is different and "relay" pins are not connected to the dimmer main PCB.

    The good news :

    • Layout will be much more clean with components properly aligned and oriented
    • I'm using 0603 LEDs so I can put them at the same position than original Livolo board and try to reuse the plastic diffusers
    • from what I see, the 2 PICs are using UART to communicate (RX->TX and TX->RX connections), but there's also a digital pin connected so I have to check how it is used. Maybe to wake up the PWM PIC on main PCB before passing it some commands. Anyway I have TX/RX pins around this side of the connector so I can connect them and manage the dimmers when I have figured out the protocol.


  • @Nca78 - only 500 pieces 🙂 That's OK though, they're cheap, I already ordered the 0603 ones, just hoping my soldering skills are going to be enough for that size. Let me know as soon as you decide on the res/cap packages. I have only 0805, but can order something else if needed.
    Thanks for keeping me in the loop and hope you will be able to crack that protocol!


  • Hardware Contributor

    @achurak1 I managed to keep everything else in the same size, that's more convenient for me to solder too 😄

    Nearly finished, I'll try to see tomorrow how the 2 boards discuss, then connect necessary digital pins and put back extra leds with the pins I have left.
    0_1497985334913_Board.png


  • Hardware Contributor

    Unfortunately it's not that easy to understand. After double checking I realized they connected TX to TX and RX to RX so it's not serial communication.
    I'm trying to check with logic analyser but I'm not very talented with that 😄


  • Hardware Contributor

    @Nca78 said in 💬 Livolo 3 buttons US/AU switch adapter:

    In the livolo EU board, the RX and TX pin are for the radio. It's the same PCB all the time, they just put or not the 433MHZ radio 😉


  • Hardware Contributor

    @tonnerre33 but they are connected to the PIC MCU on the main PCB, that would make no sense if those pins were used with the radio ?


  • Hardware Contributor

    And I have synchronized signals on the 3 pin too (TX, RX and RB4 pin). The TX and RX pins are obviously those used for communication as the signal on those pin always follow a level change on RB4 pin.

    0_1498056188460_analyzer.png


  • Hardware Contributor

    @Nca78 said in 💬 Livolo 3 buttons US/AU switch adapter:
    It's true. Can you take a picture of you pic mcu main board ? It's for compare with my EU board 😉


  • Hardware Contributor

    @tonnerre33 sure, here you are.

    Pins I'm checking with the logic analyser are connected to the PIC using the R1, R3, R4 200 Ohms resistors (top right of the PIC) they are the only ones I see connected to the PIC.
    0_1498114935822_IMAG1771.jpg


  • Hardware Contributor

    So maybe I will need help/advice from someone who has a bit of knowledge about this kind of data exchange between 2 processors, to see if it rings a bell for them... @scalz maybe (sorry to bother you :))

    Channel 2 is connected to RA4 (touch PCB PIC) and RB4 (main PCB PIC). It's obviously a clock signal, at 25Hz, 50% duty cycle. Each edge (raising and falling) generates pulses on the 2 other pins.
    0_1498115333868_analyser_0_Clock.png

    Channel 0 is connected to pin RB7/TX/CK.
    Channel 1 is connected to pin RB5/AN11/RX/DT
    What I see is this base signal, with some pulse that are always repeated every 20ms:

    • edge on C2 triggers pulses on C0 and C1 (both at the same time) with a 12us delay. I call them "start" pulses later.
    • C1 pulse lasts 16us, it's falling edge triggers a falling edge on C0 with 10us delay
    • after 260us there is another pulse on C1, triggering another pulse on C0 with a 10us delay. I call them "end" pulses later.
    • C1 pulse last 40us, C0 pulse 152us
    • duration between start and end pulses is always the same (468us)

    0_1498118808938_analyser_1_NoPulse.png

    Adding to that base signal, I have some "extra" pulses that appear between the start/end pulses, in 3 different

    • pulse on C1 208us after start pulse ,
    • pulse on C1 208us after start pulse, followed 10us later by another pulse on C0 with 10us delay
    • pulso on C1 156us after start pulse, no pulse on C1. I've seen this case only once. Signal repeated 7 times then

    I have not seen the case where a pulse on C1 happens after a pulse on C0, but maybe it happened and I just missed it as it's pretty hard to search in the logic software for this case ...

    As the pulses always have the same duration, my stupid guess is middle pulse between start end end pulse = 1, no middle pulse = 0. Plausible ? Not ? Anything specific I should check ?
    Any suggestion is welcome 🙂

    0_1498119263609_analyser_3_BPulse.png
    0_1498119271061_analyser_4_2Pulse.png
    0_1498119252439_analyser_2_TPulse.png


  • Hardware Contributor

    @achurak1 I'll give up on the dimmer at the moment as I need to spend more time on my NModule projects.
    I kept TX and RX pins connected as they can be used as normal digital pins, and I connected D3 to what I see is the clock pin so it should be possible to use dimmers in the future.
    I have 3 extra LEDs in place but #4 is challenging to route so maybe I will not put it.
    I'm thinking about a version with ws2812b too as it would be much more convenient than those extra LEDs, both to route and to use.


  • Hardware Contributor

    @Nca78
    sorry i miss time to take a look at your project actually. will do it later if i can, as it's always easier with the hardware for debugging this. I don't have this livolo version, only a one button version, but i'm still wondering how much it costs to use a Livolo+custom made mysensors board VS redesigning completely one


  • Hardware Contributor

    @scalz said in 💬 Livolo 3 buttons US/AU switch adapter:

    @Nca78
    sorry i miss time to take a look at your project actually. will do it later if i can, as it's always easier with the hardware for debugging this. I don't have this livolo version, only a one button version, but i'm still wondering how much it costs to use a Livolo+custom made mysensors board VS redesigning completely one

    Thank you but I just wanted to know if you had seen something like that before ? Any lead to protocole/example/anything that could make me on the right track (or not, as long as I learn something I won't complain) is welcome 🙂

    For redesigning one, well this kind of power supply using live wire only is beyond my knowledge at the moment, and I can't pull neutral wire to have it in my switches. For around 20€ delivered for a full Livolo switch it costs 25-30€ to have a MySensors version, I'm not sure there's much money to save



  • @Nca78 - Hi! Haven't heard from your for quite some time 🙂 Any progress with this? Were you able to resolve the poor sensitivity issues?


  • Hardware Contributor

    @achurak1 said in 💬 Livolo 3 buttons US/AU switch adapter:

    @Nca78 - Hi! Haven't heard from your for quite some time 🙂 Any progress with this? Were you able to resolve the poor sensitivity issues?

    Hello !
    Sorry I'm testing NModule and all shields at the moment.
    Then I'll work on this again and make some PCBs.



  • @Nca78 - I'm not sure if you've seen this or not, but someone seems to have managed to crack the dimmer protocol in this thread: https://forum.mysensors.org/topic/2775/livolo-glass-panel-touch-light-wall-switch-arduino-433mhz


  • Hardware Contributor

    @achurak1 yes I have seen, I will have a look again 🙂



  • @Nca78, yes very interesting in Livolo hacking in order to get feedback status that is not available by default. Any progress on your end?


  • Hardware Contributor

    @DenisPac said in 💬 Livolo 3 buttons US/AU switch adapter:

    Any progress on your end?

    Not yet, I'm still testing other boards, then I will fix a batch of PCBs including this one and order.
    Not sure if I keep the many leds or if I try to put a ws2812b though...


  • Hardware Contributor

    Hello, I have finally finished a new version of this board, I will double check tomorrow and order PCB before end of week.

    Changes :

    • radio moved between 2 buttons, it should fix the touch sensing problem on the third button
    • touch pads improved using restrict layers to keep constant distance between touch electrode and ground planes, it should give much more margin to set sensitivity of each pad with the Cs capacitors of the TTP223
    • added a ws2812B for middle button instead of the "extra leds". I'm not 100% sure that it will work...
    • rearranged all components on the PCB, so they are properly aligned instead of the mess it was before

  • Hardware Contributor

    I assembled a new board and quickly tested on a switch. There's a software bug that prevents the relays to switch and I'm out of SMD leds, so it was a bit difficult to test efficiently, but I could check on domoticz if buttons were activated, good news is it works for the 3 buttons so I can keep this design.
    I put the SK6812 on central button and it can run but unfortunately it's too thick so light is not visible when glass cover is on 😞 Meaning I'll have to make a new version with SK6812mini which is thinner (less than 1mm against 1.6), or use a RGB side led which is not a convenient solution as atmega is missing pins and PWM capabilities. So I guess I'll try the mini version first to try to keep the component count as low as possible.

    Tomorrow I'll steak some leds from another project and make more tests for touch to make sure the problem on third button is solved.

    (meanwhile the old version PCB is great for one button switches, I installed one 2 months ago and it's been running perfectly, 100% instant response by touch or via controller).



  • I'm very interested in this project. I suppose it isn't too hard for me to swap the microcontrollers to something like an ESP or Photon? I just want WIFI capability 🙂 I never bought anything on openhardware / mysensors before, does this come with all parts soldered (plug and play), or will I have to assemble?

    Sorry for all the questions!! Thanks


  • Hardware Contributor

    @htko89 hello !
    No one openhardware you only have the PCBs, it's possible to link to an eBay shop to sell fully assembled PCBs buy I'm not planning to do it.
    You can't replace with a wifi board/chip as you can't draw enough power from thr "main" board.
    Your choices are:

    • use MySensors and control using WiFi through the smart home controller
    • replace main board with a transformer that will provide enough power. But you will need live+neutral
    • buy a sonoff wall switch, it's cheap but you will also need live and neutral wires

    And don't buy on openhardware now it's not a finished project and I will changed it some more...



  • Hey, I was just wondering if you finished this project?


  • Hardware Contributor

    @marcusakamg7 said in 💬 Livolo 3 buttons US/AU switch adapter:

    Hey, I was just wondering if you finished this project?

    Hello, I made two, one with one button, one with three. The one with three buttons stopped running after a power outage because of radio failure, I'm not sure what happened but I had some problems with radios on other boards so maybe a batch with faulty components. But it could be related to the board using too much current and heating up too much, or overvoltage when power came back. Switch with one button is still running perfectly but it's used much less.

    I have bought new radios and will provably assemble new boards soon, but it's not my priority project at the moment.



  • is it possible to get the file for the one button switch, i would like to order the pcb and try it out.


  • Hardware Contributor

    @marcusakamg7 it is the same PCB, as explained in the first line of the description I just put the touch sensor and led for the middle button.
    Design is pretty old here, it will work for one button but touch sensitivity will be bad for the third button, so be aware that if you order this PCB you won't be able to make a fully functional 3 buttons version.

    I didn't see much demand for this project so I put it a bit aside, but if you really want it I can move it up the priority list and make + test the lastest version of PCB this month.



  • I tried to order on OSH Park and it says your brd file is owned by another user and have not been shared.


  • Hardware Contributor

    @marcusakamg7 that's strange, I never ordered this board on OSHPark, I will check later.



Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts