Author Topic: Decoding a 1-wire protocol?  (Read 477 times)

0 Members and 1 Guest are viewing this topic.

Offline redninja83

  • Newbie
  • Posts: 2
  • Country: au
Decoding a 1-wire protocol?
« on: April 29, 2021, 02:42:08 am »
Hi Everyone,

I'm trying to decode the 1-wire protocol used by my Fujitsu Air Conditioners, but i've hit the limits of my knowledge, so im hoping someone can assist :)

The heat pumps seem to use a dual-comparator in some way to combine the rx/tx of the unit into a single wire, as you can see in the schematic for the communications PCB from the service manual ( https://www.manualslib.com/manual/1239980/Fujitsu-Aoyg30lat4.html?page=36#manual ):



I have tried replicating this circuit in order to get the RX/TX lines back, but when I hook them up to my DSLogic Pro, i see no signal. According to the source code of a project that hooks directly into the RX/TX lines of the unit ( https://github.com/jaroslawprzybylowicz/fuji-iot/ ) we should see something similar to UART @ 500bps. Also according to the schematic pin 7 of the comparator is floating? Or am I reading it wrong?

Looking at the PCB of the remotes directly, the circuit seems different from that specified in the schematic. Using my multimeter to trace through contacts it seems that the circuit is ALMOST the same as that in the PCB, but with a few differences. Pins 5 and 7 of the dual comparator are connected, although im not sure to where (it looks like it could be a 3-layer PCB? Is there any way to see the third layer without destroying the PCB?)

Here is the remote PCB front



And the back...

And an additional, different, remote control that decodes the same protocol, you can see the circuit is very similar again


A few other people are also looking at this 1-wire protocol at https://hackaday.io/project/19473-reverse-engineering-a-fujitsu-air-conditioner-unit but it seems progress has stalled, although decoding the 1-wire back into RX/TX looks like its the last piece of the puzzle to interfacing with these units...
 

Offline gcewing

  • Regular Contributor
  • *
  • Posts: 107
  • Country: nz
Re: Decoding a 1-wire protocol?
« Reply #1 on: April 29, 2021, 06:38:49 am »
Can you probe some intermediate points of your circuit with a scope to see what's happening? E.g. the inputs and outputs of the top comparator.

You could also try disconnecting the TX or RX side from the wire temporarily so you can troubleshoot one half at a time.

Pin 7 being unconnected looks strange, but maybe they've just tied the inputs of the unused comparator to known voltages to stop it from doing weird things.
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1068
  • Country: us
Re: Decoding a 1-wire protocol?
« Reply #2 on: April 30, 2021, 12:00:17 am »
That's pretty typical of single wire, half duplex serial.
That the logic level of the signal is ~13V is uncommon.

I'm not sure that opto schematic is related.

Forget about the remotes themselves.
Just look at the white wire, the middle one on the three wire external connection.
It should be high ~13V and go to ground for data.
You should be able to see it clearly with your scope.
Don't connect a logic analyzer directly!

You can probably connect a resistor divider if it's high enough resistance.
22k top, 10k lower should get you a signal in the TTL neighborhood.
Feed it into a 5V powered CMOS inverter twice and you have a signal to feed into a logic analyzer or UART.
 

Offline redninja83

  • Newbie
  • Posts: 2
  • Country: au
Re: Decoding a 1-wire protocol?
« Reply #3 on: May 06, 2021, 01:03:33 am »
Thanks for the suggestions.

You can probably connect a resistor divider if it's high enough resistance.
22k top, 10k lower should get you a signal in the TTL neighborhood.

I have a few logic level converters lying around, would those suffice instead?

Feed it into a 5V powered CMOS inverter twice and you have a signal to feed into a logic analyzer or UART.

I'm a bit confused here, im unfamiliar with CMOS inverters, but some reading says they are like NOT gates? Does putting it though two of them do something other than NOT the signal twice (which should give the same result as the original input?)
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1068
  • Country: us
Re: Decoding a 1-wire protocol?
« Reply #4 on: May 06, 2021, 01:35:01 am »
Feeding it through twice does logically nothing, but it puts a sacrificial part between this (potentially in case of error) 12 V and your logic analyzer or UART.
A NAND or NOR or inverter is fine.

The schematic has a 10 k pullup, but who knows how many and what other pullups there are in the system.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 7368
Re: Decoding a 1-wire protocol?
« Reply #5 on: May 06, 2021, 04:08:23 am »
That's pretty typical of single wire, half duplex serial.
That the logic level of the signal is ~13V is uncommon.
True RS-232 can be +/-12V, this looks like a unipolar version of that. The comparator sets the midpoint at 8.4V.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 2732
  • Country: gb
Re: Decoding a 1-wire protocol?
« Reply #6 on: May 06, 2021, 07:26:46 am »
The physical layer is the same as that used for LIN bus, half duplex asynchronous comms using an open drain interface.  This Hackaday project log might be useful for you.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf