There is an Alarm system contains 3 system which are categorized into following: -
Panic Button (key chain)- Upon pressing button it will send message to central system via nearest/specific relay alarm
Relay Alarm - upon receiving message from panic button it will trigger its
alarm and transmit the message over to central system.
Central Alarm - This will receive all the message and activates its alarm upon receiving the correct message and
will send message back to the transmitter panic button.
Kindly check the schematics (of panic button) and suggest me the changes i need to incorporate in the hardware.
The key chain will have components as follows: -
1.Push Button
2. 2 led indicators
3. RFM95W 915SR
4. Logic level shifter (TXB0108 8-Bit Bidirectional Voltage-level Translator)
5. voltage regulator (AMS1117-3.3V,1A(for RFM95W)
6. Resistors
7. Capacitors
8. Arduino Nano
Central alarm contains components as follows: -
1.Push Button
2. 2 led indicators
3. RFM95W 915SR
4. Logic level shifter (TXB0108 8-Bit Bidirectional Voltage-level Translator)
5. voltage regulator (AMS1117-5V,1A (for display); AMS1117-3.3V,1A (for RFM95W)
6. Resistors
7. Capacitors
8. Arduino Nano
9. Buzzer(5V-12V)
10. Display (Oled .96inch)
I need help in converting these schematics to pcb as I am facing issue like pads getting connected to antennas GND upon adding pads after converting schematics to pcb.
Help me with selecting right components and getting pcb designed.
First of all in any schematic it is rather important that you have a spot from where you derive the (in this case 5v) power that you use. There needs to be a power in connector.
Secondly, i would ditch the TXB0108, also because you need to switch the OE pin for the directionality and the SPI connection is full duplex. Not only have you not connected it, but programmatically it is rather hard (if not impossible) to control the directionality if signal can actually flow in either direction at the same time.
You can simply use a 8MHz (also known as 3.3v) Nano and run it at 3.3v and you don't need the level converter at all.
And back again to the power supply. If you plan to use batteries you should include their mounting and voltage regulation in the design.
Most importantly, you should first put everything on a breadboard and make sure it works ! I then first make a soldered on experiment pcb prototype that can be safely moved. And then when i am confident it all works as i want, i design the PCB.
Your LEDs won't work. Cathodes should probably be connected to GND.
Your power supply layout doesn't seem consistent. You're using Vin to power the 1117 but the Nano's 5V for the VCCB reference on the level converter. This will result in the 1117-3.3V trying to power itself by a reverse current through the Nano's onboard 1117-5.0, which likely won't work, or if it will, it'll be a marginal situation. Assuming you're powering this through the USB port of the Nano (I see no other power input, so that must be it?), just use the +5V net of the Nano and ignore Vin on the Nano.
So don't use auto-routing and instead route everything manually. This generally works better anyway with most commonly available software.
What kind of software do you use and what is/was your workflow when you ran into these problems?
I'd break out some pins/interfaces to the outside world for diagnostics, future upgrades etc. Stuff like UART, I2C etc.
PS: if you're going to do your own PCB anyway, I'd forego the Nano and just through a bare microcontroller in instead. It'll save you some space. I do acknowledge the usefulness of using the RF module as a black box since RF design is a different ballgame and I wouldn't recommend trying to bare-bones that part.
Actually i made a circuit but i was not aware of the thing that not only power supply but all the pins communicating will work on 3.3V so my circuit contains only nano,rfm95w,sma open end connector,push button and 7.4V power supply for nano.
I connected rfm95w directly to be powered from 3.3V nano which i later found has limited current supply upto 50mA and is not enough for the rfm95w module at peak transmission.
Since i already made the circuit so used it anyway an limited the tx power to 13-14dbm which can be handeled by nano maybe.
Apart from the 3.3v nano, what capacitors and other things i should include in order to make this circuit more relaiable? I am a beginner at making schematics.
I guess i will still need external voltage regulator to power the rfm95w seperately?
I was tryin to add pad for the vin pin and the ground pin where the external power supply of 7.4V will be used but could not do it due to the issues I am not aware of in EasyEda.I am beginner at making schematics which you can probably see being reflected in my schematics.
Oh yeah missed that hehe. They'll never light up like that.
You already have that. If you use a TO-220 package for the Nano + rfm95w the AMS1117 3.3v will suffice, or you could use the Nano internal 3.3v but that will not provide much current. If you use an SMD package for the AMS you should make sure that you have some heatsink on the PCB for it.
OK, gotcha. You need to add/find a component in the EasyEDA library for your input jack. I don't work with EasyEDA, so I can't offer specific suggestions.
I understand and that's fine of course. However, many microcontrollers turn out not to be very difficult to implement in a bare-bones fashion. The ATMega328P (or -PB) is actually very easy to get to work. I would recommend getting a USB-ASP programmer if you go this route as it's more convenient than trying to use an Arduino as ISP programmer. Also get a USB-UART cable/adapter ('FTDI cable') so you can upload your sketches the regular way. The schematics of the official Nano are published by Arduino and you can use that as inspiration for your own circuit.
Of course, adding a ready-to-use Nano to your project is fine, too. Maybe a Pro-Micro would be even more sensible.
Frankly, if I were to do this, I'd throw in a microcontroller that runs on 3.3V so everything is at that level. No need for any conversion. Simple.
You can run the ATMega328P or PB on 3.3V as long as you don't go above 12MHz.
Please share a link for this board.
I have 3 nano can i use it efficiently using some logic level shifters.
Suggest some logic level shifters too along with the development board.
Yes. Or any other kind that has 6 ports. Or 6 small signal MOSFETs and 12 resistors. There are several ways to solve this; pick whatever you feel the most comfortable with.
You solved one of the problem.
Could you tell me why does display struggle to work with nano along with central alarm system. Is it due to the code or there is something related to power supply.
#include <SPI.h>
#include <Wire.h>
#include <LoRa.h>
#include <U8g2lib.h>
#define SS 10
#define RST 9
#define DIO0 2
#define BUZZER_PIN 7
#define OLED_I2C_ADDR 0x3C
#define LORA_FREQ 915E6
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
void setup() {
pinMode(BUZZER_PIN, OUTPUT);
Serial.begin(9600);
LoRa.setPins(SS, RST, DIO0);
if (!LoRa.begin(LORA_FREQ)) {
Serial.println(F("LoRa init failed"));
while (1);
}
LoRa.setTxPower(10); // Lower transmission power
u8g2.begin();
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB08_tr);
u8g2.setCursor(0, 10);
u8g2.print(F("Waiting for messages..."));
u8g2.sendBuffer();
}
void loop() {
int packetSize = LoRa.parsePacket();
if (packetSize) {
String message = "";
while (LoRa.available()) {
message += (char)LoRa.read();
}
Serial.print(F("Received: "));
Serial.println(message);
// Display message on OLED
u8g2.clearBuffer();
u8g2.setCursor(0, 10);
u8g2.print(F("Received Message:"));
u8g2.setCursor(0, 30);
u8g2.print(message);
u8g2.sendBuffer();
// Check if the message is a "panic" message
if (message.equalsIgnoreCase("panic")) {
Serial.println(F("Panic message received! Sending ACK..."));
// Send back ACK
LoRa.beginPacket();
LoRa.print(F("ACK: Panic received"));
LoRa.endPacket();
// Activate buzzer (optional)
digitalWrite(BUZZER_PIN, HIGH);
delay(500); // Buzzer on for 500 ms
digitalWrite(BUZZER_PIN, LOW);
}
}
}
When i run rfm95 or the display seperately using the code, it works. But issue arises when i try to combine the code. Even serial monitor doesn't initialize.
There are codes which runs perfectly if iupload from a particular laptop but it doesn't work when uploading with a phone or my another laptop.
The same damn code shows this differen behaviour.
Ok, that's a bit of a hint at least. You're not exceeding the memory limitations of your Arduino?
I'd start by removing (commenting) all code in the loop() of your sketch and instead insert a routine that just prints something to the Serial console every second or so. See if that works. If so, you know the problem is somehow caused by whatever happens in loop(). If not, things break down earlier. Comment out the u8g2 code and see how that goes. So basically eliminate parts of the code one by one until you've got something that works. Then enable lines one by one until it breaks. At some point you know exactly where it goes wrong and you can focus on trying to solve that.