With an Arduino and some DS18B20 temperature sensors as example …
↓↓↓ Complete description, time index and links below ↓↓↓
Like many people on this planet I have a lot of time on my hands right now (that virus thing). So why not do a bit by bit analysis of what’s happening on a 1-Wire bus? Maybe I – or you – can gain some insights into the meaning of life.
And some insights I gained: How to probe a 1-Wire bus with the scope (differentiating between slave and master signals, hard pull-up and resistor pull-up), how the 1-Wire search (“Search ROM”) works (9 minutes at 29:06) and much more.
►Intro
00:00 Intro – be warned, it will get ugly (and watch the previous video first)
►Operating a parasite powered 1-Wire bus
01:30 Overview – what’s on the breadboard and a quick recap of the code
03:41 Ones and zeros – on the 1-Wire bus, it’s a question of time(ing)
06:38 Broadcasting a command – “Skip ROM” [CCh] and “Convert T” [44h]
08:12 Preparing for a command – master reset and clients present, real long lows
10:24 Voltage levels – what’s high, what’s low and difference between master and slaves
14:14 Probing trickery – a diode and some resistors make the bus easy to probe
16:42 Addressing a slave – “Match ROM” [55h] followed by a 64-bit slave ROM address
21:24 Command for that slave – “Read Scratchpad” [BEh] followed by data from the slave
23:54 Repeat for another slave – nothing new here but for a DallasTemperature lib oddity
25:34 Noise while bus is high – slaves pulling parasite power through pull-up resistor
►Initializing a 1-Wire bus
26:46 Overview – discovering slaves on the bus, their addresses, power mode and details
29:06 1-Wire search – “Search ROM” [F0h] for implementing a binary tree search
38:16 Slave power mode – first slave addressed [55h] and “Read Power Supply” [B4h]
40:45 Slave details – first slave addressed [55h] and its scratchpad read [BEh]
41:45 Repetitive stuff – more of the same over and over again
45:04 Bus activity summary – of all the bus activity including the repetitive stuff
45:53 Code review – redundancies, oddities and maybe a bug
►Differences to a direct powered 1-Wire bus
47:54 Overview – changes on the breadboard and in the probing
49:18 Difference – “Read Power Supply” [B4h], and it differs from the datasheet too
►Timing considerations
51:23 Recovery time – depends on a lot of things, including temperature
►Summary
54:37 Three main point – parasite vs direct power, 1-Wire is easy and trust no one
Tutorials: [ Ссылка ]
Arduino, DS18B20/DS18S20 Temperature Sensor and 1-Wire Bus – The Details: [ Ссылка ]
Arduino-Temperature-Control-Library: [ Ссылка ]
OneWire: [ Ссылка ]
Complete 1-Wire Command Codes: [ Ссылка ]
Determining Recovery Time: [ Ссылка ]
1-Wire search algorithm: [ Ссылка ]
#robertssmorgasbord #tutorials #tutorial #how-to #Arduino #temperature #temperaturesensor #bus #dallas
Ещё видео!