sensor selection for tank cap opening

Hi

I am doing project for the truck fuel cap. when the fuel tank cap is opened then alert should come.

I was using tilt sensor for this project. but the problem with tilt sensor is even when truck is moving i am getting an alert.

Can someone please suggest when what type of sensor i can use. tilt should activate when the cap open is more than 30 degree angle.

Hall-effect and magnet?

Two tilt sensors. One on the cap and one on the truck. If they both detect a tilt then the truck is tilted and the cap is still on.

Or look into the QRE1113 as an optical sensor to be positioned just under or near the cap.

MorganS:
Two tilt sensors. One on the cap and one on the truck. If they both detect a tilt then the truck is tilted and the cap is still on.

Or look into the QRE1113 as an optical sensor to be positioned just under or near the cap.

Thank you. But the problem is sensor will be in the enclosure.

When cap is open till sensor will get activated and power supply flows.
here i am looking for sensor with two pins.

bmg1234:
in the enclosure.

What does that mean to us who don't have a pic of your tank filler in our heads?

Maybe get a photo and or do a skecth?

please find the attachment.

My device will be enclosed in a box and fixed to the attached device.

tank.jpg

Here is the complete image
please find attachment. tilt sensor will be in the enclosure.

bmg1234:
Here is the complete image

....in a post not as an attachment :wink:

neiklot:
....in a post not as an attachment :wink:

tank enclosure.JPG

Any suggestions which sensor i can use? now i am using tilt sensor but sensor is activating when truck is moving.

bmg1234:
Any suggestions which sensor i can use?

Nope: I'm not getting a sense of what's what in that pic. Maybe one when it's closed and one when it's open will help?

neiklot:
Nope: I’m not getting a sense of what’s what in that pic. Maybe one when it’s closed and one when it’s open will help?

Not in the picture it is closed. when it is open the box will be 90degree. when box is 90 degree even the tilt will be in 90 and the power passes through the tilt.

There will be a ball in the tilt when it tilted above 15 degree the ball moves and connects the pin and power flows but the problem even when truck is moving due to vibration the ball will also moving and sometimes it connects the pins of tilt sensor.
https://ran
domnerdtutorials.com/guide-for-the-tilt-sensor-inclinometer-with-arduino/

Use a tilt sensor with a larger operating angle. Lots to choose from: https://www.mouser.com/Electromechanical/Switches/Tilt-Switches/_/N-5g2p

DaveEvans:
Use a tilt sensor with a larger operating angle. Lots to choose from: https://www.mouser.com/Electromechanical/Switches/Tilt-Switches/_/N-5g2p

does these sensors even operate when it is moving?

You may have to write code to ignore short triggers caused by road vibration. Only set off your alarm when the trigger is longer than "x" ms, when it is obvious that it is due to someone opening the cap. Find "x" by trial and error, or log the duration of every trigger over some number of days and figure it out from that data. That may allow you to use your existing 15 degree sensor. Or maybe not.

Also, damping would help control erroneous triggering, and Google says that tilt sensors with damping are available. Or you could build your own: e.g., a pendulum with some friction would be one way. A pendulum hanging from a small rotary damper with viscous (i.e., velocity-dependent) damping would be better.

Hello,

I am using tilt sensor for my project. project is when the fuel tank of the truck is open sensor will activate and when the tank cap is closed sensor will deactivate. for this i am using simple two wire sensor. but the problem is when vehicle is moving the sensor is getting activated.

Can someone please suggest me some good tilt or angle sensor which does not work when vehicle is in motion it should work only when the cap is open.

Thank you

bmg1234:
Hello,

I am using tilt sensor for my project. project is when the fuel tank of the truck is open sensor will activate and when the tank cap is closed sensor will deactivate. for this i am using simple two wire sensor. but the problem is when vehicle is moving the sensor is getting activated.

Can someone please suggest me some good tilt or angle sensor which does not work when vehicle is in motion it should work only when the cap is open.

Thank you

Well, you could detect motion and disable to sensor during motion.

You could put a cover over the cap that will open/close a switch that will detect open/closed cap. Heck you can even use the cap cover switch to prevent the vehicle from moving if the cap cover switch is open.

Idahowalker:
Well, you could detect motion and disable to sensor during motion.

Yes even i was thinking the same to use one motion sensor in series with tilt sensor.

what type of sensor i can use? when truck is moving sensor should not active when truck is not moving sensor should active and this will help to pass tilt sensor data

A micro switch placed in such a fashion that the cap cover must be in properly placed to close/open the switch.

If you detect when the vehicle is in gear or when the gas peddle is being pressed you can use that condition to invalidate tilt detection.

Idahowalker:
A micro switch placed in such a fashion that the cap cover must be in properly placed to close/open the switch.

If you detect when the vehicle is in gear or when the gas peddle is being pressed you can use that condition to invalidate tilt detection.

This project is based on wireless. whole device will be placed in enclosure and fixed to the cap. there won't be any external wires.

bmg1234:
This project is based on wireless. whole device will be placed in enclosure and fixed to the cap. there won't be any external wires.

Those double secret project parameters get me every time.