1-Wire and BQ2022A problems

Thread Starter

Kaisha

Joined Nov 23, 2016
15
I wrote a 1-Wire library for the ESP32 and testing it using a BQ2022A (1kb eeprom) and a DS19B20 (digital temperature sensor).

Alone each works fine. I can query id's, CRC checks out, etc... If I put a single BQ2022A along with the DS19B20 on the line this also works. I can use the 'rom search' to successfully query both id's. If I put two BQ2022A's on the bus though things don't work. For some reason the reset command fails, with the bus being held low indefinitely after the reset, and at which point it never returns high until one of the BQ2022A's is disconnected.

I'm unsure at this point if its a problem with the BQ2022A, or on my end. I don't see anywhere in the datasheet where it says multiple BQ2022A's cannot share a line. The search rom command works (provided only one is on the line) which is the command specifically used for enumerating multiple devices on a single line. I would assume that if multiple devices was not supported that the search rom command would fail.

Any ideas? Anyone worked with the BQ2022A before?
 

roadey_carl

Joined Jun 5, 2009
137
I wrote a 1-Wire library for the ESP32 and testing it using a BQ2022A (1kb eeprom) and a DS19B20 (digital temperature sensor).

Alone each works fine. I can query id's, CRC checks out, etc... If I put a single BQ2022A along with the DS19B20 on the line this also works. I can use the 'rom search' to successfully query both id's. If I put two BQ2022A's on the bus though things don't work. For some reason the reset command fails, with the bus being held low indefinitely after the reset, and at which point it never returns high until one of the BQ2022A's is disconnected.

I'm unsure at this point if its a problem with the BQ2022A, or on my end. I don't see anywhere in the datasheet where it says multiple BQ2022A's cannot share a line. The search rom command works (provided only one is on the line) which is the command specifically used for enumerating multiple devices on a single line. I would assume that if multiple devices was not supported that the search rom command would fail.

Any ideas? Anyone worked with the BQ2022A before?
Are you using a 10k pull-up resistor when you're using more than one BQ2022A?
 

atferrari

Joined Jan 6, 2004
5,011
From my experience teaching a micro to identify and work with 1Wire ICs:

It is obvious they should work in good coperation. Otherwise, why to have IDs each one?

Could you get two or three other ICs (like DS 1802) to see if the problem repeats.

Is your routine identifying faithfully each one? With both in circuit?
 

Thread Starter

Kaisha

Joined Nov 23, 2016
15
Are you using a 10k pull-up resistor when you're using more than one BQ2022A?
I'm using a 4.7k pull up. My understanding is that the longer the line, or the more devices, the smaller the resistor you want.

Could you get two or three other ICs (like DS 1802) to see if the problem repeats.

Is your routine identifying faithfully each one? With both in circuit?
I'll try to find a second DS19B20, though it may take a while. It is faithfully identifying all the devices individually, and identifying the DS19B20 along with a single BQ2022A fine. Its only when 2 BQ2022A's are on the same line that the problem occurs.
 

atferrari

Joined Jan 6, 2004
5,011
I'll try to find a second DS19B20, though it may take a while. It is faithfully identifying all the devices individually, and identifying the DS19B20 along with a single BQ2022A fine. Its only when 2 BQ2022A's are on the same line that the problem occurs.
Had I to solve this problem, I would first make definitely sure my software identifies both BQ2022A beyond any doubt and then I would revise the flow diagram of the procedure to select one of them (with both in circuit).

I am busy with a project so I cannot delve any further.

My suggestion: read the full datasheet prior doing anything. It seems to have things well explained. The references to the eventual work with two or more 1Wire IC in circuit are there.
 

Thread Starter

Kaisha

Joined Nov 23, 2016
15
Had I to solve this problem, I would first make definitely sure my software identifies both BQ2022A beyond any doubt and then I would revise the flow diagram of the procedure to select one of them (with both in circuit).

I am busy with a project so I cannot delve any further.

My suggestion: read the full datasheet prior doing anything. It seems to have things well explained. The references to the eventual work with two or more 1Wire IC in circuit are there.
Each BQ2022A works fine alone. I can read the ROM ids and the crc's check out. They work fine in tandem with the DS19B20. I can select and use either of them. Its only when two BQ2022A's are on the same line that issues arise. At which point I can't even get to id enumeration, the reset pulse/command fails with the bus being held low indefinitely.

I'm going to try and dig up another DS19B20 and see if that works. Then if that leads me no where I'll try the library ErnieM.
 
Top