Author Topic: Where to start trying to decode a data stream  (Read 15326 times)

0 Members and 1 Guest are viewing this topic.

Offline elninoTopic starter

  • Contributor
  • Posts: 16
  • Country: au
Re: Where to start trying to decode a data stream
« Reply #25 on: May 14, 2017, 05:59:36 am »
Ok, cool.  I have a logic level converter sitting between the 12v signal and the arduino so if I used this circuit on the low side of that, it might just be a solution then.  The logic level converter I have is a Jaycar/Duinotech one which I believe is uni-directional so it could just work but this is where my knowledge is limiting me.  I try to learn as much as I can but my head gets around programming better than it does the more complex electronic stuff.

I'm working on a Schematic for the existing controller but this is limited because I can't find definitive information on the little SOT-23 devices.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12857
Re: Where to start trying to decode a data stream
« Reply #26 on: May 14, 2017, 08:33:26 am »
Which logic level converter?  Part number, order code or link please.
 

Offline elninoTopic starter

  • Contributor
  • Posts: 16
  • Country: au
Re: Where to start trying to decode a data stream
« Reply #27 on: May 14, 2017, 08:44:14 am »
I'm currently using one of these - https://www.jaycar.com.au/arduino-compatible-logic-level-converter-module/p/XC4486

I've managed to map out the circuit as best I could - Attached.  However, i am perplexed by the capacitors C08 and C07.  I have tripple checked that is correct. Edit - Somehow that junction between the two capacitors is grounded - Makes a lot more sense now.  Updated schematic.

Thanks again Ian, your help has been awesome.
« Last Edit: May 14, 2017, 09:17:18 am by elnino »
 

Offline elninoTopic starter

  • Contributor
  • Posts: 16
  • Country: au
Re: Where to start trying to decode a data stream
« Reply #28 on: May 14, 2017, 11:39:32 am »
I also found the transistors are KRC102S and KRA102S which are a switching type transistor but with built in bias resistors.

Your input would be greatly appreciated if you know of a way I can simplify this down with more common parts (SMD is fine).
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12857
Re: Where to start trying to decode a data stream
« Reply #29 on: May 14, 2017, 12:31:56 pm »
I thought they must be 'digital' transistors.
Here's what it looks like in the LTspice simulator.  I'm guessing the capacitor values and the Zener voltage.


Depending on the low state current required its probably easiest to use a dual comparator (with open collector outputs):

which is good for about 15mA (20mA abs. max.),

Another possibility is to use a LIN transceiver, for a single chip, minimal external components solution.

