ethernet parking sensor

I am pretty new to Arduinos and programming. I am copying and pasting and hacking my through, trying to learn in the process.

I have an idea for a garage parking sensor. I want to use the HC-SR04 sensor and when it "see's" something at about 2 feet, turn on a stop light. I have a switch on my garage door and I plan on powering this unit up only when the garage door is open. Originally I wanted to use the arduino nano because it is so small.

I have a bread boarded sample working on my desk. I thought about adding a 10k ohm pot to an analog input and use it to control the distance I am looking for.

I also have several arduino uno's and I have a Ethernet shield. Now I am thinking about using the uno and hooking it up to my home network. But I have several questions.

If I hook this up to my home network, would I be able to see it on my network and program it through the network as if it were hooked up via the usb port? I assume I would have to leave it on all time, not power it up when the door is open. Instead of the 10k pot I would like to change the sensing distance from my pc. Is this do-able? Going further, it would be nice if I could get it to send a message or something when the sensor hits.

Thanks in advance and Merry Christmas.

would I be able to see it on my network

Yes

and program it through the network as if it were hooked up via the usb port?

No. Apart from the practicalities of getting the signal in the right form, you have the rug pulled from under you when you start uploading a program because nothing is running a program.

Instead of the 10k pot I would like to change the sensing distance from my pc. Is this do-able?

Yes

Going further, it would be nice if I could get it to send a message or something when the sensor hits.

Yes that is fine too.

The Arduino wasn't designed with the idea of being programmed via Ethernet. Using another Ethernet connected Arduino as an In System programmer is probably possible, but I don't think it will be a trivial project.

For long distance programming perhaps use a USB to TTL converter then use RS485 drivers for the Tx, Rx and reset lines. Should work in theory, don't know if anyone has done it in practice.

You could keep the Arduino next to your PC and extend the control lines to the HC-SR04 using RS485 drivers. Again should work in theory, don't know if it has been done in practice.

For a guaranteed to work solution, spend $200 on a laptop computer that you temporarily house in the garage. You remote desktop from the computer in the house to the laptop and run the Arduino IDE on the laptop which is connected to the Arduino via USB. Once you have finished the project you recycle the laptop for some other purpose.

For a completely non-electronic $5 solution, hang a tennis ball from a piece of string tied to the ceiling so that it just touches the driver's side wing mirror when the car is in the perfect position.

For a guaranteed to work solution, spend $200 on a laptop computer that you temporarily house in the garage.

A much cheaper option is a Raspberry Pi and run the Arduino software on it.

Thanks everyone. I have the tennis ball now. :) I don't know anything about raspberry pi's or the IOT.

OK so I can't program it remotely via ethernet. That makes sense but I had to ask. But I could set it up as a web server and when the sensor triggers it could send a message to a web page or somewhere? Kind of like an alarm or an alert that someone parked. I could take it step farther and sense a whole bunch of distances. if the distances are getting smaller then someone is parking. If they are getting bigger then someone is leaving. Is this do-able?

Is this do-able?

Yes.

sdtag: if the distances are getting smaller then someone is parking. If they are getting bigger then someone is leaving. Is this do-able?

Yes, although, that someone might be a pedestrian or a stray dog, not a car.

I don't leave my garage door open that long.

The Moteino system has a way of programming the Arduino over the air. I think it had a special bootloader and an SD card to hold the program during the programming phase.

There are a few other methods of doing it but really, why do you need to reprogram over the network? At most you should be simply adjusting a few parameters which your program stores in EEPROM.

MorganS: ...why do you need to reprogram over the network? At most you should be simply adjusting a few parameters which your program stores in EEPROM.

In a professional environment you have the budget to replicate a small scale version of the final product in the lab, complete with motors, sensors, actuators, pumps etc. If you need to add a new sensor or whatever you can thoroughly test and debug the software before deploying it in the field at your leisure.

For a typical hobby project you only have one of everything, one power supply, one motor, one water pump, one solar panel and so on. As a consequence once you have built and deployed a version 1 prototype system you no longer have any hardware to develop or test with. Effectively your 'live' system becomes your next prototype which is why you need to be able to update the code remotely or roll back changes.

I looked at this problem several years ago and concluded that buying a cheap ethernet enabled laptop and temporarily co-locating it with the Arduino worked out cheaper than buying purpose built serial to Ethernet converters. It's a crazy situation, 'industrial' type converters are way overpriced compared to the commodity single board computers available today that could most likely do the same job using software and a fast processor.

What's the alternative? Currently I'm working on a design where there is minimal software out in the field. All the sensors send back data to a central microcontroller using PWM signals which are multiplexed in round robin fashion down cat5 cable. It's slow and dumb, but I only need to update one microcontroller and it's sitting next to the computer instead of at the end of a muddy track.

When you look at the tortuous process that the Freetronics people came up with for updating via ethernet, you have to ask the question, there must be a better way? http://www.freetronics.com.au/pages/how-to-upload-a-sketch-to-your-arduino-via-a-network#.Vn1BSJN96L4