![]() |
Forum Index : Microcontroller and PC projects : 433MHz transmittters and receivers
Author | Message | ||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
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: AustraliaPosts: 6283 |
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: AustraliaPosts: 871 |
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: AustraliaPosts: 174 |
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: AustraliaPosts: 129 |
Thanks Greybeard for posting the link. . |
||||
VK2AHB Regular Member ![]() Joined: 28/07/2022 Location: AustraliaPosts: 51 |
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: AustraliaPosts: 2642 |
"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: AustraliaPosts: 51 |
I was hoping to find a read-built routine rather than having to roll my own :-) |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
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: AustraliaPosts: 51 |
With the Arduino setup, I have the DHT or GPS connected to the Tx. Arduinos inside Rx and display. Paul |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |