Author Topic: SUV alarm using Moteino-Mega, and more  (Read 3369 times)

oric_dan

  • Jr. Member
  • **
  • Posts: 64
SUV alarm using Moteino-Mega, and more
« on: December 23, 2015, 09:55:43 PM »
This a carry-on from another thread,
https://lowpowerlab.com/forum/index.php/topic,1492.0.html

Note: all of my references below are referring to the RFM69HW, 100mW radios.

Quote
Quote from: oric_dan on Today at 03:18:51 PM
Felix, since you mention wanting to see clone boards, attached is a picture of my current radio lashup before being finalized. ProMini controlling RFM69 radio. Your library example software works fine.

Also, for reference, I've been using 2 of your Moteino-Mega boards to implement an SUV alarm. 433-MHz, 55000 bps, and 100mW xmit power. Recently I did some range testing, and had good RSSI of about -85 with the one node inside the SUV, and the other node 500' away inside a metal frame commercial building. Very happy with that. I had previously tried RFM12 going just 60' from condo to inside the SUV, and reception was unreliable.

Quote from: Felix
oric_dan, thanks for the photo, nice "clone" :) I think prominis+rfm69 are not such a rare sight but people have to understand the limitations of what you mentioned and how to get around them, thanks for rehashing that as well.

Nice to hear about your MEGA alarm range as well. What a difference between RFM69 and RFM12B huh ... plus you get all the nice to have features and goodies of RFM69. Are you using the same helical antenna on the MEGA alarm project as seen in the promini photo?
Any chance we could see more details about that alarm in the projects forum? :D
« Last Edit: December 24, 2015, 05:51:47 PM by oric_dan »

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #1 on: December 23, 2015, 10:05:21 PM »
Felix, to explain my projects a little more .... the ProMini-RFM69 node is to go on one of my smaller indoors robots, and I don't need full transmit power there, so 10 mW will probably be plenty, and little danger of overburdening the little v.reg on the ProMini. However, I plan to build another such node and mount a 1-Amp DPAK v.reg on the bottom of the fiberboard for my outdoors robot.

On the SUV network that I mentioned, I'm using the 1/4 wave whips. I remember now that I actually had RSSI = -80 for the measurement that I mentioned. I was surprised the margin was so good, considering the radio was located right in the center of the car, on the console between front seats. Signal levels go down when inside the car, which is why the RFM12 radio signals dropped out even at 60' range.

In regards the helical antenna, I need to make some more measurements, since I had the RFM69 radio setup wrong when that antenna was on the ProMini node, and I removed it was part of troubleshooting, so I have no idea right now how well it works. More to follow.
« Last Edit: December 23, 2015, 11:15:23 PM by oric_dan »

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #2 on: December 23, 2015, 10:32:23 PM »
Here is more on my SUV alarm. This is actually part of my AMI home automation system. I have 2 networks, a short-range one using RFM12s and the other longer-range using RFM69HW radios.

The RFM12 short-range network is for inside the condo, and once fully implemented will have 5 or 6 nodes, mostly for security and environmental monitoring when I am traveling. The system outputs ultimately via an ethernet card and my router to Xively and Twitter. The remote nodes are various Arduino-328 boards and jeenodes, the Base Station with Ethernet is a Mega2560, and the 2 RF Hubs are ATmega1284 boards.

The RFM69HW radio is used in my robot and SUV network. As mentioned, I chose this radio to get reliable comms to inside my SUV located in the carport the other side of the building. I'm also using this network for my robots. The higher transmit power will give me good comms to my larger robot when it's running outside in the fields.

The SUV 'remote' node is a Moteino-Mega with RFM69 radio, and so far I am still working out which sensors to use. I do have an MPU6050 I2C buss 3-axis accelerometer and 3-axis gyro module on it to sense car movements, etc.

The main Hub for the RFM69 network is an ATmega1284 board inside the condo. However, I've also built what I call my RF-PortaHub, see the picture attached. There I have a Moteino-Mega under the fiberboard, and the main processor is a Teensy3.1 board with a 320x240 ILI9341 LCD. This is all working. I chose to use a separate radio board, since I couldn't get the Teensy3.1 to work with the RFM69 radio [I can't figure out how the T3.1 interrupts work], and this way I can allocate all the T3.1 SPI bandwidth to drawing graphics on the LCD.

The basic idea is that I will use RF-PortaHub to access the SUV directly when traveling, and for the robots when out in the field. I am still working out the node protocols for the 2 networks.
« Last Edit: December 24, 2015, 06:01:01 PM by oric_dan »

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #3 on: December 23, 2015, 10:51:20 PM »
Two more quick pictures on my project. The first shows the sort of displays I am using the RF-PortaHub for. The first picture is a scan made using the pulsedlight3d.com Lidar-Lite on one of my robots, namely 180-deg horizontal panning scan on the left, and 90-deg vertical scan on the right. Lidar transmits a laser beam and picks up the reflections from objects, similar to ultrasonic sonar, except with a much narrower beam. The curved line indicates 10' distance.

The 2nd picture shows my latest indoors robot, RoBurt, that the ProMini-RFM69 node mentioned previously will mount on, next to the servo. Typical little robot. RF-PortaHub will send commands to the robot, and display robot sensor data in real-time while the robot drives around. It's basically an autonomous robot, but the radio link allows me to essentially see what the robot is thinking from across the room. RF is cool.
--------------

BTW, I should add ... for 7 or 8 years I've been using XBee Pro radios on my robots, but anymore there are so many wifi routers around that I started having a LOT of problems getting reliable comms and reasonable response-times to my bots, even when in the same room. Foo.

So, I decided to go to the non-2.4GHz bands for longer range and lack of RF interference.  It was a good switch and I thank Felix, and also Jean-Claude Wippler and his jeenodes, for getting me away from the wifi band. Thanks again.
« Last Edit: December 24, 2015, 05:53:40 PM by oric_dan »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: SUV alarm using Moteino-Mega, and more
« Reply #4 on: December 28, 2015, 08:32:19 AM »
BTW, I should add ... for 7 or 8 years I've been using XBee Pro radios on my robots, but anymore there are so many wifi routers around that I started having a LOT of problems getting reliable comms and reasonable response-times to my bots, even when in the same room. Foo.
So, I decided to go to the non-2.4GHz bands for longer range and lack of RF interference.  It was a good switch and I thank Felix, and also Jean-Claude Wippler and his jeenodes, for getting me away from the wifi band. Thanks again.

Very nice project. Funny you mentioned 2.4ghz is finally catching up with reality. Unfortunately wifi is wide bandwidth and you essentially have only about 3 non overlapping channels as seen below. In sub 1Ghz you can play around with bandwidth and frequency as much as you want if interference ever becomes an issue.


oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #5 on: December 28, 2015, 02:14:33 PM »
Yes, I live in a condo complex, and can pick up about 30 routers, scattered all over the 2.4G band. So, a poor little XBee radio has to try and contend with this. As it is, I periodically move my router band assignment around to try and keep out of the way of other close-by routers as people move in and out.

Bluetooth would probably work better in such a situation, since it uses frequency-hopping, but of course BT is short-range and I'm implementing networks with multiple nodes, so the RFMxx radios are great for this. I do plan to try some spectrum scans with the RFM69, and possibly implement a system so the network Hubs can automatically move the frequency being used to avoid interference, but don't really expect too much of a problem.

I have my ProMini-RFM69 node software working well enough now that it looks like an XBee radio to the Host computer - ie, just connect the rig to D0,D1 on the Arduino host [note - my boards connect using plug-in FTDI adaptors rather than having on-board FTDI chips]. So, RoBurt is online via RF now, :-).

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #6 on: January 08, 2016, 04:30:50 AM »
As an update, tonight I just got my robot tank RoBurt running across the floor for the first time, and communicating remotely using my RF-MiniLink module shown previously. Very cool, I can control the robot interactively via RF link and enable/disable control routines, just like when it was connected directly to the PC via the FTDI dongle. I simply unplug the dongle and plug in the MiniLink module. Moteino RFM69 radios rock.

This shows the standard bootup menu that the robot sends over the RF link. I can remotely turn on/off subsumption routines, using commands such as "uc" and "ue" for Cruise and Escape, read the sensors using the "ds" command, and turn on various Debug reports using "d0"..."d9", on and on. Great for remote monitoring and control from across the room with no wires attached. Couldn't be happier!

Code: [Select]
RoBurt_TLA v2_1 ...(01/07/16)
Commands:  ? sfblr (h)old
-(d)ebug: 1..9=toggle,(r)eport,(s)ensors
   (b)ump,(i)o_pins,(a)nalog,(t)one,(v)olts
-(m)otor: <,>,(f)wd,(b)wd,(l)ft,(r)ght,(s)top
-ms(g)s:  (l)ist,beh_(h)ist
-s(u)mp:  (d)efault,(z)ero,displa(y),(p)rox
          (c)ruise,(e)scape,(a)(v)oid_lft,rgt
          (m)oth,a(n)timoth,wall_(l)ft,(r)ght
-s(k)ill: (s)can,(o)bj_find
-(t)asks: (w)all,(t)rack
-(z)ero_all,(q)uit
Input-volts=9.12
Servo-volts=9.14

Right now, I'm just connecting the Moteino-Mega of the RF-PortaHub directly to my PC, but pretty soon I'll be using the PortaHub itself to control the robot, and watching the sensor scans on the LCD.

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #7 on: October 20, 2017, 02:47:39 PM »
Wow, hard to imagine it's been almost 2-years since I started this thread. Been working on the robots and whatnot, and just getting back to the home automation and alarm systems. So I thought I would update.....

I just bought a GMC van to use mainly for camping and traveling, so it's a good opportunity to get the system fully operational. I will post pictures in a day or two. There are 4 aspects to my system, all linked to together with RFM69 radios running at 100-mW and 55000 bps, plus Moteinos and lowpower library code, and a few other arduino boards. I had originally tried RFM12 radios a couple of years ago, but 10-mW signals were unreliable to inside the car when parked on the other side of the building. The system:

- home security system main Hub - with ethernet to router to twitter and xively
- home environmental checking - a few local standalone RF nodes
- RF links to robots - more standalone RF nodes
- RF-PortaHub mentioned previously, mainly to use for robots in the field
- new in-car alarm (see below)
- new RGB RF-Cube for standalone monitoring (see below)

The past couple of days I deployed the in-car alarm system, using a Moteino-Mega mounted on my own carrier board (picture to follow), and started doing some reliability and longevity testing. Features:

- runs off 4 in-series NiMH 2500 mAH AA-cells.
- carrier has MPU6050 3-axis accelerometer/gyro module and piezo.
- 9V, 1W solar panel in the window to charge the battery.
- plans to add PIR and vibration sensors to signal break-ins.

/////////////////
I co-opted the code from the DeepSleep sketch found in the RF69 library and it works very nicely, but unfortunately it puts everything to sleep but does not have code for waking the system back up, turning the radio and flash back on, &etc (hint, hint).
////////////////

In-Car Alarm: so far, the Moteino-Mega board is working very well, and the solar panel is driving 40-70 mA into the batteries for a few hours per day to keep them charged. This is about Q/50 - Q/35, and from what I've read, you can wire the solar panel directly to the batteries (using a Schottky diode for reverse-blocking), without fear of over-charging the batteries. I do also have a 4.1 ohm series-R so I can measure charging current. When in sleep-mode, the Moteino-Mega system is only drawing uA, and the battery has stayed at 5.4V steady for the past couple of days, with another 0.1V increase when the sun is out. It wakes up every 8-sec using the watchdog interrupt, and can check sensors. Then, it wakes the radio and sends a status packet every 4 watchdog resets. I need to add some break-in sensors to this board.

RGB RF-Cube (picture to follow): I bought a cube on amazon, gutted the interior cktry, and installed an RFM69 RF node inside with diffused-RGB led and piezo. It's the perfect size for a 4-AA cell pack and little pcb. So far it's working standalone to monitor the in-car alarm. When the Cube receives a packet from the in-car alarm ... Blue flashes for 1 second, then Green comes on steadily to indicate the system is running ok. Then if the packets stop, Red comes on, and the piezo beeps. So far, so good. I can carry the RF-Cube around to any room in the house.

https://www.amazon.com/gp/product/B004FBKHZ8

BTW, piezo output is rather wimpy at 3.3V, but I am driving them in counter-phase from 2 I/O pins, and tested in order to find the "resonant" frequency. The ones I have put out quite a loud, shrill tone at around 5-KHz.














oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #8 on: October 20, 2017, 03:44:54 PM »
This shows the data currently coming from the Moteino-Mega in-car system. The sun just hit the solar cell and charging picked to 24, 48, then 73-mA.  The remote node ID = 32, the solar cell voltage = 5.8V (when c=0, this shows the battery volts), the battery has come up from 5.4 to 5.6V, and c = charge current. The RSSI is in the -60 range, and the last value is the #of (radio) wakeups since the Moteino-Mega booted last, so it's been running for about 60-hours, with the batteries at no lower than 5.4V.

For reference, when I originally had this system running with the cpu and radio going full-time with no sleep, the batteries ran down after about 24-hours.

Stat32:s54,b54,c0,-65,7670
Stat32:s54,b54,c0,-65,7671
Stat32:s54,b54,c0,-65,7672
Stat32:s54,b54,c0,-65,7673
Stat32:s55,b54,c24,-70,7674
Stat32:s55,b54,c24,-63,7675
.............
Stat32:s56,b54,c48,-63,7680
Stat32:s56,b54,c48,-62,7681
Stat32:s57,b55,c48,-63,7682
Stat32:s58,b55,c73,-68,7683
Stat32:s57,b55,c48,-69,7684
Stat32:s57,b55,c48,-68,7685
..............
Stat32:s58,b55,c73,-63,7695
Stat32:s58,b55,c73,-63,7696
Stat32:s58,b55,c73,-64,7697
.............
Stat32:s58,b55,c73,-65,7703
Stat32:s58,b56,c48,-62,7704
Stat32:s58,b56,c48,-66,7705
Stat32:s58,b56,c48,-66,7706
Stat32:s58,b56,c48,-66,7707




