Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Kokosnoot
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Kokosnoot

    @Kokosnoot

    14
    Reputation
    11
    Posts
    817
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Kokosnoot Follow

    Best posts made by Kokosnoot

    • Wireless bike pumps and computer game using MySensors

      Hi,

      I run a couple of sensors using MySensors in my household which send temperatures, airpressure, humidities of various rooms as well as automatic watering some plants with peristaltic pumps when a threshold has been exceeded. However, for an "open day" event at my employer I suggested to make a game involving bike pumps which will control water levels. Children (and also adults 😉) have to physically pump on the the pumps. To make everything wireless, I used the MySensors library to see if I could use it for this game. Just wanted to share this project with you and some background as it might inspire someone else to make something fun!

      alt text

      So how does it work?

      An Arduino Pro Mini (3.3v) , NRF24l01, a joystick (configured to be two-directional), a 18650 battery holder+regulator for 3.3v, and microphone (MAX9814) are inside each pump. The bike pump's tube is actually going inside the box with the microphone. Using Arduino code the microphone is looking for certain threshold (peak) volume for a et amount of time... When the bike pump goes "psssh" 😄 this threshold is exceeded and some custom data is send to the gateway.

      Data send can be anything, but for me it was just: PlayerId|PumpDirection|Strength. Also, these "player nodes" are all wireless and you could put them anywhere 😎 . In the end the green node was closer to the TV as it started to have some connection issues for whatever reasons (could be very well my soldering and all the massive vibrations from the children being really though on these devices!!)

      Gateway is an ESP8266 (as "serial gateway") also with NRF24L01 attached and three programmable LED strips. Every time when data is received; the receive() function will dissect the input data so the appropriate LED strip can be triggered... Pumping would generate a "wave" effect in the LED strips. The direction of the pumping would also change whether the wave would go from the player or to the player.

      The ESP8266 is connected with only USB to a laptop. The game engine Unity is just processing the incoming packets directly on the serial port, and splitting the incoming data, etc:

      3;0;1;0;23;1|0|123

      which would be: Player 1, Direction 0, Strength 123. It would even ignore the rest of the standard MySensors information as I really didn't care and only would allow packets which would result in three values anyway. So that would trigger the "pump" in the game... either one of the two windmills or the steam pump.

      alt text

      Now, I can guarantee that the result was a lot of excited children - and adults - that were... pumped 💪 to get going! I noticed one of the holes on top of the bike pump got quite a bit larger! However I do not really feel like putting photos online these days with people (especially children) I do not know.

      In total 153 games of 2 minutes were played in 6.5h time! 😃

      posted in My Project
      Kokosnoot
      Kokosnoot
    • RE: Trying to design MySensors PCB / Fritzing

      @sundberg84 said in Trying to design MySensors PCB / Fritzing:

      @kokosnoot MySensors kicad library: https://github.com/mysensors-kicad

      I managed to install that one with a bit of effort last weekend. 👌 😃

      However, inspired by bgunnarb I am already trying again for 40minutes to get a DHT11 footprint properly working, but failing thus far. There seems to be some in: https://github.com/KiCad/kicad-footprints/tree/master/Sensor.pretty but KiCad does not appreciate that as a library, (the default is to work from github.com/kicad/Capacitors_SMD.pretty for example, but those are all archived pages)

      I manually tried adding https://github.com/KiCad/kicad-footprints/tree/master/Sensor.pretty - similar as the other libraries (type Github, etc) but just get a "ZIP error"... Maybe I should try a nightly build instead of the stable 5.0.2.

      Edit: Just got it to work by downloading the entire 5.1.0 footprint library locally, and pointing to the [..]\footprints\Sensor.pretty file. Inspired by someone else with the same issue: https://forum.kicad.info/t/personal-footprints-via-on-demand-github-plugin-error-reading-zip-local-header/11777 😃. Hopefully this info might help someone else at some point!

      posted in Hardware
      Kokosnoot
      Kokosnoot
    • Powering ESP8266 / NRF24L01 repeater through USB (improvement)

      Hi,

      Here some information that might help some people. I have been using MySensors for many years now, and often struggled with some connectivity issues: Mostly due to concrete, and I also think due to the P1 port updates take a moment to upload online (even with a custom gateway which keeps the HTTP connection open, etc.)

      Recently my "old" NodeMCU gateway just failed, apparently a bit too much pressure on the USB cable and after 1.5 years of service in a new spot, it just broke the connector (obviously during a long weekend away ☺)

      As it was the last one of that type (LoLin NodeMCU 1.0), I decided to use some other equipment. Also, I wanted to make a simple "MySensors doctor" which just sends packets and gets something back - so much less functionality than the version described here: https://forum.mysensors.org/topic/9178/nrf24doctor

      So while testing the new gateway, I also noticed that my ESP8266 Wemos/NodeMCU repeater was just behaving poorly. Tried various power supplies and multiple NRF24 modules.

      After reading mixed opinions about powering through USB and the 3v3 pins of the NodeMCU, I decided just to try and build a very simple separate "power supply" using the following parts:

      USB to DIP connector (https://www.google.com/search?q=usb+to+dip&client=firefox-b-d&source=lnms&tbm=isch these with 4 pins)
      a big capacitor (my one is 670uF?) and smaller capacitor (10 uF)
      a 3.3v step down module (something which can handle 5v and bring it to 3.3v). I used: https://www.aliexpress.com/item/1005002610674227.html?spm=a2g0o.order_list.0.0.21ef1802d20uHi

      alt text

      I put these together as shown in the image in an very experimental setup... and now power the radio module from the 3v3 from the regulator, and the ESP8266 from the "stabilized" 5v supply (through the vIn pin). The change in performance has been absolutely phenomenal. Nodes Instantly connect to the repeater (quite some concrete away) and also my "mySensors doctor" suddenly reports way better connectoins: a lot of the radio modules which I considered non functional (fakes) seem to work instantly. No additional PAR requests - just instantly!

      Now, sample size is just one here.. but for me this conversion really paid of and now also considering to make similar adaptions to the gateway (which is now a ESP32, experimenting with double threading for P1 from electricity meter and gateway separate, to have less interference from the P1 every second... already wrote that code, just need to connect again some wires at the power meter.) - and more important: running on the USB port of the firewall 🙂.

      Hope it's not too much rambling. For me it really paid of, and has been such a simple yet great improvement that I would recommend others that have issues to try it too.

      posted in My Project
      Kokosnoot
      Kokosnoot
    • RE: [SOLVED] NodeMCU ESP8266 and SPI with NRF24L01 + SD card module - sanity errors?

      Re: NodeMCU ESP8266 and SPI with NRF24L01 + SD card module - sanity errors?

      Separate reply just for searching purposes:

      It worked :-)! Now it's working perfect without changing a single line of code or changing wires. I took the risk of destroying the module, but otherwise it's useless anyway for my project. I managed to use a knife to take a few mm's of pin 13 up and then to solder a wire to pin 8 and pin 13. As described in the linked topic.

      0_1493305335364_sdcardfix.jpg

      My SD backup system one step closer! 😄

      posted in Troubleshooting
      Kokosnoot
      Kokosnoot

    Latest posts made by Kokosnoot

    • Powering ESP8266 / NRF24L01 repeater through USB (improvement)

      Hi,

      Here some information that might help some people. I have been using MySensors for many years now, and often struggled with some connectivity issues: Mostly due to concrete, and I also think due to the P1 port updates take a moment to upload online (even with a custom gateway which keeps the HTTP connection open, etc.)

      Recently my "old" NodeMCU gateway just failed, apparently a bit too much pressure on the USB cable and after 1.5 years of service in a new spot, it just broke the connector (obviously during a long weekend away ☺)

      As it was the last one of that type (LoLin NodeMCU 1.0), I decided to use some other equipment. Also, I wanted to make a simple "MySensors doctor" which just sends packets and gets something back - so much less functionality than the version described here: https://forum.mysensors.org/topic/9178/nrf24doctor

      So while testing the new gateway, I also noticed that my ESP8266 Wemos/NodeMCU repeater was just behaving poorly. Tried various power supplies and multiple NRF24 modules.

      After reading mixed opinions about powering through USB and the 3v3 pins of the NodeMCU, I decided just to try and build a very simple separate "power supply" using the following parts:

      USB to DIP connector (https://www.google.com/search?q=usb+to+dip&client=firefox-b-d&source=lnms&tbm=isch these with 4 pins)
      a big capacitor (my one is 670uF?) and smaller capacitor (10 uF)
      a 3.3v step down module (something which can handle 5v and bring it to 3.3v). I used: https://www.aliexpress.com/item/1005002610674227.html?spm=a2g0o.order_list.0.0.21ef1802d20uHi

      alt text

      I put these together as shown in the image in an very experimental setup... and now power the radio module from the 3v3 from the regulator, and the ESP8266 from the "stabilized" 5v supply (through the vIn pin). The change in performance has been absolutely phenomenal. Nodes Instantly connect to the repeater (quite some concrete away) and also my "mySensors doctor" suddenly reports way better connectoins: a lot of the radio modules which I considered non functional (fakes) seem to work instantly. No additional PAR requests - just instantly!

      Now, sample size is just one here.. but for me this conversion really paid of and now also considering to make similar adaptions to the gateway (which is now a ESP32, experimenting with double threading for P1 from electricity meter and gateway separate, to have less interference from the P1 every second... already wrote that code, just need to connect again some wires at the power meter.) - and more important: running on the USB port of the firewall 🙂.

      Hope it's not too much rambling. For me it really paid of, and has been such a simple yet great improvement that I would recommend others that have issues to try it too.

      posted in My Project
      Kokosnoot
      Kokosnoot
    • RE: Trying to design MySensors PCB / Fritzing

      @sundberg84 said in Trying to design MySensors PCB / Fritzing:

      @kokosnoot MySensors kicad library: https://github.com/mysensors-kicad

      I managed to install that one with a bit of effort last weekend. 👌 😃

      However, inspired by bgunnarb I am already trying again for 40minutes to get a DHT11 footprint properly working, but failing thus far. There seems to be some in: https://github.com/KiCad/kicad-footprints/tree/master/Sensor.pretty but KiCad does not appreciate that as a library, (the default is to work from github.com/kicad/Capacitors_SMD.pretty for example, but those are all archived pages)

      I manually tried adding https://github.com/KiCad/kicad-footprints/tree/master/Sensor.pretty - similar as the other libraries (type Github, etc) but just get a "ZIP error"... Maybe I should try a nightly build instead of the stable 5.0.2.

      Edit: Just got it to work by downloading the entire 5.1.0 footprint library locally, and pointing to the [..]\footprints\Sensor.pretty file. Inspired by someone else with the same issue: https://forum.kicad.info/t/personal-footprints-via-on-demand-github-plugin-error-reading-zip-local-header/11777 😃. Hopefully this info might help someone else at some point!

      posted in Hardware
      Kokosnoot
      Kokosnoot
    • RE: Trying to design MySensors PCB / Fritzing

      Hi sundberg84,

      Thanks for your reply!

      The "lose trace" was more just a stopping point, as I wanted to be sure that I was doing things how they (kind of) should be! I thought it would not be good to try to make everything perfect, and then end up with question 1 being "no" ☺.

      All your other answers are clear, thanks a lot for that!

      @bgunnarb: Thanks for the suggestion! I did run into issues where KiCad is a bit.. too much on the parts (eg. I should measure the dimensions of my resistors to find the right option in the list). I also ahd some issues with schemas / footprints (not every part has a footprint or a schema, such as the MySensors library). but I suppose I can just work with footprints.

      Maybe I will give it another try. It does make a "cleaner" PCB when I was trying to make something similar as the image above.🙂

      posted in Hardware
      Kokosnoot
      Kokosnoot
    • Trying to design MySensors PCB / Fritzing

      Hi,

      So far all my MySensors projects have either been running on breadboards or stripboards with lots of wires going everywhere, while the design in most cases is the same. Some of the older sensors are a bit unreliable due to the jumper wires just making not good enough connections, etc. So I thought it would be interesting to design a PCB, something I have always wanted to do at some point, but now with PCB printing becoming more accessible (and cheaper) this actually becomes an option for me. I considered the EasyPCB too, but just think this might be a good skill to learn for some other projects in the future 😄

      So, I was trying to design a PCB in Fritzing - Also have tried KiCad but I think that is just a tiny bit next level, although the routing seems to be easier. However, got some issues with getting all the parts loaded properly (have the MySensors library loaded however) .

      I did some reading and I was wondering if the following two things in the image are allowed?

      A: Shows a "via" which makes a change from layer top/bottom to the other one to "cross" two other wires
      B: Shows are trace (12mil) going between two holes of the Arduino. (this case the battery level check wire)

      Also:

      1. I assume for traces I do not need to stick to the grid.
      2. a different layer trace should not cross a hole, as that makes no sense and will become one when soldering.

      It's a while new world and a lot of information everywhere, so I am just trying to stick to the basics of having wires not intersect with each other unless it's a VCC/GND

      0_1552225761912_CompleteSensorNode-ForPCB2_pcb.png

      Thanks for your quick peek and feedback!

      posted in Hardware
      Kokosnoot
      Kokosnoot
    • Wireless bike pumps and computer game using MySensors

      Hi,

      I run a couple of sensors using MySensors in my household which send temperatures, airpressure, humidities of various rooms as well as automatic watering some plants with peristaltic pumps when a threshold has been exceeded. However, for an "open day" event at my employer I suggested to make a game involving bike pumps which will control water levels. Children (and also adults 😉) have to physically pump on the the pumps. To make everything wireless, I used the MySensors library to see if I could use it for this game. Just wanted to share this project with you and some background as it might inspire someone else to make something fun!

      alt text

      So how does it work?

      An Arduino Pro Mini (3.3v) , NRF24l01, a joystick (configured to be two-directional), a 18650 battery holder+regulator for 3.3v, and microphone (MAX9814) are inside each pump. The bike pump's tube is actually going inside the box with the microphone. Using Arduino code the microphone is looking for certain threshold (peak) volume for a et amount of time... When the bike pump goes "psssh" 😄 this threshold is exceeded and some custom data is send to the gateway.

      Data send can be anything, but for me it was just: PlayerId|PumpDirection|Strength. Also, these "player nodes" are all wireless and you could put them anywhere 😎 . In the end the green node was closer to the TV as it started to have some connection issues for whatever reasons (could be very well my soldering and all the massive vibrations from the children being really though on these devices!!)

      Gateway is an ESP8266 (as "serial gateway") also with NRF24L01 attached and three programmable LED strips. Every time when data is received; the receive() function will dissect the input data so the appropriate LED strip can be triggered... Pumping would generate a "wave" effect in the LED strips. The direction of the pumping would also change whether the wave would go from the player or to the player.

      The ESP8266 is connected with only USB to a laptop. The game engine Unity is just processing the incoming packets directly on the serial port, and splitting the incoming data, etc:

      3;0;1;0;23;1|0|123

      which would be: Player 1, Direction 0, Strength 123. It would even ignore the rest of the standard MySensors information as I really didn't care and only would allow packets which would result in three values anyway. So that would trigger the "pump" in the game... either one of the two windmills or the steam pump.

      alt text

      Now, I can guarantee that the result was a lot of excited children - and adults - that were... pumped 💪 to get going! I noticed one of the holes on top of the bike pump got quite a bit larger! However I do not really feel like putting photos online these days with people (especially children) I do not know.

      In total 153 games of 2 minutes were played in 6.5h time! 😃

      posted in My Project
      Kokosnoot
      Kokosnoot
    • RE: Doubling amount of soil sensors using transistors?

      Ah, I did have mixed feelings about the alternating. I also don't know what happens with ions when water moves down after watering some plants.

      I did came across this page (in Dutch, but code in English) which kind of shows a very simple example of using the CD74H4067 multiplexer: http://12volt.kloppenburgweb.nl/een-garduino/.

      It might be a good thing to see how it performs and come up with something alternative if really needed. I was also thinking of adding some glue to the parts exposed to air.

      Thanks again!

      posted in Development
      Kokosnoot
      Kokosnoot
    • RE: Doubling amount of soil sensors using transistors?

      Hi Michiel,

      Thanks for that idea! I didn't knew these IC's existed. It looks like a good approach to me. Also good to know for other future Arduino projects.

      The only thing I was wondering if the "alternating" DC would still be feasible.
      I think the GND of the IC needs to alternate between two analog pins, using the pinMode INPUT_PULLUP similar as how it is now. This of course in order to prevent corrosion from happening due to all the ions flowing to one direction :).

      Will still have to read more about this, I expect I am not the first one that tries to do it like this!

      posted in Development
      Kokosnoot
      Kokosnoot
    • Doubling amount of soil sensors using transistors?

      My sensors projects are going well and I have three nodes running doing various things, connecting to an ESP8266. I hope to write more in depth about these as soon I have moved them from breadboard to some PCB, it also has direct SD card backup, web logging as well as writing to a MQTT server. Works quite good :-). After years of messing with 433mhz modules (and giving up),some other kind of transceivers (forgot), things are looking well!

      But I have a question about the soil sensor setup. I use the sensor system as described in various topics: the "fork" of the typical soil moisture sensor using two analog pins which alternate while reading. Works well: I have three sensors (A0, A1), (A2, A3) and (A4,A5) on my Pro mini 3.3v. Battery sensing has moved to A7 because of the pull up resistor restriction (not available on A6,A7).

      Now, I am mostly a programmer and electronics are still quite new to me. I was wondering if I could extend the amount of soil sensors easily to 6 by putting 6 transistors (2 per Analog pin pair) all to one Digital pin (Say: D0) in order to double the amount of soil sensors?

      Example:

      D0 - LOW: Read soil sensor 1,2,3 from A0-A5
      D0 - HIGH: Read soil sensor 4,5,6 from A0-A5

      Would this work? Or am I simplifying things too much from an circuit point of view? :-). And would any "standard" NPN transistor work for this?

      Thanks a lot!

      posted in Development
      Kokosnoot
      Kokosnoot
    • RE: [SOLVED] NodeMCU ESP8266 and SPI with NRF24L01 + SD card module - sanity errors?

      Re: NodeMCU ESP8266 and SPI with NRF24L01 + SD card module - sanity errors?

      Separate reply just for searching purposes:

      It worked :-)! Now it's working perfect without changing a single line of code or changing wires. I took the risk of destroying the module, but otherwise it's useless anyway for my project. I managed to use a knife to take a few mm's of pin 13 up and then to solder a wire to pin 8 and pin 13. As described in the linked topic.

      0_1493305335364_sdcardfix.jpg

      My SD backup system one step closer! 😄

      posted in Troubleshooting
      Kokosnoot
      Kokosnoot
    • RE: [SOLVED] NodeMCU ESP8266 and SPI with NRF24L01 + SD card module - sanity errors?

      Hi Yveaux,

      I don't know what comes after quadruple (quintuble? :)) but I checked the wires many times. Radio works perfect without SD card reader. SD card worked with radio connected - but then the radio does not work anymore.

      I made a fritzing of my setup, just to spot any errors, just to go check each connection once more.

      0_1493301509222_fritzing-sketches_sd_nrf-small.png

      One thing I can think of is that the GPIO15 is a hardware CS (HCS), while my D4 is not. But every example I see on the internet says that practically any pin can be the CS pin?

      Update

      More searching let me to this topic: https://forum.arduino.cc/index.php?topic=360718.0 which I think might be the case. Unfortunately, I do not have the tools to apply this fix I think. alt text

      posted in Troubleshooting
      Kokosnoot
      Kokosnoot