Inspiration
Often times detecting an intruder won't be enough we need to also stop the intruder from escaping. Because by the time police arrive to the spot the intruder would have executed an escape plan. Think of a museum setup, suppose the intruder stole a precious item, we not only want to detect that the item has been stolen, we also have to prevent the intruder from escaping
What it does
The device that we built detects an intruder and also stops the intruder from escaping by closing the doors. And through the user interface developed through Node Red the user can decide whether to close the door or no. When the intruder obstructs the light rays to the light sensor, the output of the light sensor to the SAMW25 micro controller goes low and this signal change is sent to the cloud using MQTT and the user is notified that there is an intruder through the user interface built with Node Red.The user can also choose to make a stepper motor turn to simulate opening or closing a door.
How we built it
There's hardware as well as software component to our project. The hardware includes the power circuit, light sensor, motor controller. We first decided on the schematics and then moved to PCB. There is a little bit of complexity in our power . We designed our PCB on Altium. The software includes boot loader, main application, over-the-air firmware update, MQTT. The main application includes detecting the light sensor output and sending it to the cloud through MQTT and receiving MQTT inputs to direct the stepper motor to run one way or the other.
Challenges we ran into
The biggest challenge in our project is that the external crystal does not work. It is either the incorrect part or soldered incorrectly. Either way, if we try to initialize our system using the external crystal, it will hang because the oscillator is never ready. This meant we had to switch to the internal oscillator and change some clock configurations in order to run anything with a timer. Unfortunately, that also meant that trying to update our WINC1500’s WiFi was a little more involved because we had to alter the serial bridge code instead of being able to run the premade .elf file. We think this may also contribute to our difficulties with the TTY camera. It runs a UART protocol at a very low baud rate, and the OEM for the camera chose to include several deliberate 0x00 packets in their message protocol. The SAMW25 has a lot of trouble trying to synchronize with a stream of 0’s, and having a more accurate clock could have possibly helped it guess the boundaries of those packets better. Also SAMW25 expects an explicit stop bit, but the camera module doesn't transmit a stop bit.
There were also a lot of tricky issues with the board bring up. It was very difficult to get programming on the SAMW25 on the custom PCB working, then difficult to update the WINC1500 firmware, and then difficult to connect to WiFi because the USB port cannot supply enough current for the WINC1500 on its own. None of these problems were insurmountable, but they made the hardware bring up take a long time and we had a very limited turnaround from the time we received the parts to our demo time.
Accomplishments that we're proud of
Basically everything major on the board except for the camera works. The power circuitry behaves as expected, we can interface with the light sensor and the actuator over WiFi, the SD card works, and we can interface with a serial console over the USB port. The camera connections are correct; it is a software synchronization problem which currently prevents it from working. Overall the PCB design and bring up went well.
What we learned
Double check the BOM and then check it again. The crystal oscillator issue is likely the problem of having the wrong part. There were also some issues with headers and connectors being the incorrect size for our board. Luckily we could easily solder in standard headers to make the board work, but that issue could have very easily been avoided.
What's next for Pink Panther
Trying to get the camera to work would be really nice. Using actual mechanical components like a door attached to the motor.
Log in or sign up for Devpost to join the conversation.