Arduino sensor sending notification to remote server

Hi there, I wonder if anyone can help provide some guidance.

I want to create some movement sensors. These need to send a signal from a remote building to a central building, but the distance is only about 20-30 metres. I already have mains power connection to the remote building, and ethernet provided by powerline adapter.

I just want a simple on/off flag for the remote sensor. I will be using a python script (probably on a raspberry pi) in the central building to monitor the state of the sensor(s).

Once I have proven the concept of the remote sensor with the Arduino I want to burn it into a ATMega328 so that I can create as many of the sensors as required.

I've considered:

  • A remote relay switch
  • HTTP Post
  • Writing to a file on the raspberry pi

What would you recommend as a method to switch the flag state of the remote sensor? I want something as simple as possible with minimum code on the ATMega328.

Thank you

Maybe just ping the Tx line with a compatible voltage... What do you mean by burning atmega, If you want it standalone without the board you will need to make yourself an avr programmer (arduino R3 board can do it) and flash the code with avr, or flash the bootloader, and then program with arduino board... If you just want to buy chips that is, they are blank and cant be flashed by arduino boards initially.

Thanks for your reply. Re your suggestion of watching the tx line i did consider that but with a 20-30m distance I would think i would be pushing it even at 24v wouldn't i? Also this would mean having to run a low voltage cable which I would rather not have to do...

With the ATMega328 I was planning to burn the Arduino bootloader as per this article. Can you see an issue with that?

you could run a UDP client on the remote machines using ethernet
send a datagram indicating ON/OFF
the client could acknowledge if required

For some reason I had trouble with that, so I did this and used Atmel studio. Made myself a nice programing cable too from pata or floppy cable, to connect the jumpers on the board in one go.

If you have the R3 uno board you are in luck
You can set fuses in it too like setting the chip to use its own clock, and anything else it can do, or disregard the bootloader and program directly if you ever need maximum available memory

I ran a 20m ethernet once, and powered a router with 12V on the other side using 4 of the wires, so you wouldn’t be pushing it… but I ment the tx(or rx) on the powerline thingy.
…now that I think of it your powerline adapter probably wouldn’t do anything if you just did that, but I never tried, if it needs to target an address it wouldn’t, if it just acts like a cable, it would just mimic activity on the other side i guess. Google what voltage ethernet normaly uses on rx and tx and try…

If powerline adapter experiment goes sideways use an ethernet shield and what horace said, its more stuff, but rock solid

you could run a UDP client on the remote machines using ethernet
send a datagram indicating ON/OFF
the client could acknowledge if required

That's a brilliant idea thank you!