cancel
Showing results for 
Search instead for 
Did you mean: 

How to read Current, Voltage & Power values from STPM32TR by using UART

Ramalingeswar Rao
Associate II
Posted on April 19, 2018 at 08:34

Hi Guys, 

      I am new to this ST32, i want to read  values  of current, voltage & power values by using nrf board. there is any sample codes for sending commands to st32 and read from this st32 i need help.

Thanks in Advance.

12 REPLIES 12
Andrew Neil
Evangelist
Posted on April 19, 2018 at 09:40

 I am new to this ST32

What is, 'ST32' ?

Do you mean ST

M

32 (the microcontroller family), or ST

PM

32 (power meter) ?

Have you looked at the documentation & other support resources on the 

ST

PM

32

 product page:

http://www.st.com/en/data-converters/stpm32.html

  
Posted on April 19, 2018 at 10:03

Thanks for response Andrew.

Actually it is power meter only, in my project power meter is one of the application. My need is to read all these parameters(current, voltage & power) values by using uart communication & I am using nrf5 series microcontrollers for receiving data. I am asking for there is any samples code for reading data from this power meter (STPM32TR).

Thanks in Advance.

Thanks & Regards,

Ramalingeswar.

________________

Attachments :

image001.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxgQ&d=%2Fa%2F0X0000000b0u%2Fan1IJDJXMHgp_54PI09NdkNamKG21xYFc.m97bdIbXw&asPdf=false
henry.dick
Senior II
Posted on April 19, 2018 at 12:16

'

How to read Current, Voltage & Power values from STPM32TR by using UART'

very simple: find a current, voltage & power sensor that outputs using UART. then write a piece of code that runs on your STPM32TR that reads from that sensor.

Posted on April 19, 2018 at 11:11

Ramalingeswar Rao wrote:

I am asking for there is  any samples code for reading data from this power meter (STPM32TR).

Again, did you look on the Product Page?

That's where it would be!

There is a document, '

Getting started with the STPM3x' - have you read it?

As its name suggests, it would seem to be the obvious starting point ...
Posted on April 19, 2018 at 12:21

Errr ... the 

ST

PM

32TR

 is the sensor - so the task is to write some code on a host device (OP has nRF5) that reads values from it.

Perhaps the OP first needs to learn to use the UART on the nRF5 ... ?

Posted on April 19, 2018 at 12:38

Andrew Neil wrote:

'

the task is to write some code on a host device (OP has nRF5) that reads values from it'

 yes Andrew, i am trying to write  that code. It needs any particular commands on host? if want i need that commands.

thanks for'

Getting started with the STPM3x' 

 i am just put look on it.

AVI-crak
Senior
Posted on April 19, 2018 at 14:46

The UART communication protocol is described on page 71 and below the official document. 

http://www.st.com/resource/en/datasheet/stpm32.pdf

  By description: the request is the answer. You need to fill in the actual values with internal registers STPM32TR - for a one-time or a cyclic response.

The use of such a chip - only for total energy accounting. In other cases, it is easier to apply a software implementation of the algorithm.
Posted on April 19, 2018 at 13:09

if want i need that commands.

They will be detailed in the product documentation

thanks for'

Getting started with the STPM3x' 

 i am just put look on it.

You mean you hadn't even looked at it before posting here?!

The first thing you need to do when starting with any new component is to familiarise yourself with the available documentation and support materials!

Posted on April 19, 2018 at 13:37

' The

first

 

thing you need to do when starting with

any

 

new component is to familiarise yourself with the available documentation and support materials! '

Sorry for that Andrew, Actually i am new to forum discussion also... and thank you for suggestion. if i get any problem i'll put my exact problem. yeah this document having information of what i am looking... 

Thank you.