Notifications
Clear all

Help With Concept Using Arduino/RTC/433 mhz communications

14 Posts
4 Users
2 Likes
1,620 Views
Photo Bud
(@photo-bud)
Member
Joined: 5 years ago
Posts: 89
Topic starter  

After watching the DroneBot tutorials on the Arduino and the RTC, and the 433 mhz transmitter and receiver, I have a couple of questions.

1) Can I use a single transmitter on a master Arduino with multiple Arduinos with receivers all using the date/time from a fast clock application on the master Arduino?

2) Does anyone know of a source for just the receivers? At the cost of the pair, it may not be necessary, but every penny helps.

What I'm thinking of doing is to have quite a few buildings on an HO train layout, each with their own Arduino and receiver and then using the transmitted fast clock date/time to handle multiple sequencing, either set or random within limits. At the same time the transmitting Arduino would also display real time, fast time, and be able to reset all buildings to beginning of process.

Photo Bud (aka John)
The Old Curmudgeon!


   
Quote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @photo-bud

1) Can I use a single transmitter on a master Arduino with multiple Arduinos with receivers all using the date/time from a fast clock application on the master Arduino?

I can't think of why that wouldn't work.   Just like with any radio station, the transmitter has no way of knowing how many receivers might be listening.   And the receivers would be just as clueless.   So I can't imagine why it wouldn't work.

Posted by: @photo-bud

2) Does anyone know of a source for just the receivers? At the cost of the pair, it may not be necessary, but every penny helps.

I've never seen the receivers sold separately.   That's a good idea though.  You'd think the suppliers would imagine situations where consumers might need just one transmitter and multiple receivers.   But I've only ever seen them sold in pairs.   Perhaps they only come in pairs from the manufactures?   That does seem like a waste to end up with a bunch of transmitters that you have no use for.  But that's the way it is I guess.

 

DroneBot Workshop Robotics Engineer
James


   
Photo Bud reacted
ReplyQuote
Photo Bud
(@photo-bud)
Member
Joined: 5 years ago
Posts: 89
Topic starter  

@Robo Pi, thanks, at about $1.30 US each, delivered from Amazon, probably doesn't make a difference. I'm hoping someone out there has some experience doing the multiple receiver processing and can let me know if there are any caveats. When I see how simplistic the transmitters look, it's possible most of the expense is actually in the receivers.

Photo Bud (aka John)
The Old Curmudgeon!


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 

If you're willing to wait for a month for them to come in you can get them for around $1.00  a pair from AliExpress.

5 pair for $3.20 + $1.60 shipping @ AliExpress.

I also found these, just receivers alone:   Just now found them.  $1.89 for 3 receivers.   It appears that you can increase the quantity to get 6 of them still at Free Shipping.  If you increase beyond that they start charging for shipping.

Set of 3 receivers $1.89 and Free Shipping

Posted by: @photo-bud

I'm hoping someone out there has some experience doing the multiple receiver processing and can let me know if there are any caveats.

I can't foresee a problem, but it could be a bit complicated if you want to send different information to each receiver.  They would all "hear" the broadcast.   So you'd need to send info that each receiving Microcontroller could use to determine if the message was for it specifically.   That shouldn't be a problem either actually.  Just a bit more coding.

But if you're just sending time data to all of them, then they wouldn't even need to know if the message was just for them.  They all just get the same time data and suck it up. ? 

And of course, if the signal is "reset" then all of them would reset at the same time.  If you want to reset them individually you'd need to give each one a special number so that only when they hear their number called out would they react to the message.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Photo Bud
(@photo-bud)
Member
Joined: 5 years ago
Posts: 89
Topic starter  

@robo-pi - Cool info, of course free shipping on 3 receivers has estimated date of March 1! Still might do for long term after I do a proof of concept, especially at the rate at which I work! lol It is nice to know receivers only is an option.

As of now thinking only broadcast date/time, but possible separate message for reset, still all points. May set up with designation including an all points or "any points". At this time don't see necessity for individual address, but who knows?

Alternative is each building/light controlled by central Arduino and use messages to turn/on off/modify color (if NeoPixels are used). In which case, date/time would not need to broadcast.

Thanks again for the ideas and info!

 

Photo Bud (aka John)
The Old Curmudgeon!


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @photo-bud

At this time don't see necessity for individual address, but who knows?

One thing I thought about is that you could send a simple integer (or byte) at the beginning of the transmission.   If the byte is zero then all receiving microcontrollers will act on it.   If the byte is anything other than zero then only the microcontroller that  recognizes that number will act on it.  In this way you'll have both global data as well as the option to single out a specific unit if need be.

DroneBot Workshop Robotics Engineer
James


   
ZeFerby reacted
ReplyQuote
(@zeferby)
Member
Joined: 5 years ago
Posts: 355
 
Posted by: @photo-bud
Posted by: @photo-bud

At this time don't see necessity for individual address, but who knows?

Also maybe a header/trailer specific byte sequence to clearly mark "package messages" ?

Eric


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@photo-bud

I have three unopened anti static bags here with 433MHz transmitter/receiver pairs, and which will never be opened, since I discovered the nrf24.

The cost of the nrf24 breakout boards is about the same as the 433MHz pairs, but the nrf24 is a world of difference.

If you ever decide that one-way radio traffic is not enough and instead of timed radio traffic you wish to poll the remote sensors, then you need another 433MHz pair to handle semi-duplex transmissions.

The nrf24 has libraries to handle networking of multiple devices communicating with a base station, or even two or more remote stations communicating amongst themselves.


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @pugwash

The cost of the nrf24 breakout boards is about the same as the 433MHz pairs, but the nrf24 is a world of difference.

I was going to suggest the same thing.  Even though the two-way capability won't be needed they still might be a better choice overall.   The cost is almost the same, and who knows?  Maybe two way communications might come in handy at various parts of the layout at some future time.   If the 433Mhz haven't been purchased yet the NRF24L01 may indeed be the better choice.  I just bought 10 of them for $8.12.   That's only about 81 cents each and they are each transceivers.   So actually they're even cheaper.   Of course if you get the ones with large antennas you'll pay twice that.  But on a MRR I don't think you'd need the large antennae. 

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@robo-pi

And the range I have found to be better, although that does defy the frequency range physics concept that the lower the frequency the further the range.

I can't remember where it is on youTube but a Kiwi managed to get a 5km range with an nrf24, albeit with a directional antenna. He got sporadic signals up to 8km but this was probably due to the road undulations.

Andreas Spiess did some similar experiments but I think it may have been with LoRa and not the nrf24. He has done videos on the nrf24.

I finally got the breakout adapter boards from China last week, so now I can get off the 3.3V bus.


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@photo-bud

It may be a good idea to take 15 minutes to read through this thread:

https://forum.dronebotworkshop.com/c-plus-plus/structures-serialisation-xor-checksums-etc/

It covers two aspects that may be of help to you if you do decide to go down the 433MHz path.

  1. Packing your data into an object for transmittal.
  2. Checksum creation and validation for one way radio traffic.

There is certainly a consensus for the first point, but the necessity for the second is how critical is the data being transmitted.

As far as point 2 is concerned, the advantage of the nrf24 is the in-built cyclic redundancy checking, which is similar to checksum validation. If the nrf24 receives corrupt data, it automatically requests the transmitter to resend the data package up to a user-specified number of times.


   
ReplyQuote
Photo Bud
(@photo-bud)
Member
Joined: 5 years ago
Posts: 89
Topic starter  

@pugwash and @robo-pi - Thank you both! Glad you both put me on to the nrf24. Definitely food for thought. I will definitely read the thread suggested on "structures...".

I am confused about configuration. I would want the base station to have the large antenna.

I'm assuming (bad idea, that) that the optimum hardware for the command/base station would be an Arduino, the NRF24L01+ Breakout Adapter with on-board 3.3V Regulator, and Wireless Transceiver Module 2.4G 1100m NRF24L01+PA+LNA with Antenna LKY67.

Then for each building, Arduino, NRF24L01+ 2.4GHz Wireless RF Transceiver Module, and NRF24L01+ Breakout Adapter with on-board 3.3V Regulator for NRF24L01+ Wireless Module.

Does this seem right, or am I missing/misunderstanding something?

I will also check out some videos on projects using the NRF24.

I really appreciate your help and patience!

Photo Bud (aka John)
The Old Curmudgeon!


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@photo-bud

If your base station and all the buildings are in the same room, the nrf24l01 onboard antenna will suffice.

The adapter breakout board is also optional if you connect the nrf24l01 directly to the 3.3V output pin. You will also need a 10µF capacitor, connecting 3.3V to Gnd, to cope with possible power surges.

If the remote stages are to be fitted into model railways buildings you may want to consider a Nano or smaller Arduino.


   
ReplyQuote
Photo Bud
(@photo-bud)
Member
Joined: 5 years ago
Posts: 89
Topic starter  

@pugwash - Wow, thanks for the insight. Gonna hafta try this!

 

Photo Bud (aka John)
The Old Curmudgeon!


   
ReplyQuote