Very simple RF momentary control

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
Hello! I'm new to these forums, and while I know a lot about software engineering, hardware is above me. I've spent a lot of time looking around for something to suit my needs by cannot find anything and though I'm trying to learn, I find myself lacking. If there is a better place to post, please direct me.

I have a CR2012 battery. A very small motor. (6mm diameter..16mm long). I have a very very small space to work in.

I need a small circuit to remotely activate the motor at a very close range. 4ft or less. It doesn't need to be particularly tolerant of other noise in the environment, I don't need perfection...just 'good enough'. I do not have a surface to put an IR sensor, it pretty much needs to be RF. I'm ideally looking for something in the 3mm x 3mm x 3mm size ... but if I have to, I might be able to get a little more room. If I have to hold a button on a transmitter to keep it going, that suits my needs. If I can toggle on/off that's even better...but not required. I have a little bit of room to coil an antenna with a small wire underneath a plastic surface, but not too much.

Any guidance from people who know what they are doing would be excellent!

Thanks.


[UPDATE]
Its been a long journey but I was finally able to get a fully functional build that is stable. This is a roughly drawn version of the final design
1690231130672.png
Thanks to everyone for your help, but an extra thanks to Ya'akov who pointed me down this path. I've had lots of fun learning how to use an MCU. It felt quite daunting at first but taken in steps I finally got there.

The challenge of this project wasn't merely the function, but that I was unwilling to budge on any dimension of the model, so it would be indistinguishable from the non-functional models I already had.

For anyone wanting to learn how to work with an MCU, I highly recommend taking up the challenge, I already have numerous projects in mind and look forward to all the opportunities to learn new things. Especially combined with a 3D printer, imagination is really the only limitation.

If anyone reading this down the road is curious....this is a brief version of the journey. There were a lot of times I wanted to throw in the towel but push on!

