This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Repair / hack STW sensor.
#1
   
Yes i used to be a hand model
   
I am attempting to repair a old STW sensor from my boat. i thought it had a magnetic switch as when i measure the paddle spinning i would get beeps out of my meter in diode mode.
The paddle has 2 magnets in it with opposing poles  and is mounted in a though hull fitting.
with a black and red wire leaving the though hull.
today i decide to test for ac. after looking at the signet site when i spin it i get an ac voltage.
I assume the frequency of the signal equals the rpm of the paddles * 2
I don't have a scope.
Resistance is about 1.8K
flicking it with my finger i get about 10V AC max
How should I read this device?
What is inside the though hull a coil?
Reply
#2
Is the voltage related to how fast it spins?

You might use a diodes to convert this to a digital signal within the range an uC can sample it.
Reply
#3
I was thinking of a bridge rectifier and a voltage divider. That would give me 2 pulses per rotation. I am concerned about the voltage drop when it slows. I don't know how low before a esp would fail to detect the pulse. i could then just find the time between pulses to determine the speed. a square wave would be best. I don't have a oscilloscope so this is all guess work.
Signet claims there sensors are self powered.. I doubt i could get enough current to power a nano. i think for a esp i needs in the .08 amp range. It would be nice to have self powered sensors. The old analogue display is on the boat i think i am going to have a peek. it is -7 today and -25 tomorrow and -stupid till next week. May be if it is calm i will get brave and go to the boat.
I think i need a Radioisotope piezoelectric generator to solve my energy issues on the boat. You can get 80ish years before you have to refuel.

The other thought is the adc if the voltage is linear or reasonable so.
Reply
#4
So I can read the device just by sending it to a digital pin on the esp32. I want to know if i should send it to SignalK or Send it as nmea 1083 and if so what sentence.?
Reply
#5
If you are bringing it into OP, you could use SignalK, and then use your esp32 to connect to OP wirelessly.

Here's a couple I've done using an M5Stick to send SK via UDP wirelessly. One for engine temp and one for tank levels, neither are implemented on the boat yet, but they should work as a start.

https://github.com/andyrbarrow/M5StickEngineTemp
https://github.com/andyrbarrow/TankLevel

The SK key would be /vessels/<RegExp>/navigation/speedThroughWater

I like the little M5Sticks for this sort of thing - they're cheap (for what they are), self contained, have a couple of buttons you can use for local testing, as well as a little display. You will need to come up with a little buck converter to power it, but that's about all.
Reply
#6
Thanks, ya i think i will go the sk way. It looks like the better solution. I have coded both ways before. I just hacked most of my wind sensor code as i need the wind speed code and ditched the direction and anchor light code. I have a few esp32 dev v1 module. they suck because of the size but they work.
Reply
#7
Well I have it sending data to signalK need to clean up the bounce a bit. A scope to see the signal i am getting would be nice.
Any recommendations on a nice small Power converter for an esp32. 12 -16 v -> 7 to 9 volts. I am using a esp32 devkit V1.
My esp goes into ap mode if it does not have or cant find openplotters' credentials. from my phone or laptop i can then set the connection info.
I still have to test if i can do OTA updates.
I cant seem to get SignalK to generate a VHW sentence for Opencpn...
Reply
#8
I buy these things half a dozen at a time. They seem to work fine.

https://www.amazon.com/gp/product/B014Y3...UTF8&psc=1
Reply
#9
thanks I just ordered 6.
I also ordered a few esp8266. I think they would work better for this as I only need 1 digital pin. About and half the power requirements.
Reply
#10
woohoo It works.. After several weeks of looking at the code then putting it off and doing other stuff. I used the buck converter abarrow suggested and rewrote the code for a esp8266. It works... I can update the code via wifi and use wifimanager to set the connection to the skserver. It updates the skserver every .5 seconds. power is greatly reduced from a esp32... it all fits on a gikfun proto board and into a printed case that can mount on the bulkhead near the device.
I need to add a fuse and a small switch at the device end but it looks like a workable solution.
I have 3 wifi devices now a wind sensor, battery monitor, and this speed though water sensor.
It would be nice to add a display on the wifimanager page to display sensor data when not connected to the skserver.
I always feel bad about leaving all the unused pins. But I want to keep the traffic down.
Well day 12 of not leaving the house hope everyone is safe. It looks like i am selling my Tanzer 26 and moving to the BC coast as soon as everything settles down. Time for a new boat and a new chapter in my life.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)