You are here

Code for Counter (for connecting a flow meter to a data logger) | Cypress Semiconductor

Code for Counter (for connecting a flow meter to a data logger)

Summary: 9 Replies, Latest post by danaaknight on 13 Dec 2014 06:23 AM PST
Verified Answers: 1
Last post
Log in to post new comments.
Ida
Ida's picture
User
4 posts

Hello,

I would greatly appreciate it if someone send me a code for counter in PSoC 3.

Below is some information about what I want it for:

Flowmeters = Netafilm-M series

In one of our sites (Mandarin) the irrigation schedule is usually twice a month and 24 hours each time. For example between 10/22 and 11/22 Data logger shows 42456 pulses in total for 41 hours of irrigation. The average pulses/hr will be 1035.5 and also the average Gal/hr will be 1345.

 

Best,

Ida

user_14586677's picture
User
7648 posts

Based on water meter brochure you have the following interfaces -

 

Reed Switch Register Pulse Outputs: 10 or 3.26

Photo Diode Register Pulse Outputs: 1.0 or 0.055

MPE Digital Register Pulse Outputs: 10 or 3.26

 

You would have to interface one of these to counter input. The

digital output would have to be checked for compatibility with

voltage range of PSOC inputs. Its not clear to me what the

electricals are for the meter you are planning to use.

 

Regards, Dana.

 
user_14586677's picture
User
7648 posts

Here is a basic frequency counter that you can modify. Note it is

for PSOC 5LP, just change the device to PSOC 3 device and should

work.

 

This was run on a PSOC 5LP development board. What board do you have ?

The CY8CKIT-001, -030, or -050 ?

 

Regards, Dana.

Ida
Ida's picture
User
4 posts

 Thanks a lot Dana. The board we are using on data logger is the Neomote from Metronome systems. 

 

user_14586677's picture
User
7648 posts

My question was what board for the PSOC ? Which family

have you choosen ? If you have a more complete description

of what you want the product / solution to do we can help guide you.

 

Regards, Dana.

Ida
Ida's picture
User
4 posts

 On the board it says LP035, is that what you are looking for?

 

Ida
Ida's picture
User
4 posts

 http://www.netafimusa.com/files/literature/landscape/hydrometers/M-Water...

Apparantly each 0.1 gallons a pulse occurs on the flow meter. And we wanted to count those pulses. 

user_14586677's picture
User
7648 posts

If the board is a PSOC developmenet board (DVK) then there is a

part number on it, usually the top, that is one of the 3 part numbers

I gave you earlier. Or using a magnifying glass read the part number

on the large square package with tiny pins coming out all 4 sides ( if

its a DVK board).

 

The water meter has two "registers", either a reed switch or a photo coupler

interface, The latter allows you to galvanically isolate the meter from the

electronics, and also allows easy interface due to its open collector output.

If you use the reed switch it has to be debounced, that can be done in software

or by using the glitch component in PSOC.

 

Regards, Dana.

user_1377889's picture
User
10803 posts

Some more considerations:

A datalogger needs some interface to query the actual state of the counter or reset the counter like a start/stop button

Should the data be displayed only or transmitted to any other device (printer, PC etc)

Has the counter state to be maintained during power-off states?

Do you need something like a Store / Recall button?

What we are asking you is named "Functional Specification Document" (FSD) which usually is the beginning of every successful project.

As a matter of fact, all of the spect I offered you can be done with a PSoC5. So it is wise to choose what you need, but only what you need. Any additional unused feature makes the realization more work intensive and the product can get confusing.

As Dana suggested, try to find out the exact type of board you are using, probably there comes a lot of documentation with it that can be really helpful for you.

 

Bob

user_14586677's picture
User
7648 posts

Keep in mind you can design portable products, products with character

or graphic displays, wireless point to point or networked, web based IP

designs......depending on your engineering resources. Or we can point

you to competent PSOC experts, CyPROs, that provide fee for design

services.

 

Normal
0

false
false
false

EN-US
X-NONE
X-NONE

MicrosoftInternetExplorer4

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}

http://www.cypress.com/?id=1088

 

 

Further you can measure temp and pressure and strain and .....easily with PSOC.

In fact depending on family advanced signal processing is available via onboard

digital filter engine.

 

So again a spec would help forum guide you.

 

Regards, Dana.

Log in to post new comments.