Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:07 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Counting Pulses

Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 03:20am 19 Dec 2018
Copy link to clipboard 
Print this post

I have a Hall Effect sensor on a rain gauge, the output is 3.3v and goes low when the magnet passes (ie when the bucket tips). I am having trouble counting the pulses. I have set pin 15 to CIN connected to the output pin, but when the bucket tips nothing happens. I can see on my meter that the pin is going low at each tip but it won't count.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:05am 19 Dec 2018
Copy link to clipboard 
Print this post

It should work.
I use all 4 counting pins 15 - 18 for counting hall effect flow meters.
I read the pins every 30 seconds without any issues.
You could try another pin - just in case, or try setting an interrupt to see if the 'mite is getting the change of level.

Jim
VK7JH
MMedit
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 04:06am 19 Dec 2018
Copy link to clipboard 
Print this post

I tried using an Interrupt with limited success.
SetPin 15,INTL,RainFall
Sub RainFall
Rain=Rain+1
Print Rain
End Sub

But the interrupt does not trigger every time the Pin goes low.

Edit.. Just tried Pin 18 same problem

This is a new E-28 first time used, I will try another one.Edited by palcal 2018-12-20
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:22am 19 Dec 2018
Copy link to clipboard 
Print this post

Maybe it needs a pull-up resistor. My flow meters have one built-in.
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:50am 19 Dec 2018
Copy link to clipboard 
Print this post

My flow meters use a WSH130 hall effect and the ones that got fried with the lightning 3 years ago were replaced with A3144 hall effect.
They have a 10k resistor as a pull-up and I run mine at 5V. (The counting pins are 5V tolerant)

You might not be pulling the signal pin low enough if the pull-up is too low resistance.

Jim
VK7JH
MMedit
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 05:07am 19 Dec 2018
Copy link to clipboard 
Print this post

Got it working with COUNT pin on a 28-Backpack, must be a problem with the E-28.
Thanks Jim.

Edit...now working with E-28Edited by palcal 2018-12-20
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025