Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:53 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : 433MHz transmittters and receivers

Author Message
VK2AHB
Regular Member

Joined: 28/07/2022
Location: Australia
Posts: 51
Posted: 01:24am 13 Aug 2022
Copy link to clipboard 
Print this post

Hi again,
Some of the Arduino projects that I have built use the ubiquitous 433 Tx/Rx combos and ASK modulation. I have transmitters for Outside Temp and humidity (DHT22), garage door switch, GPS time.
So, are there any equivalents in MMBasic?  A search for 433 found nothing.

Paul VK2AHB
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:05am 13 Aug 2022
Copy link to clipboard 
Print this post

I used one of the cheapies to control my bore pump for a while.
The code I started with is here:
https://www.thebackshed.com/forum/ViewTopic.php?TID=9382&PID=102821#102821#102821
The bitbang csub has been replaced with an inbuilt command.

Jim
VK7JH
MMedit
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 02:42am 13 Aug 2022
Copy link to clipboard 
Print this post

Hi Paul,
Welcome!
I may have missed something but many of us use a pair of HC-12 transmitter/receivers.
In MMBasic is is trivial to set them up as a serial port and just send (PRINT #n, . . .) and receive (INPUT$ #m . . .) ASCII strings.
I have a several DH22s and DS18B20s scattered around the place all talking via HC-12s.

Grogster in NZ is a wiz.

For a start search here on HC-12 or HC12.

Cheers,


Andrew
 
greybeard
Senior Member

Joined: 04/01/2010
Location: Australia
Posts: 174
Posted: 04:40am 13 Aug 2022
Copy link to clipboard 
Print this post

This makes for some good understanding regarding the cheap rf modules
http://www.romanblack.com/RF/cheapRFmodules.htm
 
LouisG
Senior Member

Joined: 19/03/2016
Location: Australia
Posts: 129
Posted: 09:05am 13 Aug 2022
Copy link to clipboard 
Print this post

Thanks Greybeard for posting the link.

.
 
VK2AHB
Regular Member

Joined: 28/07/2022
Location: Australia
Posts: 51
Posted: 02:08am 15 Aug 2022
Copy link to clipboard 
Print this post

Thanks for those bits of information.
I see HC-12s on eBay for around AUD10 from China. I'll get a couple, but I already have about 6 of the 433 ASK Tx/Rx pairs, so I'd like to use them if I could.

Paul VK2AHB
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2642
Posted: 05:23am 15 Aug 2022
Copy link to clipboard 
Print this post

"I already have about 6 of the 433 ASK Tx/Rx pairs, so I'd like to use them"

I don't know of a built-in MMBasic protocol for them but you can make your own with BITBANG BITSTREAM at the Tx end.
Before sending data a 50 to 100mS train of pulses is needed for the receiver to set it's Automatic Gain Control.

At the Rx end there are a number of possibilities.
1. ADC can record the output voltage of a data burst which you then decode.
2. Log the rise and fall times of the receiver output then reconstruct the bit-stream.
3 Use @Matherp's CFUNCTION LOG - search this forum for it.

At higher speeds it seems the received pulse widths are shorter than the transmitted ones, which may cause errors. To overcome this use a protocol that only uses rise times or fall times, not both.

Eg. DHT22 sensors use 75uS between fall times for a "0" and 120uS between fall times for a "1". They also add an 8 bit checksum to detect errors to each 32 bit word for a 40 bit burst.

80uS start pulse
0 = 50uS low + 25us high
1 = 50uS low + 70us high
 
VK2AHB
Regular Member

Joined: 28/07/2022
Location: Australia
Posts: 51
Posted: 05:54am 15 Aug 2022
Copy link to clipboard 
Print this post

I was hoping to find a read-built routine rather than having to roll my own :-)
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:01am 15 Aug 2022
Copy link to clipboard 
Print this post

Are you linking two micros via serial or do you want to try direct to the DHT22 etc.

In theory, as long as the resting state is logic low, they can be just plugged in and you use code as if there is a direct connection.
This may work for slow data but trouble with high data rates.

Many here have migrated to the HC-12 but beware, there are  a lot of them with out-of-spec crystals.

Jim
VK7JH
MMedit
 
VK2AHB
Regular Member

Joined: 28/07/2022
Location: Australia
Posts: 51
Posted: 07:52am 15 Aug 2022
Copy link to clipboard 
Print this post

With the Arduino setup, I have the DHT or GPS connected to the Tx. Arduinos inside Rx and display.
Paul
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025