« Last Edit: October 20, 2017, 04:38:31 PM by oric_dan »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: SUV alarm using Moteino-Mega, and more
« Reply #9 on: October 20, 2017, 04:00:10 PM »
Awesome, waiting for more!

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #10 on: October 20, 2017, 04:30:37 PM »
Couple of additional details....

- the van has front and back separated by a steel bulkhead with an access door (I installed hinges), and I plan to add PIRs front and back, and probably vibration sensors, to indicate any break-ins. It's too much trouble to wire door-open switches on all 6 doors and string the wires around the van. The initial alarm system will only indicate if the van has been stolen, via disappearance of signal/packets, but PIR would show entry.

>>>> If anyone has ideas for other sensors for inside the van/car, I'd be interested to hear.

- the RF-Cube is a really, really cool minimalist system, since it runs standalone, and you can see the status of the in-car alarm immediately from anywheres in the room. See the Green color, and everything is cool. See the Blue flash, and know it's receiving packets.

- my original idea was to have a portable RF node that I could take on trips, for when I am staying in motels in "questionable" places, LOL. I'll have a pigtail on the cube, so I can also connect a PC/laptop and view the incoming data on a terminal.

- I plan to set it up so the Cube will bootup and check to see if the main in-home Hub is online. If so, then the Cube will reset its Node value, and will act like a slave-node that the main Hub can use as a display node. If no main Hub is present, then the Cube will assign itself as Hub.

- also, since the RF-PortaHub (shown previously) does not have a keyboard, I have 2 push-buttons (dot, dash) on it, and use Morse Code to send cmds to my robots, eg, 's'=stop, 'f'=forwards, 'r'=right', etc. So, I also plan to add a couple of push-buttons to the RF-Cube so I'll have a basic user-interface to the in-car alarm or the main Hub.

The Morse code module is pretty simple, and I can post it if anyone is interested.





oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #11 on: October 20, 2017, 05:39:11 PM »
Another thing I should mention regards the in-car alarm system ....

Since starting this thread 2-years ago, I've played a lot with computer vision chips, like OV7670 and then the Arducam-Mini. The OV7670 is way too much trouble to mess with, but I had good luck with the Arducam-Mini module, and have a basic system working for my robots. The modules are quite cheap and easy to use.

http://www.arducam.com/arducam-mini-released/#more-934

My robot vision system uses a Teensy 3.x, but I plan to get this thing working on the Moteino-Mega, and possibly use with my in-car alarm, in case of vandalism. We've had a couple of car break-ins and thefts in the condo complex. My original plan was to aim some LDRs at the windows in the SUV, and mount the Arducam on a 360-deg servo arrangment, and get it to pan over to the window showing quick and lasting intensity changes (or some such thing that might have a chance of working).

The Arducam-Mini has several JPEG modes, and produces files as small as 6-KBytes, which can be stored in the 1284's RAM and the on-board Flash chip, and should be transferable to the in-house RF node in a couple of seconds or so. One more thing in the endless project queue.

 



Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: SUV alarm using Moteino-Mega, and more
« Reply #12 on: October 23, 2017, 12:00:03 PM »
I have also played with the arducam-mini for the purpose of a wireless snapshot system. It got sidetracked but the ability to transfer large image files at high Bitrates has been achieved, though not ready for prime time. But definitely possible.

oric_dan

  • Jr. Member
  • **
  • Posts: 64
Re: SUV alarm using Moteino-Mega, and more
« Reply #13 on: October 24, 2017, 03:53:05 PM »
Hey Felix, now that I have the Moteino-Mega node deployed in the van, I'll try the Arducam-Mini once I get a chance. Currently, I have the camera setup for my robots controlled via a Teensy 3.6 so I can capture complete 320x240 raw images to RAM for direct processing, HSV &etc, but it should be easy enough to get it to work on the 1284 to capture and send jpeg files.

The Moteino-Mega node in the van ran fine for 4-days so far, and with combination of sleep and solar charging at Q/35, the AA-cells never dropped below 5.4V (1.35V per cell). I use wdt wakeup every 8-sec to check sensors and then send a status packet to the Hub via radio every 4 wakeups. I am currently hooking up a couple of HC-SR501 PIRs and also adding code to do local data-logging. Too many fun things to try.

EDIT: btw, after several days of using the RGB RF-Cube node to monitor the in-car node, I really like this arrangement. I can move the Cube to any room and immediately see the van status. Plus once I get the main Hub online, the Cube will make a nice satellite display for the entire system. Some Morse code beeps or flashing to send msgs.

« Last Edit: October 24, 2017, 04:16:32 PM by oric_dan »