Search results

  1. M

    Using a voltage divider to measure battery voltage

    Thanks. Lots of information to digest here. The reason for the coin cell was simplicity. For a longer term monitoring solution the voltage regulator would be better and give a more accurate result and the drain will be minimal compared to the several hundred ampere hour capacity of the...
  2. M

    Using a voltage divider to measure battery voltage

    Thank you for this code. This should prove very helpful in getting the application up and running.
  3. M

    Using a voltage divider to measure battery voltage

    Thank you for this information which is very helpful. With regard to the capacitor on the lower resistor what sort of value is recommended? Thank you also for the explanation of why the small white rectangular capacitor on the input supply is needed which also explains why an adc pin shows...
  4. M

    Using a voltage divider to measure battery voltage

    Thanks for this helpful input. Can you point me at one of your other posts as I have tried searching the forum and do not find any concise data on what resistor values would be appropriate but somewhere I have seen that this should not exceed 100k ohms in total. Driving of the supply being...
  5. M

    Using a voltage divider to measure battery voltage

    The requirement is to monitor the state of two 12 volt lead-acid batteries which are attached to a theoretically 'intelligent' regulator which charges the primary battery as a priority but also attempts to maintain the secondary battery in condition. It seems that this has not been happening...
  6. M

    Using a voltage divider to measure battery voltage

    Hello All, It would seem to be a simple matter to use a voltage divider and ADC pin to measure voltage but the forum and the internet seems to be awash with complicated solutions and discussions on unexpected ADC values. Picaxes also seem to be quite sensitive to the resistor values on their...
  7. M

    PICAXE on MAC OS 10 Vn 15.5

    Deathly silence. Unfortunately a lot of tried and trusted software no longer works with the latest version of Mac OS and this is about to get a whole lot worse as they are soon to ditch Intel processors. VS Code can be easily made to work in place of Macaxepad (the downloads on the Picaxe site...
  8. M

    Simple water detection circuit for picaxe

    Have now tried removing the sertxd and everything works exactly as expected. Thank you for this useful tip which is also a valuable piece of knowledge for any future projects.
  9. M

    Simple water detection circuit for picaxe

    Thank you for your helpful input. Unfortunately I cannot access the computer and code right now and have reverted to BillBWann's original code except as described in my longer post. His solution is now doing a real life field test due to an unexpected failure of a float switch since my initial...
  10. M

    Simple water detection circuit for picaxe

    Yes sertxd is there to report the value from readadc. I thought it was coming from resetting the pullup but sertxd is the most likely cause and this can be easily tested. Otherwise the code functions well as is and is already at work as a stand-in for a float switch which cannot be obtained...
  11. M

    Simple water detection circuit for picaxe

    The reason for using thicker wires was based on the Arduino variant of the project where it was noted that thin wires did not work very well as the sensing electrodes were about 1.5 metres away from the Arduino board since they had to run through a specific path using a pre-existing cable track...
  12. M

    Simple water detection circuit for picaxe

    Thank you for these helpful suggestions. In fact with the help of the forum members the solution seems to be essentially found. Not sure how to post a round of beers to all the forum members who have helped on this but I now have a very happy consignment of picaxe 08m2's which can be put to work.
  13. M

    Simple water detection circuit for picaxe

    With the Arduino it is definitely necessary to average several readings but with the picaxe a single reading gives a quite stable result. Your original code used readadc which I changed to readadc10 with word variables but readadc gives sufficient precision. I note your observations on the...
  14. M

    Simple water detection circuit for picaxe

    Yes this works well and is as simple as I expected it to be. Many thanks for this suggested solution. On the Arduino version the program takes about 10 samples over 200 milliseconds and averages them to get a more stable reading. On the picaxe 08m2 this technique produces a very different ADC...
  15. M

    Simple water detection circuit for picaxe

    The Arduino circuit was a jury-rig repair to replace a commercial ultrasonic switch. But the Arduino system works so well that it has become permanent. But it seems a shame to have a full sized Arduino or even a micro sized board tied up when all that is needed is one adc pin on a 8pin chip...
  16. M

    Simple water detection circuit for picaxe

    Thank you for this idea. It seems bizarre that something that works well on the Arduino (both Samd and 328) would not work on a picaxe although perhaps the electrical characteristics of the chip are different. I have tried a range of resistors from 100k to 10M with no success. Allycat has...
  17. M

    Simple water detection circuit for picaxe

    The 1Mohm circuit is taken from something that works with the Arduino family of processors and seems to work on both SAMD and 328 series boards. In practice it is reliable but the trigger value needs tuning based on the wiring setup, electrode type (which are marine grade 316 SS bolts) and...
  18. M

    Code to detect single press, long press and double click of a push switch

    This works brilliantly and very simple to implement.
  19. M

    Code to detect single press, long press and double click of a push switch

    Unfortunately #MACRO does not seem to exist on MacAXEpad?
  20. M

    Code to detect single press, long press and double click of a push switch

    GOTOs are generally regarded as an arch crime against logic these days but sometimes they are the simplest way particularly when the program is only 20 lines. The main complaint I have with picaxe basic is that you cannot pass arguments to subroutines (unless someone knows better) but controlled...
Top