More HM-RF quirks and Friendcom
I made the move from breadboard to stripboard (photos) so i could conduct a trial on site yesterday. Box not shown. The objective is to collect temperature data from many points on a big 650 tonne piece of mining machinery but without running wires which need to be connected (aargh), cable tied, run distances etc, with difficult access, and no batteries to fail in the heat. Well, pleased to report that the Hope RF module powered by small solar cell and 1 Farad Super Cap did this OK, over ranges of less than 50m with but tons of steel in the way, and with the cute little rubber duck aerials OK. I had no need to test further distance, only for the metal interference and without direct line of sight. I was thinking of using one of Stan's home made Yagis at a central pt if i needed to.
But, as we have seen, the enable pin doesn't actually switch it into sleep mode, i used the NPN - PNP high side switch combo to switch + 5V and Enable, with a duty of about 1.5 seconds every 30 seconds. It was pretty sunny (and hot) yesterday, but the solar panel was not in direct sunlight.
The difference with this circuit and the circuit in my previous post is that the serial out pin no 7 is also used as the serout for the input to RXD of the HM-TR module. I figured this would give me a bit more flexibility, as it would free up an ADC pin for other devious purposes, plus by using SERTXD and "setfreq m8" i could output at Baud Rate of 9600. This would allow use of the HM-TR under default settings, without using setup at all. This could be the fallback in case the HM-TR inexplicably does not hold its settings, a quirk that many of us have now seen. Also, if needed i could test the effect of baud rate on transmission distance. I don't have a handle on that yet.
Well i carefully programmed my modules for Baud 300 (twice and read twice), then put them into their respective circuits, with no pins esp config floating, config was ground. Used serout n300. This worked OK, then i put in a variation to the picaxe program, and started getting garbage or nothing. But I'd locked everything down. How could this be?
I can only think that the serial download into the picaxe that also went to the HM-TR DRX and confused it, and it reverted to default. Does that make any sense?
I changed the configuration of the receiving module to 9600, and started receiving data again. Note here that i received data by direct connection of the HM-TR to the computer serial interface, which can be set to 9600 easily. If i was relying on another picaxe i would have been buggered. In theory you can receive at 9600 via the serial input pin of a picaxe 28X1 using SERRXD and setfreq m8, which is what i will have to do if i want reliability, it seems. But now we are losing the simplicity which was one of the features of Stan's article in Si Chip anyway. Maybe interfacing via RS232 as per DrAcs suggestion may be more reliable.
Here's the thing- I am still using serout n300 to input to the HM-TR, but it is apparently transmitting at 9600, because that's what i am receiving at. (the module is soldered in to the transmitter, i can't check it). How does that work? I thought that was the whole point of setting the frequency was that they had to be matched.
Anyway, the quirky Baud rate resets don't spell reliability to me. I was going to use the 28X as a receiver anyway, since this has a timeout feature that allows the program to progress if no data is received. It seems in this particular enviroment it works at 9600, but i'm losing whatever range benefit comes from the lower baud rate.
The Friendcom FC211SP modules come supplied also as 9600, also user configurable, but is this any more reliable than the hope modules? The data sheet talks about "Command frame format", is this only done through the interface software, or maybe the picaxe can do it?
Control via the Picaxe can be to 1) keep these parameters in check, in case of quirky resets, and 2) vary parameters according to circumstances - could be a benefit. If the "idle" works the way that "config" is suppoosed to on the HM-TR then it will be a lot easier to manage power in low power situations, no high side switches, only a high or low direct from the picaxe. Maybe the HM-TR control chip is remarkably similar to the Friendcom control chip, seeing thet both companys are in the same town in China.
Power consumption of FC-211 is much higher than HM-TR, but in the scheme of things not that much at all, if you want the additional range. Receiver more sensitive, must be beneficial for two way communication.
David at Microzed being the local agent is very handy, you just make a phone call in the morning and you get your stuff nicely packaged in the mail the next day. At $45 a pair including antennas they are a bargain. Also as quirks arise he can tell people and put things on his web site - eg the comment about "if ??? click on English" must be a time saver for many. I'm going to make up a few prototype modules, but operating at 9600 because of reset reliability, and with the PNP NPN combo (i should not have to use) to manage power.
Having said that, I want to make it easier and simple and reliable, and the Friendcom modues suggest that they will remove these quirks, if you believe the chinglish. Also there are a couple of extra lights in there to connect to the picaxe. Stan, I'd like to have a go at a couple of these, what do i have to do? Who do i talk to? Can do paypal, direct transfer, phone David, whatever.
RFMA are regular advertisers in Si chip. Have you considered them at all? Are their modules just too expensive for a hobbyist, or not picaxe friendly?