LIS3DH temperature acquisition - temperature

I'm trying to get temperature from LIS3DH sensor (accelerometer with integrated temperature sensor)
I'm using Particle electron board that contain that sensor.
The datasheet provide too few information
set TEMP_EN and ADC_EN from TEMP_CFG_REG register.
I read value that fluctuate continuously and does not correspond, to temperature.
Do you know which register I have to consider to get it works ?

The datasheet states that to connect ADC3 to the temperature sensor, set both TEMP_EN and ADC_EN of the TEMP_CFG_REG register to 1.
Then read OUT_ADC3_L to get the raw value and use the Temperature sensor characteristics table for conversion.
Hope this helps.

Related

How to properly configure an stm32 with lmt86?

I'm implementing an stm32 which reads data from an LTM86 sensor and transmits the converted temperature in a CAN bus.
My problem is related to the ADC configuration because the voltage value provided by the ADC is different from that measured on the pin with a voltmeter. As a consequence, the converted temperature will be wrong.
I tried this ADC setup:

Most power efficient way to determine when sensor is worn

I'm working with Movesense 2.0.0 on a HR+ sensor and I have to minimize the power consumption when device is not worn.
I can't turn it completely off since I need it to keep the correct time so, to reduce the battery usage, when I don't receive a HR notification for a certain amount of time I unsubscribe from all sensors.
What's the most power efficient way to determine when device is worn again? I was thinking about subscribing to accelerometer (as I understand it is the sensor with the lowest power consuption) and when I detect movement I resubscribe to HR and check for incoming data.
Is it a valid approach?
I also noticed that when device isn't worn but still connected to the strap I sometimes receive incorrect HR notifications, like the strap is acting as an antenna for electromagnetic noise. Is there a way to detect when the device is in that status except for looking at HR data to see if they make sense?
Your question is a bit vague in what you mean by "wear a sensor" (I'm assuming you mean HR-strap on chest). In that case if you look at the power consumption documentation (see the PowerOff measurements compared to no-wakeup) you'll notice that
HR wakeup (/System/States/2 (=Connector)) is ~0.2 uA
Movement wakeup (/System/States/0 (=Movement)) is ~4 uA
All other measurements are much higher starting from 10 uA for Acc # 13 Hz.
So the easiest and lowest power determination is to SUBSCRIBE the /System/States/2.
If you base your firmware on version >=2.1 and you measure HR or ECG you also get updates during measurement when the connection is lost (so called Leads-Off detection), so this should help to filter out the spurious HR detections. For firmware 2.0 and earlier you get Connector state 2 (=Unknown) when measuring.
Note: the leads on detection (/System/State/2 when no HR measurement is ongoing) is very sensitive and can give "connected" state when the HR-strap is sweaty.
Full disclosure: I work for the Movesense team

is thermostatTemperatureAmbient required?

I'm trying to implement action.devices.types.AC_UNIT in google home.
My hub is the IR transmitter, it saves previous states and commands with a packet.
As you might understand the device does not know anything about room temperature.
It seems like thermostatTemperatureAmbient is required for setTemperature execution.
I can report the desired temperature as the ambient one, but then google reports this value when I ask for the temperature at home.
You should be using thermostatTemperatureSetpoint for your desired temperature setting. Ambient temperature should be the actual temp reading from the device. However, since your device does not actually read the temperature, you may consider using the TemperatureControl trait instead.

How to connect current measurement?

I'm trying to run this DC simulation, but I cannot connect the current measurement block to the circuit!
Thanks.
Few things:
The black coloured source block that you have added is from Simscape Specialised library. Consider adding something from Simscape-> Sources library (ensure that your network is blue in colour)
Your model is missing a solver configuration block
Connecting a display to the network doesn't measure current, you need to add appropriate sensors to measure the quantity you want. For ex you measure current using a Current sensor, a voltage using Voltage sensor and so on
Fixing the above 3 should get you your output.

Serial Port Communication understanding

i need some help understanding a specific serial port connection from a sensor. I need to read data from the sensor and make some calculations in matlab or c++ (i will decide later)
The manufacturer only gives a chart with the following details:
Sensor Serial Port
Pin Number Mode Pin Description
I Trigger Input
I RS-232 Receive
O RS-232 Transmit
PWR Sensor Power (DTR)
PWR/GND Signal Ground
Not Used (Reserved)
Not Used (Reserved)
I/O RS-485 B Signal Pin
I/O RS-485 A Signal Pin**
So my question is: OK i know that pin 2 is used to receive data but how am i going to decode the volts stream into integers for example for my program? Also, i know that pin 4 gives power to the sensor. How do i know how many volts it has to give? Generally how am i going to learn all these details since the manufacturer does not give it?
Do you think Serial Port Analyzer Software will help?
Thanks very much in advance.
You might want to search for "DE-9 pinout YourSensorNameHere" in google or This page might be of some use to you. With most RS-232 you only need pins 2,3 and 5. With out more specifics about your sensor there isn't much SO can do for you.