1. First, I picked up an Elegoo UNO (it is essentially identical to Arduino UNO).. there are many similar kits, it doesn't have to be this one specifically, but it really is a great place to start. https://www.elegoo.com/en-ca/products/elegoo-uno-project-super-starter-kit as an example.
2. I learned how to simply make a led blink. Lots of example tutorials, it really is a good place to start
3. I built my circuit using the steady power from the Arduino, the Arduino as the 'brain' of the operation, and the random parts that came in the starter kit I had bought. Once I got the arduino IDE going and the blinking tutorial working, this was actually relatively simple. There are many infrared libraries out there and with some trial and error I found one that did the job with minimal overhead.
4. I researched, found, and purchased components that would physically fit in my model with a little breathing room for my big clumsy hands trying to solder things.
5. I built the circuit using the components I bought, but still with the Arduino as the brain.
6. Finally I was ready to try using the ATTINY85s. This took a little doing to find the right settings, but once I got the hang of it, I learned to program an ATTINY to blink a led.
7. Now I built my prototype circuit using all the hardware that would be in the model.
8. I iterated from here many times improving the software. Adding support for "Magiquest" wands, speed controls, and I even added the ability to program the chip 'after the face' using EEPROM to respond to a different number on the IR remote control I had. So I could toggle specific models on and off, or turn all models on and off with different button -- but the actual programming on the ATTINY would be the same for them all.
9. Getting close, I now tackled my last problem. Power consumption. Up until this time I had been using the nice clean power from the board, and found that the coin battery I wanted to run this on couldn't supply the power so evenly, especially when I toggled the motor on. The noise from the DC motor would often interfere with the IR sensor so you wouldn't be able to turn it off. Adding a capacitor on the power source cleaned this up.
10. I wanted to be able to leave batteries in these models, but using a CR2012 only has 50mah in it. So any power consumption beyond a trickle would quickly kill the battery. The first thing I found was that my original design had the IR sensor being powered directly from the power source. This was a constant drain even when nothing was happening. So I moved the powersource for the IR sensor to an output pin of the ATTINY. This allowed me to programmatically turn the sensor on and off.
11. Even trying to be very conservative, the battery would not last more than a couple days if it was constantly checking for signals. The model is being used for a board game, and they typically last about 4 hours . So I decided after four hours, I'd have the ATTINY completely power down....and use a reed switch to be able to run a magnet by the model to reset the ATTINY and power it back up when we start a new game.
12. I noticed even in a completely powered down state, that the IR sensor was pulling 0.08mah when the ATTINY was sleeping. This doesn't seem like much, but when you only have 50mah battery life, that will drain it in about a month. This was driving me batty as I could not explain why it was draining the power.
13. I finally asked for help on this, and in asking for help, I realized the problem. (explain problems to other people is a great way of solving them. You end up seeing things you've overlooked). The documentation for the ATTINY says that when sleeping, you should set all unused pins to "INPUT_PULLUP" mode. It ensures they have a fixed state. I was also setting my used pins to INPUT_PULLUP as well. What I realized, is that INPUT_PULLUP ensures a positive bias on the pin, by connecting a 10k resistor from VCC to the pin. On my used pins though, this was letting a small amount of power trickle through to the IR sensor and the transistor. Once I changed that to be "INPUT" (which no longer would include the 10k resistor), the power trickle went away.
14. Then it was time to tweak my 3D models to make a little more room for the components, and go to work on assembling them. This was tedious and error prone. I have no experience putting something like this together and found it very frustrating. By the end though, I finally got all to work, and sealed up in the model, and I think my next project will be much much easier.
15. Enjoyed my new toy.

I will add some pictures and maybe a little demo after I have the model painted up. Thanks again everyone!

All in all, this process probably took about 60 hours to learn, design, and build the model -- but I feel much more confident going in to future projects and I'm very excited at the possibilities of using a MCU. While they are a little daunting at first, The possibilities and functions built in to those tiny little things is outstanding!
 
Last edited:

Ya’akov

Joined Jan 27, 2019
9,150
Welcome to AAC.

I’m afraid your 3mm³ requirement is not going to be able to be met. For example, I have had good success with these modules, some of the smallest available, but compared to 3mm³ they look like parking lots.

If you were designing a commercial product... well, first if you were, it would have to use a different strategy, but let’s say you want to do this. Well, you would have to get something exotic and custom to even has a hope of managing it.

So, I don’t want to be negative but realistically, you can’t do this—but that doesn’t mean you can’t do what you want. If you can explain the application someone might have a clever way to manage it that doesn’t include nano-radios....
 

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
I appreciate your frank response and from what I had found online...was what I was kind of afraid of. So I'll give a little more information and maybe someone out there can help.

This is a 'just for fun' project. I'm huge fan of board games, and in particular, a game called Gloomhaven. (and a more recent version Frosthaven).

I also recently got a 3D resin printer. I've been having a lot of fun with it printing off 3d versions of the various monsters in the game to replace the cardboard standees that come with it. The monsters have a pretty fixed size that I cannot increase because then they don't fit on the board in their squares.

One of the enemies is pretty much a spinning blade on top of a sphere. Now...the original 3d print couldn't move at all...but that was lame, so I altered it to have a rotating joint. ... but I'm not 5 ... I don't want to have to spin the blades myself with my hand and pretend. Sheesh. :)

So, I found myself a tiny motor and combined with a cr2012 .. I can fit it in the model np, and even have a little itty bitty switch for on-off that is well concealed. This is neat, but I want to surprise the other players (who are the ones usually putting the monsters on the board)...and will have no idea that the model has any electronics in it.

I was hoping for a magic IC that would just have the exact capability I need. However, based on your response, I've redesigned the model a little. I think I can get two separate areas of 3x8x8mm or 4x6x6mm. Which is tons more (relative to my original request)...but still a very tight area. I'd prefer smaller as I have to sacrifice strength to get that much room.

Really, all I'm looking for is a transmitter of any reasonable size that I can have in my pocket .. that will allow me to remotely make it spin. (whether I have to hold a button or not is fine by me -- whether the transmitter needs 12V or 1.5V -- doesn't matter much to me). My very limited electronics mind thought of just a 'radio receiver' that amplifies something on frequency X and applies it to the motor instead of a speaker. I have a transmitter that transmits a very loud 'sound' on that frequency and that is 'played' by the motor. I know it doesn't quite work that way ... but I know a simple radio receiver does not require much. (also, since I have an on/off switch .. I don't really care if some external thing could interfere and cause it to spin when I don't ask it to .. wouldn't be the end of the world)

Any thoughts would be greatly appreciated.

Cheers!
 

Ya’akov

Joined Jan 27, 2019
9,150
I appreciate your frank response and from what I had found online...was what I was kind of afraid of. So I'll give a little more information and maybe someone out there can help.

