Sorry that I can't point you to an answer, but I can shed some light on why Google doesn't come up with much (my response is too long for a comment). The reason is very few designers have access to the equipment necessary to properly design a 433MHz circuit from scratch. Normal oscilloscopes are definitely out, and every little 0.1mm corner of a pad of your circuit board is actually a tiny inductor and capacitor connected to every other part of your circuit (parasitic/stray inductances and capacitances are killer at frequencies that high).
Also, the schematic of a 433MHz design is impossible to divorce from the geometry of the PCB layout. In other words, they would have to give you the schematic as well as the exact PCB geometry to make it work. Also, unfortunately, hand soldering is out due to parasitics. (Soldering an antenna on is one thing, but soldering the whole board is going to completely change the response of the circuit).
I don't mean to discourage you. I just want to make sure you know you're trying to slay a very big giant.
I have build quite a few wireless sensors and remote controls based on those cheap 433Mhz modules and tiny85. Here are my observations:
You don't need to power the wireless module from the microcontroller pin in order to save power, it consumes near nothing when the data pin in low.
When the data pin is high (it transmits) the power consumption is about 14mA, so it consumes about 7mA on average to transmit a message consisting of ones and zeros.
You really need an antennae, just solder a straight 17.2cm wire to it. You can just loop it around the perimeter of the remote if you can't keep it straight.
3V power supply is quite low, when your battery goes down to 2V it's even worst. I use a charge pump voltage doubler in my design to power the transmitter. It's powered down in sleep mode, I turn it on before transmission and turn if off after.
The button cell battery can provide only few mA and if you use the voltage doubler you will also double the current drawn, so you need to use a larger cap on the output to accumulate enough energy for one transmission burst (you can't continuously transmit)
I made an RF library specifically for those transmitters
https://github.com/cano64/ManchesterRF
Check the example codes for transmitter and receiver.
About sleep mode. You can only wake up the tiny85 using hardware interrupt, and only when it goes LOW, tiny85 has only one HW interrupt pin (pin 7, PB2) so you can use only one button directly to wake it up and it must be pulled HIGH when open.
Here is how to use two buttons for wake up using two extra pins.
Wire it like this: [Pin1] -- [btn1] -- [PB2], [Pin2] -- [btn2] -- [PB2]
Before going to sleep: set Pin1 = LOW, Pin2 = LOW, so when you press any of them it will wake up the microcontroller.
After Wake up: To determine which button is actually pressed, put Pin1 HIGH Pin2 LOW, and check the state on PB2, then switch, Pin1 LOW, Pin2 HIGH and check the state on PB2.
It takes only a fraction of a second to wake up and the user will still be holding the button.
PB2 must have internal pullup enabled or use external pullup
Best Answer
Here's a quick overview of why you cannot copy a rolling code, even if they have the same algorithm:
As noted in the comments, a rolling code is designed to prevent someone from breaking in by recording and later replaying a transmit code. The system does this by employing:
In practice (in Keeloq and similar systems, which to my knowlege means all rolling code systems in existence) the code gets changed each time the transmitter is activated, and the receiver keeps track of the last code it received from the transmitter.
For example imagine a rolling code transmitter with code sequence "ABC" -- in other words on the first five activations the transmitter would transmit codes
ABC01
,ABC02
,ABC03
,ABC04
,ABC05
. After that fifth transmission (assuming it was received by the receiver!) then the receiver would only accept codeABC06
or later. That's what makes the rolling code resistant to the record-and-replay hack.Now let's copy our first transmitter (TX1) over to a second transmitter (TX2). We pair them up using the next transmission, code
ABC06
and all seems well. On their next activation each transmitter will transmit codeABC07
.Hopefully you already see the problem. If activate TX1, it transmits code
ABC07
and the receiver responds. But the next time I try to activate TX2, it also transmits codeABC07
and so the receiver rejects it as an old code. Maybe if TX2 were activated a few times it would get ahead of TX1 and activate the receiver... but then later on TX1 would need to "catch up" to TX2, and the whole system is... less than good.So you cannot copy rolling code transmitters because copying a rolling code transmitter would only work well if you could somehow keep the two transmitters in sync with one another, and there is no practical way to do this. It is far easier to simply pair a second, new rolling code transmitter with the receiver, as Abel mentioned in the comments.