Go Down

Topic: Radio Communication, Incomplete data on the receiving end (Read 2367 times) previous topic - next topic

raschemmel

I think you may in over your head. You are making decisions based on pure conjecture and not electrical design experience. I am not saying you shouldn't try to do this but I think you should know more about the TYPE of LEGOS you are trying to plug together. At first glance it just strikes me as a sort of electronic fruit salad that's been half tossed. I would have started with a block diagram in the first post and a simple question "how do I interface these blocks ?"

instead of this:
Quote
I'm attempting to transmit data over radio signals, but my receiving end is spitting out gibberish.

The serial monitor shows,
Start
 0 0 1 0 0 0 16 5 (@) (!) 0 1 0 0 0 128 16 4 0 17 0 1 0 0 0 0 4 1 0 0
 0 0 1 176 2 0 0 4 1 0 0 130 0 0 ( ) (") 0 0 0 0 0 4 1 0 0 1 16 0 (@) 0 0 0 0 4 1 0 0 0 (H) 0
 0 0 0
When it should be a legible message.

On the signal out I have a radio transmitter with a Tx pin connected to serial 2 on an Arduino mega. The code just enables the transmitter, then does "Serial2.println("message");". Baud is 1200. Transmitter data sheet here (HX1)

On the receiving end I'm using a library called SoftModem (SoftModem-005) to demodulate the signal. I'm pretty sure my code here is the reason the gibberish, I have almost no idea what I'm doing. Most of this code is from a tutorial I found. These are the settings I have in the .h file.

#define SOFT_MODEM_BAUD_RATE   (1200)
#define SOFT_MODEM_LOW_FREQ    (1200)
#define SOFT_MODEM_HIGH_FREQ   (2200)
#define SOFT_MODEM_RX_BUF_SIZE (32)
 
There is no schematic attached to your first post. Later you posted this:


I don't see anything here that indicates an AUDIO =>TTL  or TTL => AUDIO interface in your system.
Audio signals must be capacitively coupled and voltage biased to 2.5V to interface to an analog input.

I don't see any oscilloscope screenshots for inputs or outputs. (until later in your most recent posts)

You certainly get an "A" for AMBITION, but I would give lower marks for planning and execution because you are interfacing very different types of circuit blocks.

You probably think I am unfairly critical but that's because I am a professional electronics engineering technician and these kinds of projects are usually done with a lot more research in the commercial world so seeing this as a "hobby" project, it strikes as just "thrown together", rather than "carefully planned" and the forum posts strike me as sorely lacking in schematic reference detail.

That's just my opinion. I'm not saying you shouldn't try it. I'm just saying you should provide more technical details in the way of schematics, which seem to be completely missing here.

I'm a hardware person and it just seems rather difficult to separate software issues from hardware issues with so little information.

In general, it just seems like you are stumbling around because you are making so many assumptions that are not based on an electrical engineering design background. It is , as you say, just a hobby, so of course you can do whatever you want but I have specifically stayed out of this post because I don't see any schematics. Had they been attached, I probably would have gotten more involved. Without them, I don't see any point in even thinking about your problem. I've just sharing my viewpoint, which of course you are free to ignore and continue as you have been doing. What's the worst that can happen anyway ?


Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

jremington

I've seen the HX1 used in a number of high altitude balloon projects, like this one: http://www.sbszoo.com/bear/construction/traker/utrak1.3/utrak-V1-3.htm

Evidently the HX1 has a digital input but the internal modulation generates the required audio tones in the matching receiver, HRX1. So, the microModem tone generation code is not needed. It appears that you still have to assemble packets with preamble, sync, data and checksum.

To use the HX1, you need the matching receiver and to follow the manufacturer's or other people's advice on how to set up a functional communications system. I haven't done the research required in order to be of assistance.

The microModem software is better suited to handheld radios intended for voice communications.

Note that you need a license to operate the HX1.

GustavoMcSavy

I don't see anything here that indicates an AUDIO =>TTL  or TTL => AUDIO interface in your system.
Audio signals must be capacitively coupled and voltage biased to 2.5V to interface to an analog input.
The diagram wasn't meant to include everything, it was just to show where I think the two different types of signal modulation are happening, FM and FSK, to make sure I wasn't mixing them up. I do have a capacitively coupled receiver. The schematic was available in the link to the micromedem I said my circuit was based on, but it probably would have been better to post it here too.

I don't see any oscilloscope screenshots for inputs or outputs. (until later in your most recent posts)
Maybe you missed it, but in the previous posts before the scope shots, I mentioned that I didn't have a scope. I just bought my first oscilloscope and as soon as I learned how to use it I had those pictures up.

You certainly get an "A" for AMBITION, but I would give lower marks for planning and execution because you are interfacing very different types of circuit blocks.
I have the patience to screw up repeatedly. It's the most effective way for me to learn. It's more about the learning than the project anyway.

You probably think I am unfairly critical but that's because I am a professional electronics engineering technician and these kinds of projects are usually done with a lot more research in the commercial world so seeing this as a "hobby" project, it strikes as just "thrown together", rather than "carefully planned" and the forum posts strike me as sorely lacking in schematic reference detail.
Screwing around, tossing stuff together that shouldn't fit, inconsistent progress, and dead ends. All part of the amature/hobbiest experience. I am learning, and I'll take your advice to include every last detail, schematic, and line of code of my project when I make the next post.



I've seen the HX1 used in a number of high altitude balloon projects, like this one: http://www.sbszoo.com/bear/construction/traker/utrak1.3/utrak-V1-3.htm

Evidently the HX1 has a digital input but the internal modulation generates the required audio tones in the matching receiver, HRX1. So, the microModem tone generation code is not needed. It appears that you still have to assemble packets with preamble, sync, data and checksum.

To use the HX1, you need the matching receiver and to follow the manufacturer's or other people's advice on how to set up a functional communications system. I haven't done the research required in order to be of assistance.

The microModem software is better suited to handheld radios intended for voice communications.
So do I need to buy another radio? I was hoping to avoid that. Since all the APRS transmissions should be standardized, would I be able to keep the receiver I have and just change the code on the transmitter to just write all the right bits? The HX1 is made specifically for APRS, and If I can receive any other APRS packet on my micromodem/LibARPS receiver, I should be able to receive the packets from the HX1.

Is there a way to get LibARPS to give me the unparsed APRS packets, like a GPS can return NMEAs as they come?

Note that you need a license to operate the HX1.
I got it, they even made me give my call sign before I was allowed to buy it. I'll admit, I only studied for two hours before taking the test. I got almost every answer correct on the test, but it may have been too easy if it lets a dummy like me on the airways.

jremington

There is nothing on the HX1 product page or data sheet to indicate that it was "made for APRS" and nothing to suggest that the HX1 is intended for use with receivers other than those made by Radiometrix. APRS is listed as one of several possible applications.

In order to use this transmitter for APRS, one would normally need quite a bit more information than is given in the HX1 data sheet. I'm certainly puzzled about how it is supposed to work!

Update: I looked through the code and schematics of the APRS Trackuino project, which uses the HX1 as the transmitter. http://www.trackuino.org/2011/07/trackuino-shield.html

As you will see, the TX input on the HX1 is analog 0-5V, and the 1200/2200 Hz AFSK modulation of the HX1 carrier is generated by the Arduino using fast (62.5 kHz) PWM.  I'm surprised that no low-pass filter is used between the MCU and the HX1 input.  The Trackuino software is quite a sophisticated package.

The microModem TX output isn't directly compatible with the HX1. With an amplification stage, the combination might be made to work.



GustavoMcSavy

#19
Aug 10, 2016, 03:15 am Last Edit: Aug 10, 2016, 04:50 am by GustavoMcSavy
There is nothing on the HX1 product page or data sheet to indicate that it was "made for APRS" and nothing to suggest that the HX1 is intended for use with receivers other than those made by Radiometrix.

APRS is listed as one of several possible applications.

In order to use this transmitter for APRS, one would normally need quite a bit more information than is given in the HX1 data sheet. I'm certainly puzzled about how it is supposed to work!
I was a bit confused by the lack of information on the datasheet as well. I didn't even know it would produce the two tones on it's own until you pointed that out. That's why I was trying to feed it an already modulated signal. Modulation is probably the wrong word for using tones to represent bites, but i think you get what I mean. I saw that comment before you edited it, I'm not that dumb, but it might appear that way because I'm pretty bad at communicating my thoughts. English is not my strongest subject but I'm only 19, so I have time to work on it.

I'm just going to think out loud about this for a bit. The HX1 is available in multiple frequencies, so the list of other applications may be referring to other frequency models. Since 144.39MHz is reserved for APRS in the US it shouldn't be used for other things. If it's producing the two tones on its own, it must be the standard 1200 and 2200 then. It did mention in the datasheet that it can send data up to 10kbps [Edit: 3kbps]. That tells me the baud is variable, so either data in is limiting the baud, or there's a way to tell the transmitter what baud I want to use. If there's a set of commands I can send to it, it certainly did a bad job of informing me on the datasheet. My impression is that this is a dumb transmitter. It's just going to take a signal in, and emit FM. Unlike what I would call a smart transmitter, that I can send commands to set baud/tone frequencies. I'm going to do some experiments. Write a byte to the transmitter, and see what it looks like on the receiver. I'll look for the two tones and the baud rate on the receiver and compare it to the signal going into the transmitter.

I'll get back on here when I figure out how this transmitter is supposed to work.

GustavoMcSavy

Here are some specifics for each version of the HX1. APRS, Meter reading, and tracking were this listed applications for the product line, but this one is specifically for APRS.

Quote
Variants and ordering information
The HX1 transmitter is manufactured in the following variants as standard:
HX1-144.390-10 US APRS
HX1-144.800-10 EU APRS
HX1-169.4125-3 EU Meter Reading, Asset Tracing and Tracing

jremington

Well, that specification tells you the base operating frequency.

allanhurst

Note from your hand drawn diagram that you're driving the HX1 directly from a digital output.

The HX1 DOES NOT generate the two-frequency AFSK tones - you need a modem eg the micromodem you linked  to get these.

You're wasting your time otherwise.

regards

Allan.

raschemmel

Quote
The HX1 DOES NOT generate the two-frequency AFSK tones - you need a modem eg the micromodem you linked  to get these.

You're wasting your time otherwise.
Quote
Screwing around, tossing stuff together that shouldn't fit, inconsistent progress, and dead ends. All part of the amature/hobbiest experience
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

GustavoMcSavy

The HX1 DOES NOT generate the two-frequency AFSK tones
People have told me it does, people have told me it doesn't. The data sheet isn't clear on whether it does or doesn't. I have seen evidence that it does, but it doesn't seem to work either way. Do you have a source to back up this claim?

raschemmel

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

allanhurst

The HXI datasheet block diagram shows direct modulation of a VCXO by the  ( attenuated and filtered} input  signal - it can only transmit that signal, and if the input doesn't have afsk signals, it can't make them


I've designed such things.


regards

Allan

Paul_KD7HB

Based on the diagram and some of the other posts, the digital data can be recovered in the receiver by finding the discriminator circuit and picking off the DC output. That will be the same data as sent by FSK on the transmitter. That is not "audio", but can be made a TTL signal with an op amp.

Paul

GustavoMcSavy

I've found that the HX1 does not make the signal FSK on its own, and that the squelch on my radio seems to take an unpredictable amount of time to enable. anywhere from 50 to 600ms. I'll continue to include the tone generation and I'm going to set the receiver on open squelch.
 
Also, I found this other tracker design that uses the HX1 specifically for APRS. It's called Trackuino. The schematic shows a direct connection between the digital pin and the HX1, except for a seemingly useless level shifter. If anyone can explain why it's shifting 5v to 5v, that would be nice. maybe it's acting as a buffer, but that seems kinda pointless. It seems there are no level shifters needed at all, since my GPS takes 5v.

This firmware is filled with unnecessary add ons. I'm going to try it out, then see if I can clean it up. I'll still use the Libarps on the receiver, since Trackuino doesn't include any receiver code.

Go Up