This is a 'just for fun' project. I'm huge fan of board games, and in particular, a game called Gloomhaven. (and a more recent version Frosthaven).

I also recently got a 3D resin printer. I've been having a lot of fun with it printing off 3d versions of the various monsters in the game to replace the cardboard standees that come with it. The monsters have a pretty fixed size that I cannot increase because then they don't fit on the board in their squares.

One of the enemies is pretty much a spinning blade on top of a sphere. Now...the original 3d print couldn't move at all...but that was lame, so I altered it to have a rotating joint. ... but I'm not 5 ... I don't want to have to spin the blades myself with my hand and pretend. Sheesh. :)

So, I found myself a tiny motor and combined with a cr2012 .. I can fit it in the model np, and even have a little itty bitty switch for on-off that is well concealed. This is neat, but I want to surprise the other players (who are the ones usually putting the monsters on the board)...and will have no idea that the model has any electronics in it.

I was hoping for a magic IC that would just have the exact capability I need. However, based on your response, I've redesigned the model a little. I think I can get two separate areas of 3x8x8mm or 4x6x6mm. Which is tons more (relative to my original request)...but still a very tight area. I'd prefer smaller as I have to sacrifice strength to get that much room.

Really, all I'm looking for is a transmitter of any reasonable size that I can have in my pocket .. that will allow me to remotely make it spin. (whether I have to hold a button or not is fine by me -- whether the transmitter needs 12V or 1.5V -- doesn't matter much to me). My very limited electronics mind thought of just a 'radio receiver' that amplifies something on frequency X and applies it to the motor instead of a speaker. I have a transmitter that transmits a very loud 'sound' on that frequency and that is 'played' by the motor. I know it doesn't quite work that way ... but I know a simple radio receiver does not require much. (also, since I have an on/off switch .. I don't really care if some external thing could interfere and cause it to spin when I don't ask it to .. wouldn't be the end of the world)

Any thoughts would be greatly appreciated.

Cheers!
Well, this is a pretty tough problem. I need to think about it. Maybe someone else will beat me to a working idea but just now I am thinking that your first, rejected idea—some sort of optical sensor—is looking more likely that RF.

Sine you are resin printing, you just have to make sure there is some small, transparent-to-some-wavelength window somewhere. Maybe that means no paint, or maybe it means printing something with a “hole”, then printing something that fills it.

But in any case, an optical sensor and some very simple electronics that could probably be made to fit seems possible. I hope someone else can think of something more clever than I can just now, but I will ponder it and see if anything pops up—as it often does.
 

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
I appreciate the thought!

I've been looking at the model trying to find somewhere useful to mount an IR sensor.... but anywhere I can put it is really intrusive on such a small model (a sphere about 19mm across) -- and the entire model should be a shiny metallic color (which I cannot find any that are IR transparent). Do you have a recommendation for the smallest IR sensor? The ones I've found are on the large size.
It would also make for an awkward surprise if I have to put the transmitter above the table and point at it, and make sure it is facing the right way -- so I'd still really love an RF solution ... but if that just isn't possible, then I'll have to make due with what is possible.
 

Ya’akov

Joined Jan 27, 2019
9,150
An SMD 40KHz IR receiver can be about 4 x 7 x 5mm. I am imagining that you wouldn't bother with any code, rather just responding to any 40KHz IR signal. (Any ordinary remote, for example).

Now, soldering the SMD parts will be something you'll need to practice but it is certainly possible.
 

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
I really appreciate the time you've taken to assist. I've had some troubles finding the specific item you are referring to. Found some larger ones and ones already part of a 'huge' circuit board....but nothing that quite fits.

In my searches though, I stumbled on this: https://www.mouser.ca/datasheet/2/777/GRF1201WDS-1892158.pdf

From the description .. it feels like it might work for an RF 'receiver'. It is more of a detector ... but that would do I think. What are your thoughts?
 

Ya’akov

Joined Jan 27, 2019
9,150
I really appreciate the time you've taken to assist. I've had some troubles finding the specific item you are referring to. Found some larger ones and ones already part of a 'huge' circuit board....but nothing that quite fits.

In my searches though, I stumbled on this: https://www.mouser.ca/datasheet/2/777/GRF1201WDS-1892158.pdf

From the description .. it feels like it might work for an RF 'receiver'. It is more of a detector ... but that would do I think. What are your thoughts?
The SMD receivers are readily sourced, here is a random candidate that will set you back $1.91 quantity one at Mouser. Keep in mind there is shipping, so if you really only bought one they’d be pretty expensive. If you do order from Mouser, or Newark, or the like, plan on buying more parts to minimize the impact of shipping per part. Also, of course buy more than one teeny tiny component that you have to heat up to 300℃ as you will likely not succeed the first time.

As far as that detector goes. I don’t have experience with them, but it strikes me that making it only detect your remote is going to require some work, possibly a band pass filter and/or an attenuator on the front end. There is a lot of RF bouncing around.

A this point, despite the difficulties with making a window for the IR detector, I really feel it is the more fruitful direction. It should be possible to make it work, while not in your pocket, discretely. Or, you could make an RF relay with a small IR transmitter activated by an RF remote. It could be discrete, and doesn‘t have to be too close to work.
 

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
Interesting idea with a RF relay for an IR transmitter! (and I don't know why I couldn't find any useful IR receivers. Thanks for the link). Well, that would give the desired effect ... and in theory, I could even place a couple IR transmitters around if I really needed to and didn't want to have to concern myself with orientation of the model or trying to put multiple IR sensors in it or anything.

Taking one step back for a moment -- I had only really considered IR and RF at the beginning of this idea and shouldn't really have put blinders on to other possibilities. As I've been searching around, I've found lots of other components that work in many various ways detecting various things. Do you have any thoughts for an entirely different trigger? For example, there are 'good guy' and 'bad guy' 3d models in this game. An alternative, and possibility even cooler mechanism, could be proximity to a good guy. Could I put something in the 'good guy' models that proximity (about 3-4cm) could trigger --- maybe a powerful magnet? Any other sort of sensors that pop into your mind that I haven't even considered -- maybe a clapper. :)

I had also briefly considered a 'wireless charger' sort of approach where something nearby powers the motor vs just signaling the device. That would free up a little room in where I have a coin battery. That seemed to be getting too complex though for my limited knowledge and space.

Thanks again for your help (and advice ordering)! I have 4 of these models to make, so I will plan to buy components for 10 to give myself some room for errors. On a side-note -- I've found a few virtual circuit board sites for testing ideas, but I don't know how accurate they are or if you have a recommendation. I'd love to be able to know the idea will work before ordering 10x the components for it.


Cheers
 

Ya’akov

Joined Jan 27, 2019
9,150
Your idea of proximity triggering is interesting but the biggest battle right now is your space constraint. Looking at the game board there are too many positions to instrument them or provide inductive power practically.

I think we are back to the idea of IR, but this time I am thinking about IR beacons that indicate identity. Each enabled piece has beacon an ID, and watch for IDs. If it sees a foe ID, it react with a challenging behavior. To make this work you need to have:

Some kind of MCU in the piece. This can actually be very small, like an SMD ATTiny85, a set of omnidirectional IR emitters and detectors, a high power density cell–probably a LiPo pouch cell which can be had very small, and whatever actuator(s) you want to trigger.

This is not an impossible project but it is very ambitious. I would suggest going for a simpler prototype to start, and working up to it. You could even embed an ATTiny85 to control the motor in some patterns, or just time it out, as a way to get started learning to program the MCU and wire it up.

I have two ideas, as well:

1. Maybe you could have some kind of “plinth” or stand which was a large percentage of a position square’s area on the bottom and, either contained power source, or some (or all) of the active electronics, or both. The piece could sit on the top and make electrical contact trough a readily available magnetic “pogo pin” connector (think MagSafe). This way, the inert model could be used directly or on its plinth, it could be active.

2. I know you like the magic effect of the radio, but how about, for a first pass, a switch that is actuated by either a squeeze or a push down. There are a variety of ways this could be accomplished. One other slightly more magical approach might be a reed switch or hall effect sensor in the model and a “magic ring” which would be an appropriately ornate resin printed ring with a neodymium magnet embedded in it.
 

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
1683728603665.png

Since you clearly have done some looking around at the game, I figured I'd send you a quick pick of the actual model I'm working with. I have about 200 models for the game printed so far, and they all have the identical base shape with a number on it. For this model, that is where I have stashed the CR2012 battery. There isn't enough room for anything else in the base unfortunately. (the top of the base is 20.5mm across, the bottom of the base is 23mm across and it is 3mm tall. Even the 1.2mm battery was a stretch to get it in there without making the walls too thin)

Also, you have to add a colored marker to units to indicate 'elite' or 'normal'. I designed a mechanism on the bottom that lets me attach a white or yellow base by inserting the bottom piece and turning it to lock it in place (this is actually how I made the 'on/off' switch without it even being seen). Putting in the base connects the power. (you can also see the motor in this one without the blades on top)
1683728778549.png
 

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
I really like the idea of a reed switch. I forgot about those. I had a "200 in 1" electronic kit as a child and as soon as you said it, I remembered them. Let me run with that a little and see what I can find. Thanks!
 

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
Humm. Its hard to get an idea for how these parts will function in practice. I need a lab with one of every part in it so I can play around. :)

I currently have my eye on this one: https://www.aliexpress.us/item/3256...!sea!US!4236304664&curPageLogUid=WEv6BtKZvz18

I'm trying to gauge how strong of a magnetic field would be required. Even with specs, I don't have a good basis to really understand 'how much that is'. I could potentially put 3x reeds in parallel in the base of the model along the outside edge and still be able to get the battery in....especially if the open reeds draw no power -- I can remove the on/off switching mechanism from the base. Then I just have natural magnets in 'the good guys' to proximity trigger one of the reed switches? From a little looking around, this sounds possible at an inch or so range which would actually be perfect for a neighboring hex on the board.....as long as the magnets are not so strong that the pieces would constantly be grabbing on to each other.
 

LesJones

Joined Jan 8, 2017
4,190
Here is another suggestion. Use ultrasound just above the normal hearing limit. When I was supplied with my present hearing aids I was told about a app that ran on a android tablet to control the settings remotely. I invesigated how it worked and found it used audio at about 18 Khz. This is also used for the two hearing aids to communicate with each other.

Les.
 

Ya’akov

Joined Jan 27, 2019
9,150
Humm. Its hard to get an idea for how these parts will function in practice. I need a lab with one of every part in it so I can play around. :)

I currently have my eye on this one: https://www.aliexpress.us/item/3256802046314112.html?spm=a2g0o.productlist.main.7.59d64468jDu45j&algo_pvid=5daca20c-012a-4f7c-82b4-5110871a6290&algo_exp_id=5daca20c-012a-4f7c-82b4-5110871a6290-3&pdp_npi=3@dis!USD!8.0!8.0!!!!!@211be54b16837372450762988d07ff!12000019447458916!sea!US!4236304664&curPageLogUid=WEv6BtKZvz18

I'm trying to gauge how strong of a magnetic field would be required. Even with specs, I don't have a good basis to really understand 'how much that is'. I could potentially put 3x reeds in parallel in the base of the model along the outside edge and still be able to get the battery in....especially if the open reeds draw no power -- I can remove the on/off switching mechanism from the base. Then I just have natural magnets in 'the good guys' to proximity trigger one of the reed switches? From a little looking around, this sounds possible at an inch or so range which would actually be perfect for a neighboring hex on the board.....as long as the magnets are not so strong that the pieces would constantly be grabbing on to each other.
Well, a similar but longer switch was actuated at about 5mm by a very small (6mm x 1.5mm disc) magnet. but I worry about the unintended consequences of putting large rare earth magnets in the figures. They will tend to move unexpectedly and very quickly when they get near each other.
 

Thread Starter

CoffeeHouse2023

Joined May 9, 2023
13
Well, a similar but longer switch was actuated at about 5mm by a very small (6mm x 1.5mm disc) magnet. but I worry about the unintended consequences of putting large rare earth magnets in the figures. They will tend to move unexpectedly and very quickly when they get near each other.
The unexpected movement was my concern as well. I'll get a few different parts and see what does what.

An ultrasonic sensor is interesting, I looked at them a little, but wasn't sure if I'd be able to control one well enough in the space available. Most of the sensors are pretty large and the ones that are tiny ICs, I'm not sure if I can get required additional components in the space to make it work.

I'm 'all ears' so to speak though though, if you have a specific suggestion @LesJones.
 

djsfantasi

Joined Apr 11, 2010
9,163
I’ve been trying to find it, but I’ve used a Hall effect switch that is activated through 1/4” of air with a 3mm x 1.5 mm rare earth magnet. These may be small enough to fit in a figure. You may must already have power for your motor. You could address electromagnets beneath the playing field arranged in a matrix to activate any figure by its coordinates.
 
Top