Feed on
Posts
Comments

Front door PIR detector

I’ve decided that I’ll use the PIR sensor I bought from Ebay for $2 as a front door detector to detect anyone approaching the front door, sometimes people don’t ring the doorbell and knock instead (hard to hear sometimes) or a courier drops off a package at the front door. The idea is to have a small box powered by a battery to send the signal via Wifi to a receiver which can have an LED/Buzzer.

pirdet-1

The PIR has an input voltage of 4.5 to 20V, has adjustable pots for sensitivity and time and has an output that goes high when the PIR detects something, it also has the BISS0001 chip that’s present on the Alarm PIR sensor which I have.

IMG_2655

Current consumption at idle when at 9V is about 60uA which isn’t bad but I’d rather not use a 9V battery due to the size. I checked the output of the regulator which was 3.3 volts so I decided to wire the regulator’s output to the pin VCC input so it would bypass the regulator.

(more…)

Read Full Post »

A few months ago I bought myself a really cheap camera so I could record the front of my car whilst driving (dash cam), it cost $6 off Ebay. I’ve seen lots of dash cam videos and thought I’d join in too as there have been those kind of moments where you just wish you had a camera. Instead of manually turning the camera on, off and then pressing record I wanted to automate this with an MCU.

modcam-1

The camera has two buttons – one to switch it on and off and the other button to record or take a picture. It has a microSD card slot and USB connector which you can use to grab your pictures/videos and charge the built in Li-Poly battery.

IMG_2640

One other thing to mention is that I’ve found if the battery goes flat when you are recording it destroys the microSD card – you can still read from it but can’t write to it any more – maybe I just have a bad batch? Above are all the microSD cards which suffered this fate.  A downside with this camera is that it records everything in MJPEG which means your microSD card will be used quickly – a 27 minute recording was 2.4GB but what can you expect for the cheap price.

IMG_2577 IMG_2578

Two screws later and we’re in. We can see the Li-Poly capacity is 200mAh, we have a memory chip to the left and the processor chip to the right. I found that when the camera was turned on or recording, it draws 105-120mA and when the Li-Poly battery is charging the charger supplies it with about 100mA and slowly starts dropping current.

(more…)

Read Full Post »

Following on from Part 5, we looked at using optocouplers to turn on the PIR’s reset until the PIR settled down otherwise it trigger the alarm. In this part we’ll add on the code to save the 256bit random number to the EEPROM when the power is disconnected, reduce the NRF24L01 power consumption when we are sleeping and look at the PCB made for the PIR.

Detect battery removal

The reason we need to save the 256bit random number to the EEPROM is so when we power on the PIR again, the random number doesn’t start from the initial random number we programmed. We need to add a capacitor of sufficient size to keep the ATtiny84 running for a few milliseconds to save data to the EEPROM. After some testing I found that a 1000uF capacitor was more than sufficient for this task.

alarm6-1

The easiest way I could think of detecting whether the 3V battery was removed was to use a sckotty diode from the 3V battery going to the capacitor, have a wire connected to the 3V battery to the one of the ATtiny’s pins. The ATtiny and NRF24L01 run from 2.6-7V after the voltage drop, both will run just fine.

(more…)

Read Full Post »

Just a quick teardown today, we’ll be looking at the Tenda 8 Port Fast Ethernet Switch – I’ve never heard of this manufacturer before.

IMG_2620 IMG_2621

2 screws later and we’re in.

IMG_2623

(more…)

Read Full Post »

We’ll be looking at the Ericsson HM410dp ADSL2+ Service Gateway. I didn’t know that Ericsson made any routers at all, this one was manufactured in 2006.

Four screws and 2 notches later we’re in.

(more…)

Read Full Post »

In this video I show how you can use an ATtiny85’s (or any other ATtiny) ADC in differential mode which can be used to calculate the voltage drop on a device that isn’t tried directly to ground, for example, to measure the voltage drop across a shunt resistor to calculate current being drawn.

The differential mode allows for bipolar mode so you can see which input is the positive and negative, you can switch the inputs around in the ATtiny and then use the unipolar differential mode to get the full resolution of 10bits. There are also gain settings which you can enable – 1x or 20x gain.

Download ATtiny85_ADC_Differential_v1.0

Read Full Post »

Following on from Part 4, we looked at adding the sirens, SMS sender and the modifications needed to the server. In this part we’ll look at modifying the PIR sensor so we can add on the wireless client to turn it on and off.

This should be simple enough to do, just add a mosfet on the switch of the PIR and that should be it. However one thing I didn’t take account of was when you turn on the PIR, it transmits it’s signal to the alarm system like it was triggered which is a big problem.

We need to go back to the BISS0001 datasheet to see what we can do. Firstly I tried to pull 2Out low before powering up the PIR but it made no effect.

After looking at the datasheet more there is a Trigger disable input (pin 9) which is enabled if the voltage is more than the supply voltage (Vdd) * 0.2. On the board I found a 1M resistor connecting the supply voltage to pin 9.

(more…)

Read Full Post »

Following on from Part 3, we looked at securing the communication between the PIRs and the alarm system. This part was going to be on PIR and the extra steps I ran into when adding the PIR client to it but we’ll leave it for next time. In this part we’ll look at the adding the sirens, SMS sender and the modifications needed to the server.

We’ve upgraded to the ATtiny84 so we can use an extra pin or two, below is how we are utilising each MCU.

Adding on the sirens

Originally my plan was to have the sirens listening for when the server would contact them – it worked but it was a bit complex when it didn’t need to be.

(more…)

Read Full Post »

Just a quick teardown today – we’ll be looking at a Soniq QV320PH 32″ Plasma TV which has faulty audio – no sound, it seems to turn on and display images just fine. I opened this TV to see if I could repair it and in doing so I didn’t end up taking close ups of the chips.

After a lot of screws we’re in.

(more…)

Read Full Post »

About a year ago I purchased an ATtiny10 with one of my orders but didn’t get to program it because I didn’t have a programmer and didn’t bother getting one. I was looking at Hackaday – it looks like someone wrote up with an ATtiny10 programmer using the Arduino! You program it by pasting the hex file into the serial window.

If you haven’t seen the ATtiny10 before it’s really small (above is a picture of it next to the ATtiny85) but has minimal features, program space, SRAM, registers and functions. It can run up to 12MHz, has 1KB space, 32bytes SRAM, no EEPROM and an 8-bit ADC.

The majority of users whom use the ATtiny10 seem to use assembly instead of C; some examples of ASM files can be seen on the link above. I wanted to use C on it, however WinAVR which uses avr-libc doesn’t support it so we’ll have to use AVR Studio.

(more…)

Read Full Post »

« Newer Posts - Older Posts »