pixl.js with analog moister sensor #2591
Replies: 34 comments
-
Posted at 2018-05-30 by @gfwilliams Hi! I think your wiring might be a bit off - the power wires seem to be connected to 3.3v and RST. See: http://www.espruino.com/Pixl.js#pinout Basically you want to move the blue wire 3 pins downwards to connect it to GND, and that will probably help a lot. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-30 by furuskog Diffrent numbers but thet change i sequence. Thanks for the sudgestionAttachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-31 by furuskog I think IM doing something wrong any ideas? Does anyone here have an idea how to extract data from it? Is it even analog? The 3 wires att sig, vcc and gnd. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-31 by @gfwilliams I don't really know - do you get an obvious digital output out of it if you stick it in water? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-31 by J{a}SON i have something similar from a grooove sensor kit. i can try it this weekend, or at least give the arduino code. i know i just did an analog read off of a0. the values ranged from 0 - 800 or so. using it for plant soil moisture, i had values between 300 and 650 as acceptable moisture. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-31 by furuskog Thank you Im looking forward to your findings or your code :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-31 by furuskog No it just cycles between some values not dependant on the environment |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by @yerpj There is big chances the moisture sensor is analog, like the one from Adafruit (https://www.sparkfun.com/products/13322). Then, the code is quite easy: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by furuskog Thank you, so My code above should do the trick? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by @yerpj It should. If not, could you please share the sensor model? (reference, name, manufacturer or datasheet) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by J{a}SON here's the arduino code i'll try to convert to a pixl when i get home this weekend. it reads from a moisture sensor, and a temperature/humidity sensor, and displays the values to an rgb display. unfortunately i won't be able to change the display color based on the moisture level, but it will be a good test. in my case i'm using an arduino shield with a grove sensor kit, so it will be a good test on the pixl as a shield as well.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by @yerpj I suspect that the kind of sensor that J{a}SON is using is this one: http://wiki.seeedstudio.com/Grove-Temperature_and_Humidity_Sensor_Pro/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by J{a}SON the moisture sensor is only using 3 of the pins: vcc, gnd, sig. it's this one |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by @yerpj Well in this case @furuskog probably owns some kind of clone of this moisture sensor, it should work fine with a simple
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by J{a}SON i'm going to convert my shield arduino code to pixl anyway, just as an exercise. it was accurate on the arduino as a setup for my indoor plant starters, but it didn't have a sleep mode, and drained the batteries too quickly. i look forward to seeing how energy efficient the pixl can be with this setup. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by furuskog yes I have done that it cycles through. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-01 by @yerpj Are you powering the sensor with 3.3 or 5.0 V? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-02 by furuskog hmm 3.3v seems to work now. in water in air Now i just have to calculate it in %, an have som treshold for 0% because of the fluxuation, maybe an upper limit too? I will check the code you guys provided :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-02 by furuskog I came up with this
Feedback on the code is welcome I have 3 pucks im gooing to try next :) Im gooing to send via bluetooth to my pixl.js edit: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-02 by @yerpj
Yes that's is probably the downside of this sensor. Due to its circuit, the sensor output may be a function of VCC. You could try to power it through an LDO (low dropout regulator). Or you can also monitor its voltage through a resistor divider an compensate digitally ? Anyway, good to know that you finally got it work! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-02 by furuskog I c. I just changed the ”high” variable to a lower value and it worked. Thanks for the help! :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-02 by J{a}SON i just tested my seeed grove moisture sensor with success, and a few notes:
when i replace my full code i'll post in another thread |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-02 by furuskog Good news! Even got it work on a esp32 with espruino
To bad there are no bluetooth support yet :( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-02 by Wilberforce Ahh - but there is now Bluetooth support for the esp32! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-02 by furuskog Nice! I just asumed because of the documentation sudgested otherwise :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-04 by @gfwilliams It's still pretty beta, but with a bit of work you can get it doing simple advertising stuff :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-06 by furuskog Nice |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-09 by furuskog Im trying to broadcast ble data with the esp32. But its not implemented yet the console informs me. Didnt you guys say it worked now?
Console
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-11 by @gfwilliams I think I said it was very beta. You can get advertising going with some work - maybe with If you have issues with it post on the ESP32 forum though. ESP32 isn't something I can provide any support for. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-06-11 by furuskog Ok, thanks I will try that. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-29 by furuskog
Hello!
I have a analog moister sensor, how do I make it work? How can I read the proper values from pin A0. I have a CR2032 battery. And i think the sensor can run on 3,3V
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions