Navigation

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

    Best posts made by AffordableTech

    • RE: NodeMCU PIN reference

      @strixx
      👉 BEFORE YOU USE analogRead()
      You need to be aware that the MySensors core Ver 2.2 has code to support sensors reporting the chip VCC voltage. As I recall, this code is enabled by default and all readings of the analog port will return 65,535, -1 or hex FFFF, depending on the type of variable you read the value into regardless of what voltage is applied to the analog pin. MySensors has changed the 8266 configuration to read the chip VCC and ignore the analog input and I gather the MySensors coders decided to return 65,535 as an indicator.

      You will need to do a search for "ESP analog read" or similar, to find the correct syntax of the special command to change the 8266 mode to re-enable reading of the analog input pin. Note: this analog mode command must be placed at the top of your script before any other functions.

      👉 DIFFERENT NodeMCU BOARDS
      Please be aware the analog pin 'hardware' varies with different NodeMCU devices and you need to understand how the MySensors restricts how you can use this pin.

      First, I have encountered three different 'NodeMcu Ver 1' boards. Traditionally the analog pin expects a range 0V to 1V max. Some docs state going over 1V can destroy the pin, others state it can tolerate 0V to 3.3V but the anagloRead() for voltages of 0V to 1V are as expected, but 1V to 3.3v returns the same value.

      On the earlier boards I received, the analog pin of the PCB was wired direct to the 8266 chip (in the metal can) and not connected to anything else.

      About a year ago, the boards I received had additional circuitry to protect the analog pin from excess voltage.

      More recently I have received a batch of 20 boards which returned values lower than expected? Suspecting a board problem, I traced the circuit and confirmed there is a voltage divider which scales an input of 0V to 3.3V to become 0V to 1V at the actual 8266 chip. I.e. these boards requiire a 0V to 3.3V input on the analog pin. If you code reads values about one third of what you expeted, you may have a 0V to 3.3V board.

      👉 VALUES NOT CONSISTENT
      As a final tip, I have noticed that no two NodeMCU's return the same value from the analog port. I.e. five 'identical' boards from the same batch will return slightly different values, unlike the Arduino devices, which I find all return accurate readings.

      My assumption is, this is due to the 8266 using a different analog to digital conversion method, and the errors are 'possibly' due to some capacitive effect. The differences or minimal, can can be confusing and may need special attention if you are checking for a 'specific' value. Hint: always code analogRead comparisons to look for different 'ranges' of values, rather than "if analogRead(A0) == 350", because the value you get today could be different tomorrow or next week. This is good practice because the value read will vary slightly as your project's supply voltage changes due to changes in load (e.g. several LEDs turned on vs off), or even if your battery or even mains voltage is unstable.

      Hope this saves someone banging their head against a brick wall for hours like I did.🤕

      Paul

      posted in Development
      AffordableTech
      AffordableTech
    • RE: Why are the measured values so different? Are my humidity sensors faulty?

      I agree with the others, low cost sensors vary from one unit to another. For many, where they refer to "Accuracy", they often mean repeatable accuracy, which basically means if its calibration is out by say +5 degrees and they quote an 'accuracy' of plus/minus 1%, it will always read an extra 5 degrees plus or minus 1%.

      As a result, I started paying extra for 'factory calibrated' devices, but as you have found, this appears to mean very little.

      After purchasing and testing a LOT of devices and constantly being frustrated, I ended up building a test node with two each of three different sensors (6 in total) which I calibrated myself and used offsets to get them reading the same. That test node also computes and transmits average values also. Over a long period of time I found that an individual sensor will go out a bit, then return to match the others. A year later, I repeated the calibration tests and the avg value was spot on.

      Now, whenever I build a new device, I build offsets into the software which I can send to the node (using MYSController) and they are stored in EEPROM. This allows me to occasionally check its value compared to my 'test rig', and correct any offsets without taking the unit apart or reburning the code.

      My conclusion, after four years of using just about every reasonably priced ($2 to $12) device on the market, is that there is little difference between most of the units once you have set the correct offset. As a general rule, they all seem to drift occasionally and by similar amounts, but return again. Most importantly, by having a 'trusted' set of values to compare a new sensor to, I can recognise a faulty sensor very quickly, typical symptoms being they often need a larger than normal offset and the next day it's reading is significantly different again. At first, I tried adjusting the offset again and again, but now I toss them straight in the bin. If a new sensor (regardless of price) can stay in sync with my test rig for 48 hours, it will continue to be moderately accurate.

      Cheers

      Paul

      posted in Hardware
      AffordableTech
      AffordableTech
    • RE: [SOLVED] ESP8266 WDT reset

      Hi @172pilot

      PLEASE NOTE: I gather there are three different problems which have similar results:

      • A power supply with insufficient current to drive the ESP causes it to crash / reboot.
      • A NULL message (somewhere in the process) can cause ESP to restart.
      • Something called a 'WDT Reset' , which I have never encountered (?possibly only applies when using a Vera controller?).

      Because all three produce similar looking results, I posted my fix here, even though I had not seen a 'WDT Reset' message (??possibly because I wasn't running a Vera controller??).

      My Symptoms
      My system appeared to have been running 'fine' for a solid week (as a test), using MYScontroller, I didn't notice anything abnormal. I also had a telnet (Potty) connection to the ESP. It wasn't until I started testing OpenHAB that OpenHab would report that it 'could not communicate'. At the same time my telnet connection and MYScontroller just stopped, no error message etc.

      Then, OpenHab log reported that it was 'creating new connection', and resumed communicating, BUT both the telnet link and MYScontroller never resumed communications. I would have to disconnect / reconnect both, then they would continue for a few minutes until OpenHab reported the error again, when they would 'stall' again - this kept repeating.

      If I stopped OpenHab, then the Telnet and MYScontroller worked flawlessly. At first I assumed that the OpenHab binding was the problem. Lots of testing, inserting debug 'print' statements into the drivers etc etc... Eventually I discovered that the 'MySensors ESP driver' was receiving a NULL pointer, when it was expecting a char pointer to a message, this was causing the ESP to reset.

      I've since been told this problem was fixed in the MySensors 2.0 (beta) drivers and only applies to the 1.5 version (current ver at this point in time).

      I hope this helps others clarify which of the three 'causes' apply to their issue. For example, my ESP was resetting, I didn't have a clue if it was a "WDT" reset, it could have been an "ABC" or "XYZ" reset as far as I knew. I still don't know what a WDT reset is?

      Cheers... Paul

      p.s. The first thing to check with any radio device (ESP, nRf2401 or GSM etc) is that you MUST have a good power source. When these devices transmit their current requirements go up significantly, which can cause all sorts of weird and wonderful thing to happen. Whenever I have a problem with a radio device, I will (temporarily) power the (3.3v) RF device direct from a Lipo battery (3.7v) with a 1N4001 (or similar) diode in series, this drops the voltage to 3.1v. Even though the voltage is a tad low, the Lipo (or NiCad) can deliver tremendous 'grunt' (amps) thus its a 'clean' and stable power source!

      posted in Troubleshooting
      AffordableTech
      AffordableTech
    • RE: Would You Like Support For ESP8266 'Nodes'?

      Thanks @scalz,
      A very helpful an welcoming reply.

      Im no great fan of ESP, particularly becuse of its lack of i/o but it seems ideal for a simple node wirh one switch or I2C sensir.

      Here (in Australia) Adafruit and Spark fun products are 200% to 300% higher than US price. I get stuff direct from them when I need qty, but fir 1 or 2 boards, the shipping is just too expensive. So yes, an Adafruit or Spark 5x here is $65.

      Anyhow, I will be checking out AliExpress - thanks!

      If I can contribute, I will, I'm so happy with my HA, I want to see everyone experiencing what a truly 'smart home' is about. Hardware vendors push their own idea of smart home, but many dont want to share data with competitors products. Sharing data etc is what makes o.s. projects so great. If I can create, or help to create an ethernet based nodes, that would be fantastic as I know how good it is if a simple MySensors temp sensor could switch on a heater 'direct' without having to rely on a controller.
      The reason u think this is good, is because little micro processors just seem to do their job year after year, without maintenance, as long as you feed them 'volts'. Complex controllers just are not as reliable.
      My water heater is controlled by Arduino which saves me $1,200 pa at least. My hot water now costs 35 cents a day (because it knows my patterns), whereas it usdd to cost $2 to $3 per day keeping it at 55 deg c (thermostats often not adjustable in Oz).

      I just need 40 deg most of the day (for hand wash etc) and a 'boost' to 55 deg just before my shower/bath. If I want a shower at an 'unusual' time, I have a 'boost' button on my phone or PC and 15 min later water is HOT!. $1200+ for the occasional inconvenience of waiting 15 min is fine 'smart' by me.

      Cheers,

      Paul....

      posted in Feature Requests
      AffordableTech
      AffordableTech
    • RE: Safe In-Wall AC to DC Transformers??

      Hi all...

      I've recently received 20 of these units (see picture below) and hooked all but two of them all up to 240v with a dummy load resister to test. The other two are driving MySensor nodes to make sure there are no unexplained resets etc. They are well made and are claimed to be a "Mature" and stable unit. So far, no smoke and the ones on nodes have not reset, so all looks well. They have temperature protection, overcurrent, overvoltage and short circuit protection.

      I went for these rather than the HLK-PM01 because:

      • Being an open PCB, i can easily attach a lead onto the low voltage AC side of the transformer for use by the EMon Energy Meter library in calculating the actual AC voltage in order to derive more accurate power usage.
      • The other thing I like is they are not a 'potted blob' - while the blob is a lot safer with regard to errant fingers etc, I feel they must run a lot hotter, and heat not only causes components to die, I figure it could increase the fire risk?

      And the final factor being that the price is a bit over one euro, making them the lowest cost AC power supply I've come across for nodes.

      Product link: <click me>

      FWIW: All the regular "Express" freight charges from China to Australia are about AUD$25 to $30, but this supplier offered an express courier for $7 (US$5) - When it sounds too good to be true. . . Well, the goods were collected from the supplier in China on Wed mid-day, and arrived at my door at noon on Friday. When you consider I live 100Km outside of the main city (Perth), which normally adds two additional days onto any delivery, this was utterly amazing!

      Cheers,

      Paul
      alt text

      posted in Hardware
      AffordableTech
      AffordableTech
    • PCB Design Guru Wanted

      Hi all,
      I trust this post does not breach forum etiquette...

      In four to eight weeks, we are launching a KickStart campaign for a specific new product and want to hear from individuals with suitable skills to take responsibility for converting our schematics into assembled prototype PCBs, assuming our campaign is successful. While you being Australia based would be convenient, we are open to hearing from anyone anywhere. Although this is our first KickStart campaign, we have a number of excellent projects ready to follow. So while this may be a relatively small project, everyone on our team intends for this to launch a full time operation for years to come. Therefor this may be an ideal opportunity for you to make the change from 'good hobbyist' to a professional career.

      As a guide, our project is based around [A] a central Arduino+ESP communications controller with a variety of serial & I2C sensors. Plus [B] five smaller modules, all similar, but with small variations, being Arduino 328p modules designed to all have a common base of temp, humidity and 2 gp i/o, with 'some variation' plus option to support either RF24 or RF69 radios. These 'bare bones' modules will need to be powered by external 5v OR an optional battery. Everything we propose should be familiar to anyone who has MySensors design experience.

      We anticipate up to three prototype cycles before committing to the final production run. If you have the experience to take responsibility for converting our schematics into PCB ready art and/or prototype assembly, I'd love to hear from you, please email sensors@ptit.com.au with a brief background to start the conversation.

      Cheers,

      Paul

      posted in Development
      AffordableTech
      AffordableTech
    • RE: Would You Like Support For ESP8266 'Nodes'?

      TO ALL IN THIS TOPIC
      I though it was appropriate I acknowledge that I now realise I misunderstood there was anti-ESP sentiment here, its more a case of just too busy to jump onto every idea mentioned. Like a few others who spoke to me, I failed to make an official request, therefore until I did and was told err.. 'where to go', I should not have assumed anything.

      There was never any ill intention, just frustration as I probably love MySensors as much as anybody else here. Like everyone, I have real time restraints, but if I can conribute, I will.

      My thanks to everyone who has taken the time to comment.

      Paul

      posted in Feature Requests
      AffordableTech
      AffordableTech
    • RE: Saving three bytes of memory with this crazy loop structure..

      Hi @mfalkvidd,

      Problem is, when your code can't compile because you are one (or several) bytes short of ram, nothing else matters.

      As to readability, I assume you know about that rarely used compiler feature called 'comments'? I hear they use zero Arduino RAM and even less ROM memory. 😳.

      Ok, I'm just being cheeky, so don't flame me, it just seemed a good opportunity for a reminder to everybody. Point being we are all guilty of not using enough comments in our code.

      You said you are worried about readability and maintainability - it's just like code backups, it's a problem only because we only worry about them 'after' a drive crash, or in the case of comments, two years later when we are trying to remember what the hell this weird code does.. THE REALITY: If we are really worried, we would add liberal comments and do regular backups - otherwise I say we're not really 'that' worried.

      Cheers,

      Paul

      posted in General Discussion
      AffordableTech
      AffordableTech
    • RE: "Weathercock" / weather comfort station

      What a fantastic arduino project - I love it, however...
      This Project is Crying Out For Another Feature

      This really needs an SD card with WAV player module (and small amplifier). At your normal 'Wake Up' time, it plays a couple rip-roaring 'cock-a-doodle-doooo' calls. On the hour there could be misc clucking and scratching sounds etc, except when the rooster is sleeping of cause😀. All audio accompanied by the rooster turning back and forth, if the speaker is mounted in the rooster, the sound would change as it echoed off other objects in the room.

      This project has the potential for kit production, I for one would purchase a kit...

      But mine would be a wall mounted 'corrugated iron coop', with the rooster popping out hourly as two big old barn doors fly open... An Aussie answer to the Swiss cuckoo's!

      Paul

      posted in My Project
      AffordableTech
      AffordableTech
    • RE: ESP8266 as MySensors nodes instead of Arduino + nRF24L01

      @rejoe2 said in ESP8266 as MySensors nodes instead of Arduino + nRF24L01:

      I personally do not like to mesh up Home-automation things with WiFi

      While I understand your personal preference not to mesh Home Automation with WiFi, I've seen so many people seeking to use the ESP8266 as a node, without adding an RF device. I.e. you prefer not to, but many others (including myself) would love to have the option.

      While there are 'work-arounds' to add a sensor to an ESPGateway, it's a very impractical solution if you want to have many WiFi nodes. I believe MySensors is the most complete and functional project of this type, but the lack of this feature is forcing people to use other projects like EspEasy as recommended by @ejoe2.

      I've been delving into the MySensors code and the only issue I find is the need for a 'WiFi Transport' to be added to the existing RF radio choices e.g. MY_RADIO_WIFI. All the low level transport code is already written and used in the gateway transport, it just needs to be re-configured as a node transport as I see it? I have considered trying to implement it myself, but it needs a far greater knowledge of the MySensors core than I have, to implement it without breaking other transports etc.

      Reading through this forum, this is something that has been sought after since the ESP8266 first appeared and I think would greatly enhance the popularity of MySensors as it would make it so easy for the novice to get a MySensors network up an running.

      A typical 'starting' network of one ESP8266 Gateway, plus a few ESP8266 sensor nodes would just require flashing a few NodeMCU's and you are in business, no messing around with proto-boards, wiring radios, adding capacitors etc, which has frustrated and/or put off so many newbies before they even started. The dreaded 'wiring' would then be as simple as plugging in USB cables, opening up this very 'practical hobby' to a lot more people. you might even call it 'Plug and Play' (Jeesh.. I might patent that term ).

      This would be a great way to introduce non technical users to the world of micro-processors, and Arduino boards would then be a far less scary proposition.

      I'd appreciate some form of 'official' feedback as I feel I am currently at crossroads because I have a a pressing need for multiple WiFi nodes and would like to find out if there is no intention of marrying WiFi into the MySensor network.

      Many thanks,

      Paul

      posted in Feature Requests
      AffordableTech
      AffordableTech