Hello,
i am using
1 OWS temperature sensor DS18B20
1 I2C Pressure sensor BMP05 normal range 950 to 1100 mbar
1 counter value range 0 to 60
i have 2 problems
1)
I try to discover the serial number of my DS18B20
but i get it only after 2 requests
the 1rst request return “No more addresses”
so i tried to do more requests after somme delay
in this case , i get the correct device adresse at the 2nd request …
what is wrong ?
does the parameter adress/index start from 1 , not from 0 ?
——————
2)
On the charts
i want to use 2 Y axis , because of the difference of sensor range
ie :
left Y axis scaling 0 to 60 for Temperature , and counter Cpt
right Y axis scaling 950 to 1100…
nota :
Now, i divide the actual Pression value (in mBar) by 10
to keep temperature visible ,else not visible with a range over 1000 mbar
i did not find out , how to do that in the document
https://www.highcharts.com/demo/line-basic
i don’t see the right Y axis ,only the tittle “Pression mBar”
is it possible ?
could you give me somme advices ?
Terminal capture :
———————————————————
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1284
load:0x40078000,len:12808
load:0x40080400,len:3032
entry 0x400805e4
BMP085 OK
scan devices on OWS BUS
i= 0
No more addresses.
i= 1
ROM = 0x28, 0xAA, 0x56, 0xC1, 0x38, 0x14, 0x01, 0x40
Chip = DS18B20
DS18B20 = 22.56
Compteur= 0
Press. 996 mBar
Cpt=1, BMP085 P. 996 mBar DS18B20 = 22.62 °C
Cpt=2, BMP085 P. 996 mBar DS18B20 = 22.56 °C
———————————————————–
web page display capture
links to program & display
Hi.
What code are you using to get the DS18B20 address?
To what GPIO is it connected?
For your axis issue, I found this example that I think it’s a better scenario of what you want to achieve. It has three different y-axis: https://www.highcharts.com/demo/combo-multi-axes.
I hope this helps.
Regards,
Sara
it is the same behavior with this example
https //raw.githubusercontent.com/RuiSantosdotme/Random-Nerd-Tutorials/master/Projects/ESP/ESP_DS18B20_Multiple.ino
i have only one DS18B20 connected !
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1284
load:0x40078000,len:12808
load:0x40080400,len:3032
entry 0x400805e4
Locating devices...Found 0 devices.
it seems // Grab a count of devices on the wire
numberOfDevices = sensors.getDeviceCount();
result is wrong …
so i forced the result to 1 ..via numberOfDevices=1;
new result on terminal :
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1284
load:0x40078000,len:12808
load:0x40080400,len:3032
entry 0x400805e4
Locating devices...Found 0 devices.
Force numberOfDevices to 1!
Found device 0 with address: 28AA56C138140140
Temperature for device: 0
Temp C: 23.75 Temp F: 74.75
Temperature for device: 0
Temp C: 23.75 Temp F: 74.75
bug inside // Grab a count of devices on the wire
numberOfDevices = sensors.getDeviceCount();
sencond Y axis problem :
Yes, i want, at least, to get a similar result as in This example of muti Y axis
but this example is based on static values, allready stored into tables,
and i want to see current values in real time ..
How to affect Temper and Cpt to the left Y axis , and Pression to the right Y axis ( with different scaling)
Hi.
What’s the ESP32 boards version you have installed? Go to Tools > Boards > Boards Manager > ESP32.
The most recent version had an issue with the OneWire library that it’s used for the DS18B20 sensor, I’m not sure if it was already fixed or not. But, you can try downgrading the ESP32 boards installation and check if the issue persists.
Second question. First, try to create charts with the different y axis (without the values). You can easily do that by editing the example. Make sure you have the three different series you want, but without the data parameter.
Then, you can take a look at this example: https://randomnerdtutorials.com/esp32-plot-readings-charts-multiple/ to learn how to place the data in different series.
Basically, to access a specific series you use chart.series[SERIES_INDEX]. I think that if you take a look at that example, you’ll easily figure it out.
Let me know if you need further help.
Regards,
Sara
hello,
Sorry, this example doesn’t help me…
i don’have any probmems to do 3 differents charts on one vue
with curent values … like on the example
https://randomnerdtutorials.com/esp32-plot-readings-charts-multiple/
but this example concerne 3 DS18B20 (same sensors) with an unique Y axis ..
for me , i added Pressure Measurement (range 950 to 1100 mbar)
and i want to add a second Y axis with this range ,instead on only one Y range for temperature..
At least, in didn’t see any example how to do that …
except example with all Datas allready stored into tables.
As you can see on display capture,
i add 2 Y axis on the right , and the range is made by the Pression value
and no detail on temperature because value is too low for this big range..
how to assign range for each Y axis ?
Hi.
As I’ve told you, you need to edit the example I sent you with your own properties. It’s just a starting point. The higcharts documentation and forum also help a lot with many examples.
I created an example, you can modify it for your scenario. It displays temperature, humidity, and pressure on the same chart. Each one with its own axis. You can modify the ranges as you need. You may also omit the max and min properties, and the yaxis values will adjust to the values being displayed. Here’s the JavaScript file:
https://gist.github.com/sarasantos/1dd707a1d89a7f3c6afcfb6c9ded62da
Here’s a screenshot of the chart:
I hope this helps.
Regards,
Sara
Hello Sara,
Thanks’ a lot for your example…it is exactly what i wanted..
after minor adjustement i get this..
Dipslay capture
just a minor problem
X axis date is not OK
if tried to use
// Apply time settings globally
Highcharts.setOptions({
time: {
timezoneOffset: 'Europe/London',
},
})
..no way ..
and also
var x = new Date().addHours(2).getTime()
no success….
i didn’t discover in Hihgcharts API documentation, how to correct the date
Any idea ?
Hi.
Use:
var chart = new Highcharts.Chart({
time:{
useUTC: false
},
(…)
https://api.highcharts.com/highcharts/time.useUTC
Regards,
Sara