So after a break not using, working on or thinking about this project i got inspired again.Decided the Voltage Booster was more trouble than worth and that if i could get (cheaply enough) a low idle current consumption voltage regulator that could run all the time, to regulate 6xAAA batteries to a voltage for the arduino to manage everything from there.
Enter the MCP1702, 250 mA Low Quiescent Current LDO Regulator, with an idle power usage of 2uA (mine was 6, but my meter may be off) , i went with the 5v option, and a pack of 10 cost me just $6.64 !
So 6xAAA , - i had to switch to AAA to fit them all in :( - is about 5.4v - 9.6v range.
This is constantly regulated to 5v for the atmel chip, it then switches with transistors the supply of this 5v to the 5v sonar module, and the 3v3 regulator which feeds the RF24 module.
Ive also added another transistor switching circuit to switch the raw batter voltage to
a voltage divider that the arduino measures the charge of the battery
through. (as a permanently connected voltage divider will constantly
drain the battery)
And its working again ! , so hopefully it runs well, i feel it will.
If this goes all well, next i may design and make a pcb for the whole thing, while improving the base station.
So after testing over the course of a tank of water (we pump up and irrigate from this tank so has moderate turnover) i found it was not reading more depth than about 80cm, after much debugging ive come to the understanding that the ultrasonic control board and sensor are very susceptible to interference, thus why the cable for the sensor comes as a shielded coax. So it was not a good idea of mine to put un-shielded wires on the ends, and also to bring the wires out the 'front' of the board rather than out the back as it originally comes.
Also i found that with NiMh cells once it got down to about 2.1v overall that when the sensor control board is powered on , it causes a momentary voltage drop that is enough to vcc down below 1.8v for a moment which trigger the brown out setting and the arduino reboots, so 2x NiMh will not be able to be used right up, but this is not too bad, otherwise use alkaline.
(ignore the mega under the batteries) After several intense troubleshooting days i finally got a prototype working off 2xAA batteries using a dc dc boost convertor to up the volts to 5v for the distance sensor and then a 3v3 regulator to drop it down again for the power amplified NRF24L01+ radio module ! each module: power, rf, & distance can be separately turned on by the 328p as needed and off for low power sleep.
I also conducted range test results. Initially with 2x non amplified rf modules (pcb antenna) it was not great, would have made it the distance i needed, but not enough for the type of project i want this to be.
Then i tried with the base using the PA/LNA External antenna type and this improved range greatly in open air.
i next revision i will use these in both base and sensor, the only draw back with these modules is if running off battery you must switch the vcc on/off with arduino between uses as their idle current consumption will kill your battery in no time, they dont power down their amplifier chips.
So it worked for most of the day, but then ran into battery problems. As the NRF needs 3.3v, the 328, is less fussy and can take 1.8v to 5.5v, while the water sensor needs 5v though ive tested it down to 4.3 ok. (not going to test it over 5v though) .
So in my initial test i had 3xAAA batteries, 2 going to the 328 and RF and the 3rd just the water sensor. But overnight as the batteries dropped down to about 1.3v each (4.2v total) the sensor stopped working. And the RF now on 2.6v also stopped.
Trying to avoid running a regulator 24/7 to save wasted power, i thought about my options, and am going to try this next.
2xAA batteries running the 328, which will work with either alkaline or nimh. The 328 drives a pnp transistor, that switches this same voltage on off as needed to make readings. Once "on", the voltage will then go to a DC-DC boost module that boosts it up to 5v for the water sensor, this is also then regulated down to 3.3v for the RF. The reading is made and sent off then the 328 turns this circuit off, and puts its self to sleep until the next reading time.
kinda like this one, but the one i am making is more autonomous. i like this.