Hi guys, newb here. I've been wanting to get into Arduinos for some time now and now I have a project that will need it. Since I have "no idea what I'm doing", I would like your comments and recommendations. I have, lets say above average electronics knowledge, I work in web.dev so the programming part should be ok, since it looks very similar to PHP.
My project should be able to pick up a level sensor's values. These will be set up later, as I don't know the values right now. When the level of the sensor abruptly changes, I would like:
Version 1 - sound a siren
Version 2 - send SMS, sound siren upon sms, call to listen, start taking pictures, possibly turn on a light
For V1 I'm guessing I'll just need an Ard Uno board and experiment with the rest.
For V2 my guess is Ard Uno + Ard GSM/GPS/GPRS shield.
What I don't know is if I install the mobile shield on the Uno, will I still have I/Os left for the sensor, speaker, etc.?
Also a local company sells both boards, but I'm unsure if the mobile shield comes with the antennas and stuff. They don't mention it in the description.
Thanks in advance for your help. I'm so excited to join this awesome community!
Paul
Without knowing the full scope this answer won't be complete. But here's the gotcha I'm always running into and it sounds as if you will too:
There are only 6 analog inputs on the uno (from memory, the mega has two more (don't pounce everyone if I've got that wrong) as does the Sanguino- this has two more for sure)
And with sensors that have a range (say, proximity or light levels or em levels or temperature) those ports tend to get used up pretty quick, especially if you are working with xyz dimensions or say RGB light colors the ports get used up three times as fast.
When you add in the GPS and you might just have very few left.
The good news is you can have more than one Arduino talk to another. Now some of that gets a bit tricky but its very doable, although an easier route might be having sensors going to both Unos and then having the Unos output commands based on the inputs they are getting. Those outputs could then be combined in logic gates on a separate PC board and then commands are sent off to your device (robot? alarm system?) once filtered through the logic gates.
When you start having more than one arduino "on board" make sure you tie any used ports high or low and always always have everything on the same ground. This will clean up the noise levels tremendously. Last: make sure you sample the inputs of the analog ports several times and then average them or take a mean before you output or process that value; they can vary quite a bit and if you hit upon an errant voltage you don't want to base your calculations off that one bad data point.
Lets hear more details and we can point you in the right GPS co-ords.
Really the only input will be the level sensor. You're correct in assuming that its an alarm.
Since I don't have the water level sensor yet, I'll be guessing, but they usually have a moving part that changes resistance based on where the floating element is. A change in the level is what I want to trigger the alarm (or sms). There's a good chance the level sensor will be powered externally.
I also found an I/O relay DIY shield by Velleman. Could this be used to trigger the siren and light (both externally powered) by stacking the mobile board on the Uno and the I/O shield on the mobile shield? Considering some parts may be powered by 12-24V.
If I coud get the harware set up, I can imagine many possibilities like SMS requests for level percentage, GPS position requests (if it needed to be moved and someone else needed a position), real time video or snapshots over mobile data would be great. Triggering the light would be nice since the VGA cam will probably be dead in the dark.
It sounds perfectly feasible. Use the Arduino to turn on the camera which would store pictures directly to a memory device - the Arduino hasn't the 'grunt' to do anything in that process. Depending on the GSM shield you have chosen you could lose 5 i/o pins but there's still quite a few remaining even on an Uno.
Well the guts of this is pretty simple. You really don't need another shield for the sensor and alarm trigger. Assuming the sensor is a resistance type, it can be simply fed into any of the analog inputs (analog pins 0-5 on most arduinos) and that level can be read as a value from 0-1024. A simple bit of code would say " if level of pin 1 is higher than 512 then send a high signal to digital pin 13" and that would trigger the alarm aspect.
With the "internet of things" these days so many devices have ports on them that allow logic signals to be sent into them to trigger a function. This is especially true of security type items like alarms and cameras.
I'm assuming this a project because you want to do it yourself. But on the off chance this is simply something you need, there are cheap solutions for this on the market. Any cheap web enabled "security" cam available at a box store will have the ability to send images and fire an alarm triggered by an event or an external sensor.