Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Attiny10 wireless doorbell

Status
Not open for further replies.

barefoot

Newbie
Joined
Jun 18, 2021
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
25
My first post so appologies if I've broken any obvious rules :)

I am building a wirless doorbell and was hoping to use the Attiny10 to generate a simple code and send it wireless using a single bit transmitter. Then I'll receive the single bit to another Attiny10 where the simple code is decoded and then activate the door bell by taking an IO pin low.

I doubt I'll find a library (like the manchester encoder) to work on the attiny10. I imagine bit shifting an 8 bit number (as the code) out via an IO with a short delay between each shift. That would work for the transmitter. But I am struggling with the receiver end. I imagine the receiver being asleep and will wake on interrupt from the receiver. And then start shifting in bits with the same delay as the transmitter. If the numbers match and then ring the door bell.

Any thoughts would be much appreciated.
 

Attachments

  • doorbell.jpg
    doorbell.jpg
    111.1 KB · Views: 112

No rules broken!

I confess to never having used an ATtiny10 but looking at its data sheet it looks to be fairly easy to achieve what you want. I'm not sure what the module with the sim card reader does unless it's just present in the image you copied.

The transmitter and receiver are AM units so there is no real advantage to using Manchester encoding, it shows far more benefit when FM is used because it helps the adaptive data slicer to find the mid point between 0 and 1 in the data stream. In AM systems it is usually more advantageous to add a few mS of 'carrier on' before the data to allow AGC to settle then just send the bits.

The ATtiny10 doesn't have an internal UART so you will have to 'bit bang' the data, I suggest using a timer interrupt to set the speed when transmitting and receiving so they are as close as possible to each other. To receive, look for the first data edge which should be the start bit, wait 1.5 bit intervals then take the next samples at bit rate. Waiting 1.5 bit times should ensure the samples are taken in the middle of the bit periods.

Brian.
 

No rules broken!

I confess to never having used an ATtiny10 but looking at its data sheet it looks to be fairly easy to achieve what you want. I'm not sure what the module with the sim card reader does unless it's just present in the image you copied.

The transmitter and receiver are AM units so there is no real advantage to using Manchester encoding, it shows far more benefit when FM is used because it helps the adaptive data slicer to find the mid point between 0 and 1 in the data stream. In AM systems it is usually more advantageous to add a few mS of 'carrier on' before the data to allow AGC to settle then just send the bits.

The ATtiny10 doesn't have an internal UART so you will have to 'bit bang' the data, I suggest using a timer interrupt to set the speed when transmitting and receiving so they are as close as possible to each other. To receive, look for the first data edge which should be the start bit, wait 1.5 bit intervals then take the next samples at bit rate. Waiting 1.5 bit times should ensure the samples are taken in the middle of the bit periods.

Brian.
Thanks Brian,

You've confirmed what I was thinking. Not heard the term "bit banging" but that sounds like the way to go. The sim card module in the picture is an mp3 player module. The idea is to have a doorbell that doesnt set the dogs off. Each time the doorbell is pushed it plays a different effect/sample. Hopefully the dogs will never get use to the sound but humans will know what it means :)
 

Bit banging is engineering slang for making signals in software that would normally be produced by hardware, it is commonly used in serial communication systems when the facility doesn't exist in silicon to do things the easy way. If you can use a different MCU, one that has a 'UART' or 'USART' it makes life far easier but otherwise all you have to do is make sure the transmit pin goes high and low at the right times using a software routine.

I had something here on my doorbell a while ago that played "<klaxon> prepare to repel boarders" I copied from Captain Picard on Start Trek!

Brian.
 

Hi,

In either case I recommend to read like a UART works.
I personally don't like bit banging, thus I'd look for a microcontroller with hardware UART. But it's on you..
Some receivers do output "noise" when there is no carrier. If so, then finding the true datastream is more difficult. You need to read the datasheets.

Many similar projects can be found in the internet. I recommend to read through some of them.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top