You can actually get away with using the Jaycar level translator bidirectionally, (Just connect the Arduino's software serial TX pin to the RX pin via a small Schottky diode, cathode to TX so it can only pull the combined TX/RX line low, but the problem is the Arduino's logic low threshold is then used for receive so if the bus doesn't pull down to within a volt or so of ground you dont get valid levels, and the Arduino TX pin has to be able to sink the whole bus pulloup current.  I wouldn't recommend it - if anything goes wrong, your Arduino will let the holy smoke out.
 
The following users thanked this post: NivagSwerdna

Offline BubbaMc

  • Contributor
  • Posts: 12
  • Country: au
Re: Where to start trying to decode a data stream
« Reply #30 on: May 15, 2017, 01:06:20 pm »
Just out of interest elnino, which home automation system are you using?
 

Offline elninoTopic starter

  • Contributor
  • Posts: 16
  • Country: au
Re: Where to start trying to decode a data stream
« Reply #31 on: May 15, 2017, 01:58:26 pm »
I've built my system around OpenHab.  I just recently upgraded it to openhab2 and I am trying to tick off some of the things on the list again I want to be able to control.

Just the  other week I managed to connect my coffee machine to the system which was actually quite easy.
I have RFID enabled front door (I have an RFID implant), automatic stair lights, roller doors, watering system etc.  I'd love to do my lights too but there is not really anything on the market that is economical and safe/approved. Sonoff devices are awesome but not Australian standards approved.

Unfortunately, the AC is just on the edge of the newer generation ones and has very limited / no practical possibilities for integration.

I played with it a bit more tonight but I am struggling with a simple circuit to drive the Tx line. I got to the point tonight where I felt like it should be working but the controller did not update the screen with the settings I sent it.

All of the testing I have done so far has been just with the controller and an arduino - Not actually connected to the AC unit.  It's possible that there is another bit that is set and re-transmitted from the main indoor unit to update the displays.  They have a master/slave switch and this does change the serial data in the first byte so it's also possible that I might need to transmit a 'master' code for the slave to update too.
 
The following users thanked this post: BubbaMc

Offline elninoTopic starter

  • Contributor
  • Posts: 16
  • Country: au
Re: Where to start trying to decode a data stream
« Reply #32 on: May 16, 2017, 09:13:21 am »
success!!!  I have managed to manipulate the data and control the system!!  I am so happy! 

Now time to move the code over to ESP8266 and build in some MQTT functions and i'm set!

Ian - Do you have a paypal account I can swing you some beer money on?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12857
Re: Where to start trying to decode a data stream
« Reply #33 on: May 16, 2017, 10:25:18 am »
success!!!  I have managed to manipulate the data and control the system!!  I am so happy!
Great.  Please post the circuit you've ended up with and anything you have discovered about the protocol so others can benefit.
Now time to move the code over to ESP8266 and build in some MQTT functions and i'm set!
I don't know how well the ESP8266 handles very low baud rate.  It looks like you've still got a lot of work left to do.
Ian - Do you have a paypal account I can swing you some beer money on?
Sorry, I don't use Paypal - please make a donation to Dave (EEVblog) on my behalf.
 

Offline elninoTopic starter

  • Contributor
  • Posts: 16
  • Country: au
Re: Where to start trying to decode a data stream
« Reply #34 on: May 16, 2017, 11:38:43 am »
Thanks Ian,  I ended up using an opto isolator for the Tx line.  It was super simple.  Just pulling the 12v signal pin low via the open collector on the isolator.  The led side is tied to 5v and the tx pin on the other side (all with current limiting resistors).  I'll draw it up and post back.  I'll probably also post this as an instructable too.

I bashed my head for a while on it but it was not until I put the new Tx line back into the logic analyser that I noticed the timings were off a bit. Changed the baud to 104 and it was all good.  That moment when you send data and the display changes - Priceless!

The Rx is still via the level converter but I think I will just tie in to the Rx on the exiting controller.

If the ESP module will not do a baud that low, I can handle it, I'll just use a pro-mini with a ENC28J60 ethernet module on it ESP just makes it simple because of Wifi. As you know - Many ways to skin a cat :)

Will donate to Dave on your behalf.  Many thanks again, I really appreciate your input.  It was very valuable to find the solution!
 

Offline BubbaMc

  • Contributor
  • Posts: 12
  • Country: au
Re: Where to start trying to decode a data stream
« Reply #35 on: January 24, 2018, 08:36:33 am »
What you've done is really cool, however if anyone else is looking to solve the same problem I can confirm the Intesis Modbus unit (FJ-RC-MBS-1) works beautifully as an interface with Fujitsu systems using this remote control.

I'm controlling mine now via a Raspberry Pi using Node-RED, with plans to turn it into a fully automated zoned system.
 

Offline Fran(_)

  • Newbie
  • Posts: 2
  • Country: es
Re: Where to start trying to decode a data stream
« Reply #36 on: June 10, 2021, 03:59:35 pm »
Hi,
I try to read my LG wall air conditioning controller with this https://www.sparkfun.com/products/12009. I connected the low voltage side to a m5stack (GND, 3,3V and pin 16). The high voltage side was connected to the three wires of the wall controller (GND, SIGNAL and VCC). After a minute, the m5stack began to smell like burned.
After that proof I try to upload code to my m5stack without success. I supose the m5stack is dead.
How I have to connect to the m5stack the low side wires of the logic level converter?
Thanks in advance.
« Last Edit: July 09, 2021, 06:59:52 am by Fran(_) »
 

Offline Fran(_)

  • Newbie
  • Posts: 2
  • Country: es
Re: Where to start trying to decode a data stream
« Reply #37 on: June 10, 2021, 04:43:18 pm »
One more thing,
when I tried to read codes I only connect the wire of the signal with low voltage of the converter to the pin configured as RX (the 16 in my case).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf