0
\$\begingroup\$

I want to control the speed of a motor by using a 2.4 GHz receiver. I regulate the speed by sending an PWM-Info to the motor.

Its working great, if I use an arduiono and lots of wires. But I have to seperate the arduino and the motor, because the motor has to be portable. So I want to use a 2.4GHz transmitter module for arduino to control the motor.

I'd like to use this module, to receive the current frequence from the arduino and forward it to the pwm port: https://www.sparkfun.com/products/152

Is this possible as I imagine it? Is there anything else I need? When I could use an arduino, this would be very easy, but my solution has to be small. The smaller it becomes, the better.

In another scenario I use the arduino to control multiple motors at the same time, each motor has its own receiver. How can I identify the modules, so I can set the frequency for each motor.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

That module gives you low level access to the radio -- e.g. you're not going to be sending high level prototcol data. Yes -- it's trivial for you to send any arbitrary message to the radio and have your arduino interpret the message as you please (set pwm duty cycle etc). You shouldn't need to do a whole lot else to get proof of concept. If you need super long range 0 dBm might not cut it, but it's definitely OK for several meters.

With regards to your second question: there are a million ways to identify the different radios. The most expensive and worst way is to have a different transmitter for each receiver. It's obvious why this is a bad solution. All your other solutions will require you to implement some kind of higher level protocol. There are lots and lots and lots of options here (this is a whole area of academic research). I used a similar Nordic radio several years ago and it had different channels you could utilize. That can help you (e.g. put one receiver on one channel), but it obviously doesn't scale well (e.g. if you have more devices than channels you're back to square one. Equally importantly you might not want to use certain channels -- they might be noisy, have poor PRR, etc). One simple, but not particularly robust (from the networking perspective) is to invent a protocol wherein you blast a message and depending on the contents of that message one and only one receiver responds. Your arduino will have to implement whatever protocol you want so obviously you can't go crazy with the complexity (e.g. you probably don't want to implement posix sockets). For a few motors (less than 10) you'll probably be OK doing something like this provided that you don't have stringent latency requirements.

\$\endgroup\$
7
  • \$\begingroup\$ thanks for your answer. I dont want to interpret the data on my arduino,it is just broadcasting the current frequency. I need to find a way to receive this information and send it to the motor. Do you have any tutorial I could use? \$\endgroup\$
    – Wolfen
    Sep 25, 2013 at 22:11
  • \$\begingroup\$ You're going to need a transmitter and receiver. Each side of the link will require a radio module and a micro controller (or some other kind of logic). The radio module has an SPI interface -- the means that you must interpret the data on your arduino. After all you need your arduino to encode the frequency into some sort of data packet that the transmitting radio sends. You'll need the reverse transformation on the receive side. This could be as simple as sending an ASCII string or as complicated as...well a lot more complicated. I don't have a tutorial for you but I noticed that \$\endgroup\$
    – Doov
    Sep 25, 2013 at 22:28
  • \$\begingroup\$ somebody made an arduino library for it: playground.arduino.cc/InterfacingWithHardware/Nrf2401T. That should really make things easy for you and enable you to do simple ASCII communication between a few different nodes. \$\endgroup\$
    – Doov
    Sep 25, 2013 at 22:29
  • \$\begingroup\$ Can you recommend a good way to implement the logic on the receiving side? Im not very experienced with micro controllers and I need a very compact board, so I can't use an arduino as a receiver :( \$\endgroup\$
    – Wolfen
    Sep 25, 2013 at 22:36
  • \$\begingroup\$ I accepted your answer, thanks. Anyway, I'm still thankful for every advice you can give to me :-) \$\endgroup\$
    – Wolfen
    Sep 25, 2013 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.