I am hoping for some general feedback on my - first ever - schematic and electronics project.
I’ll also make a thread on an AVR forum, since I received help there with this project in the past, and was asked to post my final diagram once ready.
More specifically, I notice on the breadboard that, just sometimes:
- one of the IR LEDs is blinking, whether LM393 is giving a LOW or HIGH signal, and disconnecting the HC-05 Bluetooth module seems to fix that.
- the HC-05 Bluetooth module doesn’t power ON.
It is unclear if this is because I have too many components on a small area, flimsy wiring, … or a fault in the design.
The schematic and a picture of my breadboard set-up are attached.
You’ll see an extra red and orange LED for testing; they can be ignored.
Please keep in mind that whilst using EAGLE I couldn’t seem to find:
- the TSOP31236 and settled for a different TSOP with the same amount of pins but in a different order (see name of nets).
- how to add VCC and GND for the LM393.
- a way to connect PIN34 of the HC-05.
The ATTINY45 pulses the IR LEDs at 36kHz with intervals.
The ATTINY841 keeps track of the amount of people going in and out of a room, based on the LM393’s output, in turn connected to the two TSOP receivers. Two beams are used to determine direction.
Accross the doorway, there is a retroreflector to send back the IR light, so I only need one device with one set of batteries for both the transmitter and receiver.
EXPLANATION ATTINY841 PINS
- If one or more people are in a room, pin 13 lights up a LED and pins 11 and 12 communicate with an app on my phone.
- Pin 4 is a forced reset.
- Pin 5 and 6 get a HIGH signal for a bream break from the LM393.
- Pin 7 and 8 allow the user to check if the device is installed correctly by pressing a button. If the IR LEDs and the reflector are mounted at the same height, the install LED blinks.
- Pins 9 and 10 allow the ATTINY841 to enter HC-05’s AT mode to change the name and password of the device by using a HIGH/LOW sequence.