Author Topic: Need help with a schematic  (Read 3483 times)

0 Members and 1 Guest are viewing this topic.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Need help with a schematic
« on: April 16, 2025, 05:45:01 pm »
Hello All  :)

This is my first post so please be gentle.  For about a year I have been working on a garage door opener that works via bluetooth.  It actually works well but I found that it gets pretty toasty inside the box, so I added a small fan.  7 volts seems to run it well. However, when I integrated it into my design, it didn't turn on at all.  I checked the fan by applying 7 volts to it and it works fine.  There's the overview.

Now a little bit more in depth.  This garage door opener (GDO) has a MASTER unit, as well as a SLAVE unit.  Both are controlled by separate Arduino Uno's.  Here's my code;

Code: [Select]
#include <TimerOne.h>
#include <SoftwareSerial.h>

#define pirPin 3
#define redLed 6
#define greenLed 9
#define blueLed 10
#define GarSwitch 4
#define GarRelay1 5
#define GarRelay2 11
#define Fan 12
#define ldrPin A0
#define tempPin A1

int garageState = 0;
int lastGarageState = 0;
int pirVal;
int LDRValue = 0;

char ch;
String HC05_Awake = "ON";

SoftwareSerial mySerial(7, 8);  // Rx | Tx

void setup() {

  Timer1.initialize(40000000);
  Timer1.attachInterrupt(KeepAlive);
  Serial.begin(115200);
  mySerial.begin(38400);
  mySerial.print('a');

  pinMode(GarSwitch, INPUT_PULLUP);
  lastGarageState = digitalRead(GarSwitch);

  pinMode(GarRelay1, OUTPUT);
  pinMode(GarRelay2, OUTPUT);
  pinMode(redLed, OUTPUT);
  pinMode(greenLed, OUTPUT);
  pinMode(blueLed, OUTPUT);
  pinMode(Fan, OUTPUT);
  pinMode(ldrPin, INPUT);
  pinMode(pirPin, INPUT);
  pinMode(tempPin, INPUT);
  digitalWrite(redLed, LOW);
  digitalWrite(greenLed, LOW);
  digitalWrite(blueLed, LOW);
  digitalWrite(GarRelay1, HIGH);
  digitalWrite(GarRelay2, HIGH);
  digitalWrite(greenLed, HIGH);
  digitalWrite(Fan, HIGH);
}

int counter;

void loop() {

  // Sending
  // read input once
 
  garageState = digitalRead(GarSwitch);  // LOW = pressed
  if (garageState != lastGarageState) {
    mySerial.print('a');
    if (garageState == LOW) {  // switch got pressed

      Serial.print(counter);
      counter++;
      Serial.println(" Print an 'a'");

      mySerial.print('a');

      digitalWrite(blueLed, LOW);
      digitalWrite(redLed, LOW);
      digitalWrite(greenLed, HIGH);
     } else {  // switch got released

      Serial.print(counter);
      counter++;
      Serial.println(" Print a 'c'");

      mySerial.print('c');

      digitalWrite(blueLed, LOW);
      digitalWrite(greenLed, LOW);
      digitalWrite(redLed, HIGH);
    }
  }
MotionDetection();
// LDR();

// Receiving
  if (mySerial.available()) {
    char ch = mySerial.read();
    Serial.write(ch);

    if (ch == 'b') {
      Serial.print(counter);
      counter++;
      Serial.println(" Print a 'b'");
      mySerial.print('b');
      digitalWrite(GarRelay1, LOW);
      digitalWrite(blueLed, HIGH);
      digitalWrite(redLed, LOW);
      digitalWrite(greenLed, LOW);
      delay(1000);
      } else if (ch == 'd') {
        Serial.print(counter);
        counter++;
        Serial.println(" Print a 'd'");
        mySerial.print('d');
        digitalWrite(blueLed, LOW);
        digitalWrite(redLed, HIGH);
        digitalWrite(greenLed, LOW);
        digitalWrite(GarRelay1, HIGH);
      }
    }
    lastGarageState = garageState;
    delay(20);  // poor man's debouncing
  }


void KeepAlive() {
  if (HC05_Awake = "ON") {
    mySerial.print('m');
    Serial.print('m');
  }
}

// void LDR() {
// LDRValue = analogRead(ldrPin);
// Serial.print("Light Value - ");
// Serial.println(LDRValue);
// // delay(1000;) 
// }

void MotionDetection() {
  pirVal = digitalRead(pirPin);
  if (pirVal == LOW) {
    //Serial.println("No Motion");
    digitalWrite(GarRelay1, LOW);
    digitalWrite(GarRelay2, LOW);
 } else {
    digitalWrite(GarRelay1, HIGH);
    digitalWrite(GarRelay2, HIGH);
    //Serial.println("MOTION!!");
 
 }
    //delay(1000);   
}

So as you can see, the fan will go HIGH upon start up, which I plan to change once I get this issue resolved.  Also, I've attached a screenshot of my schematic (please don't beat me up too much as I have ZERO experience in this realm - but I am learning.).  I circled the area in question.  Another thing that happened is the other relays stopped working as well.  Please fire away with questions, as I'm sure I didn't cover everything that I'm supposed to.  Thanks in advance for your help.

 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #1 on: April 16, 2025, 06:26:55 pm »
You need a resistor in the base line of the transistor. You will probably blow up Q4 as soon as you set the output D12 of the Arduino nano high.

Since it is a BJT and not a FET, you need to limit the current flowing through the base of the transistor. It depends on the current the relay needs to turn on, how large the resistor has to be.  The gain depends on the collector emitter voltage and current, but using a value of 40 will probably be ok. So if the relay needs 50mA the base emitter current needs to be 1.25mA. The resistor then needs to be (5V - 0.7V) / 0.00125A = 3440 ohm. This is not a common value so 3300 ohm is the nearest one to choose.

About your schematic, at least you used wires, but there is a lot of room for improvement. Make sure that texts are not on top of parts or power supply symbols. For instance the 5V supply symbol near the relay is very hard to see that it is 5V. Also try to work from left to right regarding to signal flow. So move your 5V power jack to the top left side of the schematic and work form there with the outputs of the system on the right side of the schematic.

The other transistors in your schematic have the same issue.

Another issue might be that the MT3608 step up module is not capable of supporting the extra load of the fan.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #2 on: April 16, 2025, 06:39:37 pm »
Thanks very much for your help.  So it looks like I have some work to do.  Is there anything you would recommend instead of the MT3608?  I mean it's a really small fan.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #3 on: April 16, 2025, 06:51:17 pm »
If you have a DMM you can check if the voltage remains on a stable 7 volt with the system running and the fan directly connected to the output of the MT3608 module. If not, you need something beefier, like this one https://www.aliexpress.com/item/1005007894995437.html for instance. It can deliver twice the current of the MT3608.

7 volt is the lower limit for the Arduino nano by the way, and if it drops due to load it might cause a reset on the Arduino nano.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #4 on: April 16, 2025, 07:40:04 pm »
Perfect.  I just bought 10 of them off Amazon, thank you so much.  I use a company called JLCPCB where I order my PCB's from.  The part is cheap enough but shipping is $40 bucks or so.  Would you have any other places you use that might be cheaper?
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #5 on: April 17, 2025, 05:43:50 am »
I use JLCPCB too. For me the shipping is way less, when I choose a week or two wait for the delivery.

I have been thinking about your setup, and with the transistors connected this way, the MCU on the Arduino nano has to deliver to much current and will heat up due to this. With the resistors in the base connection this current will drop drastically and things may not heat up as much any more and the fan won't be needed then.

Since you are using al sorts of modules, I wonder why you not chose relay modules like these: https://www.aliexpress.com/item/1005007003070916.html They can be controlled with the Arduino nano directly without the need for additional components.

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1146
  • Country: us
Re: Need help with a schematic
« Reply #6 on: April 17, 2025, 05:58:21 am »
Along with the transistor issue, the relays appear to be a problem.  Using the LCSC number from your schematic, it appears that it is a 3V relay.  The datasheet doesn't have 3V relays but the 5V relay pulls 72 mA, presuming that the 3V coil uses the same amount of power, that puts the 3V coil current at around 120 mA.  But, you are running them at 5V which will pull 1.67X current, around 200 mA. That's going yank the 5V power rail pretty hard. Could be resetting your Nano.

Also, I don't understand your power set up.  You have 5V DC input into a Boost module into a Buck module. You should be able to power the TP4056 directly from the 5V input. Seems like that could be cleaned up a bit. I think you could probably get rid of the buck and boost modules.  That may be a big source of your heat, BTW.

Finally, it would probably help you a lot if you learned how to use labels for wires rather than running them all over the place.  Spaghetti is hard to follow.  Also, when you do use wires, try to keep them short.  For example, the flyback diode D6 should just be a simple connection between pins 1 and 4 on the relay. See how much easier to follow my schematic is. By using a label, I don't have to draw a long wire back to the microcontroller and the flyback diode is right where it needs to be.
« Last Edit: April 17, 2025, 06:05:13 am by phil from seattle »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #7 on: April 17, 2025, 06:47:42 am »
Along with the transistor issue, the relays appear to be a problem.  Using the LCSC number from your schematic, it appears that it is a 3V relay.  The datasheet doesn't have 3V relays but the 5V relay pulls 72 mA, presuming that the 3V coil uses the same amount of power, that puts the 3V coil current at around 120 mA.  But, you are running them at 5V which will pull 1.67X current, around 200 mA. That's going yank the 5V power rail pretty hard. Could be resetting your Nano.

I did not check the datasheet of the relay, but indeed a good catch. The 5V output of the Arduino nano should not be used for powering the relays. It would be better to use a separate voltage regulator for them.

Also, I don't understand your power set up.  You have 5V DC input into a Boost module into a Buck module. You should be able to power the TP4056 directly from the 5V input. Seems like that could be cleaned up a bit. I think you could probably get rid of the buck and boost modules.  That may be a big source of your heat, BTW.

I have been wondering about that too. Only when the input voltage on the barrel jack can be higher than 5.2V, there would be a need for a buck converter on the input of the TP4056. The boost module is needed to power the Arduino nano from the battery. Instead of using it to boost to 7 volt it could be set to 5 volt and bypass the voltage regulator on the Arduino nano.

Finally, it would probably help you a lot if you learned how to use labels for wires rather than running them all over the place.  Spaghetti is hard to follow.  Also, when you do use wires, try to keep them short.  For example, the flyback diode D6 should just be a simple connection between pins 1 and 4 on the relay. See how much easier to follow my schematic is. By using a label, I don't have to draw a long wire back to the microcontroller and the flyback diode is right where it needs to be.

In this case the spaghetti is indeed hard to follow, but still preferable over labels. So I don't agree with that learning about how to use labels brings an improvement over wires. There are lots of debates about this here on the forum on to what is good practice in making schematics. Not using labels is being advised.

The placing of the components in relation to others to reduce the length of wires is certainly a good point. Like I wrote in my first post here, there is lots of room for improvement in the schematic.

Online xvr

  • Frequent Contributor
  • **
  • Posts: 652
  • Country: ie
    • LinkedIn
Re: Need help with a schematic
« Reply #8 on: April 17, 2025, 02:06:24 pm »
Quote
The part is cheap enough but shipping is $40 bucks or so.
Try to select different shipping method. By default they offer most reliable, but quite extensive one.
 

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1146
  • Country: us
Re: Need help with a schematic
« Reply #9 on: April 17, 2025, 11:21:57 pm »

Finally, it would probably help you a lot if you learned how to use labels for wires rather than running them all over the place.  Spaghetti is hard to follow.  Also, when you do use wires, try to keep them short.  For example, the flyback diode D6 should just be a simple connection between pins 1 and 4 on the relay. See how much easier to follow my schematic is. By using a label, I don't have to draw a long wire back to the microcontroller and the flyback diode is right where it needs to be.

In this case the spaghetti is indeed hard to follow, but still preferable over labels. So I don't agree with that learning about how to use labels brings an improvement over wires. There are lots of debates about this here on the forum on to what is good practice in making schematics. Not using labels is being advised.

The placing of the components in relation to others to reduce the length of wires is certainly a good point. Like I wrote in my first post here, there is lots of room for improvement in the schematic.

I find labels much easier to follow.  For very simple schematics like the OPs, it is possible to make a somewhat clear drawing.  But when you get to 50 components or more, the mess becomes counterproductive.  I particularly like a subsystem approach where each subsystem can exist on a separate page with a relatively small number of labels for connections between subsystems. Look at most schematics for real products and labels get used a lot. This would be a nightmare without labels.


And, labels and wires are not mutually exclusive.  In fact, spaghetti can be greatly improved by placing labels on both ends of a long run.
« Last Edit: April 17, 2025, 11:25:02 pm by phil from seattle »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #10 on: April 18, 2025, 06:22:21 am »
There are several threads on this forum about this:

https://www.eevblog.com/forum/projects/schematic-drafting-standards/
https://www.eevblog.com/forum/projects/schematic-drawing-best-practice/
https://www.eevblog.com/forum/projects/the-best-schematic-layout-standards/
https://www.eevblog.com/forum/chat/please-rate-my-designschematic-ltrantgt/

The last one provided is especially about labels versus wires.

My opinion on it is to find a balance between the two. Your example is not convincing that it is the better practice. Looking for the matching labels is a drag. Sure on the computer one can use a find tool, but on paper it is easy to miss a label when there are multiple inputs connected to a single output.

This is of topic though, so lets leave it at this.

@gkraniske, to control your fan, if it is still needed after making the improvements to reduce currents, you can simply use a N-channel MOSFET like a 2N7000 or an IRFZ44N depending on the current needs. See https://www.electronics-tutorials.ws/transistor/tran_7.html for more information on this.

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1146
  • Country: us
Re: Need help with a schematic
« Reply #11 on: April 18, 2025, 07:17:33 am »
There are several threads on this forum about this:

https://www.eevblog.com/forum/projects/schematic-drafting-standards/
https://www.eevblog.com/forum/projects/schematic-drawing-best-practice/
https://www.eevblog.com/forum/projects/the-best-schematic-layout-standards/
https://www.eevblog.com/forum/chat/please-rate-my-designschematic-ltrantgt/

The last one provided is especially about labels versus wires.

My opinion on it is to find a balance between the two. Your example is not convincing that it is the better practice. Looking for the matching labels is a drag. Sure on the computer one can use a find tool, but on paper it is easy to miss a label when there are multiple inputs connected to a single output.

This is of topic though, so lets leave it at this.

@gkraniske, to control your fan, if it is still needed after making the improvements to reduce currents, you can simply use a N-channel MOSFET like a 2N7000 or an IRFZ44N depending on the current needs. See https://www.electronics-tutorials.ws/transistor/tran_7.html for more information on this.

I would never do a paper schematic anymore. You are right about balance, though.
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #12 on: April 18, 2025, 06:26:28 pm »
Wow this is a lot to digest.  Like I said, I have no education in electronics, other than what I've learned on youtube and by asking questions.  But thanks to everyone who responded, this gives me some direction on how to make my project better.  Yes, my next question was going to be about power.  I'm powering the unit with a 12v wall wart.  Mainly because it's what I have available, and I thought I might need extra voltage.  I'm also adding super bright LED garage lights that will be wired into the mains power.  The relay is simply going to trip for a predetermined time frame when my wife pulld into the garage, hence the motion sensor.  Would be nice to eliminate the converters so I'll have to study that a bit.  Once it's all said and done, I'm going to 3D print a custom box to put everything in.  If no one minds, I will probably pop back in here from time to time to ask more questions.  I'm not really sure I can salvage the project the way it is, so I may just have to start from scratch, using the methods described here.  I'm going to refer to the posts on this thread to get started.  Thanks again for everyone's help and Happy Easter!

One more thing, do I need to add a resistor to all of the base legs on each transistor?
« Last Edit: April 18, 2025, 06:29:32 pm by gkraniske »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #13 on: April 18, 2025, 07:48:24 pm »
Sure no problem in asking questions. That is what the forum is there for.

Having a 12V supply changes things. For the charging of the battery, so the supply into the TP4056, has to be at max 5.2V. Using a buck converter is a good way to reduce the 12V without wasting to much energy.

That said, the question is what you are using the battery for. Based on it being a garage door opener, it would only be beneficial to have the battery, if the garage door also has a battery backup to open or close it while the main power is out.

A better option might be to go for 3 li-ion (18650 cells) in series and that way raise the battery voltage to 12.6V max. With a proper BMS you can skip the input buck converter and directly supply the output voltage of your wall wart to the BMS.  (For instance something like  this one https://nl.aliexpress.com/item/1005007010318534.html) From the battery you go to two buck converters. Set one to 7.5V and connect it to the Arduino Nano, and set the other to 5V to power the relays. I'm not sure if this BMS provides the needed constant current / constant voltage charging li-ion needs, so if you go for this option best to do a bit more research.

Another thing that might be interesting for you is that there are also solid state modules, that don't have mechanical relays and contacts that wear out. Something like these: https://www.aliexpress.com/item/1005002992698463.html They work from 100 - 240V.

About the transistor and the base resistor. Yes all your bipolar junction transistors need a base resistor to limit the current through the base emitter junction. The base emitter junction acts like a diode and has a more or less fixed voltage drop across it. Depends on the type of transistor, but for silicon it is ~0.7V. When you connect an output of a microcontroller (The ATmega328 on your Arduino Nano) to the base of such a transistor without a resistor, the current will only be limited by the output impedance, which might be very low. This current can kill both the output pin and the transistor over time. It probably is also the reason things get hot.

This site: https://www.tutorialspoint.com/basic_electronics/basic_electronics_transistors.htm gives an insight in the working of a transistor if you are interested.

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1146
  • Country: us
Re: Need help with a schematic
« Reply #14 on: April 18, 2025, 09:34:14 pm »
We'll try to be gentle.  Sometimes some of us aren't though. I find a thick skin helps when learning from a group of experts.

The input on your schematic said 5V so I naturally assumed... This does make an important point about getting the information on your schematic to reflect reality.  I noticed you have a CR2032 connected to the charger - pretty sure that is also wrong.

I would switch to 12V relays then. Power them from the input. They draw a lot less current.  Using a buck converter (or a linear regulator) to get to 5V for the battery charger and power the Nano would be simple.  Having 7 V overhead on the buck will make the rail disruption from the relays a non-issue.  It might be possible to run the Nano at the lipo voltage by the way. I agree with pcprogrammer questioning about needing the battery since you will be plugged all the time.
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #15 on: April 18, 2025, 09:44:12 pm »
Where I live (out in the country) I lose power frequently during storms.  The battery is exactly for that - a back up until the generator kicks on.  I'm going to be away from the computer for a bit but when I return I plan to get to work.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #16 on: April 19, 2025, 05:56:58 am »
The input on your schematic said 5V so I naturally assumed... This does make an important point about getting the information on your schematic to reflect reality.  I noticed you have a CR2032 connected to the charger - pretty sure that is also wrong.

I missed the CR2032 type on the battery.  :palm:

There are rechargeable CR2032 batteries, but you are right that the TP4056 is not the right charge controller for that. Also such small batteries won't be able to keep the system up and running for the time it takes the generator to start up. With a simple system like this it is also probably not needed at all. The Arduino Nano will just cycle through a reset phase and be up and running within a second.

I would switch to 12V relays then. Power them from the input. They draw a lot less current.  Using a buck converter (or a linear regulator) to get to 5V for the battery charger and power the Nano would be simple.  Having 7 V overhead on the buck will make the rail disruption from the relays a non-issue.  It might be possible to run the Nano at the lipo voltage by the way. I agree with pcprogrammer questioning about needing the battery since you will be plugged all the time.

I was thinking more on reusing parts of the existing system, but here you are also right. The less supply voltage conversions, the less energy is wasted. A 12V relay will also work on a slightly depleted 3 cell 18650 battery pack.

The max input voltage for the Arduino Nano is 6-20V according to some sources. Others state 7-12V. It depends on the regulator used on the board. With the cheap clones it can vary. A voltage drop of 7.6V on the regulator will lead to approximate 0.17W dissipation. The Nano specs state a power consumption of 19mA, but I used 23mA to account for some extra draw on the pins.

To play it on safe I would still use a buck converter to drop the 12V to 7V though. Will reduce the waste of power.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #17 on: April 23, 2025, 03:57:59 pm »
Hello all,

I'm back at it again lol.  Hope everyone had a great Easter!  So I don't know if this helps you (help me lol) or not, but I made several changes to my schematic that were recommended, and saved the w2hole project to a zip file.  I downloaded it from EasyEDA.  Several mentioned my spaghetti so I don't know if this will help.  I want to order the PCB again, but shipping is sooo expensive, I'm trying to get it right.  Thanks again for everyone's help.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3499
  • Country: us
Re: Need help with a schematic
« Reply #18 on: April 23, 2025, 04:10:51 pm »
Have you considered first building your circuit on a protoboard?

Here is an example of including modules with discrete components:

https://www.dropcontroller.com/dropcontroller-diy-protoboard/
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #19 on: April 23, 2025, 04:58:25 pm »
Yeah I did that once, it was a disaster.  I can solder small components with the best, but that kind of soldering I'm not good at lol.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #20 on: April 23, 2025, 05:07:10 pm »
I looked at your new schematic, and it did not improve at all. Just moving the input power connector to the top left did not make it more readable, and was only just part of the advise given on how to improve the schematic.

You did not change the battery backup setup, even though you were told that the CR2032 batteries are not suited for your setup.

So read the thread again and try to incorporate the advise given or ask more questions on what you don't grasp from the advise given.

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5190
  • Country: ro
  • .
Re: Need help with a schematic
« Reply #21 on: April 23, 2025, 05:12:31 pm »
If you want to stick with relays, you could use dual coil latching relays, they're a bit more expensive but once you set them, they remain set without consuming power.

An example :  https://www.lcsc.com/product-detail/Magnetic-Latching-Relays_HF-Xiamen-Hongfa-Electroacoustic-HF115F-LS-12-HSL2F_C190453.html

You have 3 input pins  1 ---- 2 ---- 3   ... you put your voltage (12v for this relay) on pin 2,  and if you want to turn on the relay you connect 3 to ground for at least 30 ms , and if you want to reset it you disconnect 3 and connect 1 to ground at least 30 ms.

So you could have a small step-up converter boost your battery voltage to 12v and supply just enough current to power each relay for let's say 50-100ms at a time ... the datasheet for the above says 0.6w power consumption, so you'd need a minimum of 0.6w / 12v = 0.05A (50mA)

if you want you could store the state of each relay in a fram memory chip or maybe an eeprom (but an eeprom has fewer write cycles) in order to remember how the relays are configured if there's a power loss (battery too low for example) but I think it would be too much of a bother. You could just  periodically check the battery voltage and when it goes below 3.5v you could just reset the relays one at a time and stop working until the battery is charged again.  Also, at each startup, you can reset each relay one at a time to make sure each relay is in a known state.


Because the coil current is lower than 100mA, you could use a mosfet array like let's say ULN2003V12 (just like ULN2003A but without the big 1v drop on each channel) which contains 7 mosfets and all the resistors and ESD protections and even the diodes you'd normally use on each relay coil (1n4007 in your schematic). I would still have those 1n4007 diodes external though, they're cheap.

ULN2003V12 : https://www.lcsc.com/product-detail/Darlington-Transistor-Arrays_Diodes-Incorporated-ULN2003V12S16-13_C148113.html?s_z=n_uln2003v12

It says darlington array, but it's really mosfet array with 7 channels. You could use only 6, to control 3 relays  (2 channels per relay, one to turn on , one to turn off)

So with these changes you'll only need to have a step-down regulator to reduce the voltage from one battery (for example a 18650 lithium cell) to 3.3v you need for your arduino, and the step-up regulator will just idle until it needs to power a relay coil for 30+ ms at a time.

use something better than lm2596 for step-down regulators .... see for example AP61100, very simple to use (though it's a bit small) : https://www.lcsc.com/product-detail/DC-DC-Converters_Diodes-Incorporated-AP61100Z6-7_C1858397.html?s_z=n_ap61100

But it's almost not worth it, considering your arduino is gonna consume only a few mA... so you could use a cheap LDO like for example XC6206-33 (fixed 3.3v version) : https://www.lcsc.com/product-detail/Voltage-Regulators-Linear-Low-Drop-Out-LDO-Regulators_MSKSEMI-XC6206P332MR-MS_C5252899.html or  HT7533: https://www.lcsc.com/search?q=ht7533

These regulators have a dropout voltage of around 0.2v at 100mA, so will work pretty much down to less than 3.3v input (your arduino will function with less than 3.3v)


« Last Edit: April 23, 2025, 05:15:55 pm by mariush »
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #22 on: April 25, 2025, 02:51:58 pm »
Yes, sorry I didn't see this post.  I moved the power units to the left of the schematic, but when I started moving other objects, connections were made and broken, rendering the unit useless.  So it's not that I'm not going to follow your directions, I actually am, but apparently it's going to take a bit more work to move it around the way it should be.

As far as the battery is concerned, I'm trying to figure out a way to put 4 AA sized batteries in the box that I'm working with.  The 3D printed box is just large enough to hold the components I need.  By adding batteries, that means the box has to be printed deeper than the one I have now, which eliminates the place where I was going to mount it to keep it out of the way.  If you can point me to a battery about the size of a CR2032?  I would gladly make the change.

Like I said in my original post, I'm extremely brand new to electronics so my education is limited.  But I've already learned a lot just from this post, so thank you very much.
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #23 on: April 25, 2025, 03:21:04 pm »
I'm looking into the three li-ion rechargeable batteries.  From the way you're describing it, I should eliminate the TP4056 module, and replace it with the 3S BMS 18650 Lithium Battery Protection Board?  Seems easy enough.  So by the batteries, and the 12v wall wart input being added to the schematic, does that mean I'm eliminating the step-up converters?
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #24 on: April 25, 2025, 05:57:50 pm »
I'm looking into the three li-ion rechargeable batteries.  From the way you're describing it, I should eliminate the TP4056 module, and replace it with the 3S BMS 18650 Lithium Battery Protection Board?  Seems easy enough.  So by the batteries, and the 12v wall wart input being added to the schematic, does that mean I'm eliminating the step-up converters?

Yes with 3 18650 Batteries in series you get a maximum of 12.6V and a nominal voltage of 11.4V to work with. This does mean that the step up converters are no longer needed.

But let me check if the BMS I referred to is actually suitable for the job in question.

Depending on how much current the relays are going to take the 5V could be derived from the Arduino Nano, or you can also change the relays to 12V versions so that they can be powered directly from the battery.

Edit: I'm a bit out of my depth here. The BMS I referred to is good for protecting the cells against over charging and over draining when the load and charge voltage is connected to the + and - terminals. But I believe there is still the need for a proper charge circuit to provide the cc/cv charging a lithium ion battery needs. If this is then also capable of supplying the Arduino Nano and the relays, I'm not sure of.

Hopefully someone with more knowledge of battery circuits will chime in.
« Last Edit: April 25, 2025, 06:50:48 pm by pcprogrammer »
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #26 on: April 25, 2025, 07:11:49 pm »
The BMS is correct for the protection of the batteries, but I fear that the batteries are a bit of a scam. 18650 Lithium Ion batteries are at best something like 4000mAh. So if you can still cancel that one, I would. Look for cheaper ones that are 2400mAh or 3200mAh.

Even if your setup draws 0.5A it stays on for >4 hours without a power supply on the 2400mAh batteries.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #27 on: April 26, 2025, 10:20:00 pm »
These say 9900mAh right on the battery.  It's okay anyway, I just checked them right out of the box, the voltage reads 4.0, 4.1, and 4.9.  I suppose this is to be expected until I can charge them.  They won't be pulling that much current anyway, just until the generator kicks on.  The only reason I need them is because I'm not good enough with my code (Arduino) to get the slave device to check the master for the condition of the reed switch (Garage Door open or closed). If these end up being a problem I can return them.  By the way, do these get hot?  After all, the master unit is getting mounted in the garage.  I've attached the new schematic even though it's still a mess to read.  I think you can import it into EasyEDA just to make life easier.  Sorry so messy.
« Last Edit: April 26, 2025, 10:23:29 pm by gkraniske »
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #28 on: April 26, 2025, 10:24:51 pm »
I suppose it would help if I actually attached the schematic lol.  :-DD
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #29 on: April 27, 2025, 05:24:54 am »
These say 9900mAh right on the battery.  It's okay anyway, I just checked them right out of the box, the voltage reads 4.0, 4.1, and 4.9.  I suppose this is to be expected until I can charge them.  They won't be pulling that much current anyway, just until the generator kicks on.  The only reason I need them is because I'm not good enough with my code (Arduino) to get the slave device to check the master for the condition of the reed switch (Garage Door open or closed). If these end up being a problem I can return them.  By the way, do these get hot?  After all, the master unit is getting mounted in the garage.  I've attached the new schematic even though it's still a mess to read.  I think you can import it into EasyEDA just to make life easier.  Sorry so messy.

A lithium ion battery should not have a higher reading than 4.2V. The nominal voltage is 3.7V. See the attached datasheet for more information on this.

Lithium ion batteries can get hot when misused. To protect them a BMS comes into play. It will monitor separate cells and make sure they don't go above 4.2V or below ~2.7V. More advanced BMS can also monitor the temperature of the cells and cut the load when needed.

You still need a dedicated charger for the batteries, because the BMS does not regulate this part of the process.

Tomorrow, I will see if I have some time to look at your schematic.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #30 on: April 28, 2025, 03:48:25 am »
Thanks!  :)
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #31 on: April 28, 2025, 12:13:10 pm »
Ok, I looked at your schematic and redrawn it. There are still some issues that need to be addressed though.

The relays you used in the schematic are listed as 3V instead of 5V, so if these need to be used a separate 3V supply needs to be created. 12V relays would be better though.

What is the voltage of the wall wart you are using. I know you wrote 12V, but it could be a non stabilized supply that has a higher output voltage when not loaded, or a switched power supply.

Then there is the issue of the power switch. What does it need to control? Just the Arduino Nano system, or also the charging of the battery?

I fixed your RGB led setup. The anode needs to be connected to a positive supply, and current limiting resistors need to be separate per LED due to different forward voltages. It might be needed to trim these resistors to get a uniform brightness of the LED's. To turn the LED's on the digital outputs on the Arduino have to be set low.

I changed the ground symbol to be the more common one used in electronics. The one with the multiple lines is more used in electrical installations.

Based on the input voltage it might be needed to reduce the input voltage to the Arduino Nano, so for that a buck converter can be used if needed.

For the battery backup you did not put in a charging option, and connecting the output of a buck converter directly to the 12V input is not good practice. Diodes will be needed there.

I did not directly found a module for charging as series string of three lithium ion batteries, but it is needed depending on some conditions. If the input voltage is 12V a current limiting resistor could be sufficient, as long as the current into the battery does not exceed the allowed charge current. Once the voltage of the battery matches the input voltage the charging will stop.

But I'm no expert on lithium ion batteries and would like to hear from others if the above is true, or that it is better to look for a proper lithium ion charger board.

The PCB, I did not look into, as it has to be redrawn any way.

Online WattsThat

  • Frequent Contributor
  • **
  • Posts: 817
  • Country: us
Re: Need help with a schematic
« Reply #32 on: April 28, 2025, 12:51:08 pm »
Why have Q3 at all? You can effect a reset without external hardware by executing the instruction

  asm volatile ("  jmp 0");
 
The following users thanked this post: gkraniske

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #33 on: April 28, 2025, 12:54:44 pm »
Why have Q3 at all? You can effect a reset without external hardware by executing the instruction

  asm volatile ("  jmp 0");

True, but it was in the original schematic and I left it in without questioning.  :)

Noticed that I screwed up the component numbering of the transistors due to this one.  :palm:

Online WattsThat

  • Frequent Contributor
  • **
  • Posts: 817
  • Country: us
Re: Need help with a schematic
« Reply #34 on: April 28, 2025, 01:10:42 pm »
Sorry for any confusion, it was a question for the OP, not you, whom I thank profusely for taking the time to redraw the schematic. I couldn’t follow the original so I hadn’t bothered to comment.

One big issue I see are the relay drivers, no way a 2N2222 can drive ~120ma (assuming 3v relays) with less than 2 ma of base current as beta doesn’t matter when a transistor is saturated. A rule of thumb is use a gain of 10 if the datasheet doesn’t provide info for switching use. Haven’t considered the power dissipation which should be checked as I suspect it’s too high for a to-92 device.

IMO, forget the transistor, a proper logic level mosfet would do much better here.
 
The following users thanked this post: gkraniske

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #35 on: April 28, 2025, 02:41:49 pm »
Sorry for any confusion, it was a question for the OP, not you, whom I thank profusely for taking the time to redraw the schematic. I couldn’t follow the original so I hadn’t bothered to comment.

One big issue I see are the relay drivers, no way a 2N2222 can drive ~120ma (assuming 3v relays) with less than 2 ma of base current as beta doesn’t matter when a transistor is saturated. A rule of thumb is use a gain of 10 if the datasheet doesn’t provide info for switching use. Haven’t considered the power dissipation which should be checked as I suspect it’s too high for a to-92 device.

IMO, forget the transistor, a proper logic level mosfet would do much better here.

And that is what the result of a more proper schematic brings. Sound questions on it.

I have not looked at that bit either, and also doubt the use of those transistors. Seeing that everything else is done with modules, I would have done the same for the relays, as I wrote earlier.

The LED thing being the wrong way round was a thing I discovered when doing the redraw. Part numbering and naming were mixed up, so basically a bad attempt at creating a schematic. Hopefully the OP learns a lot from this exercise, for when he plans to continue playing with electronics.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #36 on: April 28, 2025, 10:40:26 pm »
Wow!  Sure looks cleaner that the original.  All of you ROCK!  8)  Thanks for taking the time to do that.  The relays are 5VDC, not 3 VDC as the schematic shows.  Sorry about that.  My wife is already aggravated with me for spending so much money on all my projects, so I have to work with the parts I have.  So I have some questions, if it's okay.  Hopefully they haven't already been answered and I'm just not understanding, but here goes.

1.  How is the battery circuit integrated?  I see that the output / input has the BAT symbol on it, but I'm not sure how that works.
2.  What size / type of mosfet, and do I need one for each relay (I assume I do)?
3.  My wall wart outputs 12.6 volts steadily when checked with a multimeter, so is it appropriate to go from the wall wart directly into the buck converter to level it out a bit more?
4.  I was under the impression that I could tie the output of the other buck converter in with the 12v input from the wall wart.  If not, what's the best way to accomplish this?

And to answer questions:

The relays you used in the schematic are listed as 3V instead of 5V, so if these need to be used a separate 3V supply needs to be created. 12V relays would be better though.
I have an abundance of 5VDC relays, so if at all possible, I'd like to stick with these.

What is the voltage of the wall wart you are using. I know you wrote 12V, but it could be a non stabilized supply that has a higher output voltage when not loaded, or a switched power supply.
Steady at 12.6v according to a multimeter

Then there is the issue of the power switch. What does it need to control? Just the Arduino Nano system, or also the charging of the battery?
The power switch should turn everything other than the charging system on or off.  If I plug the wall wart in, the batteries should charge.  I purchased two boards to accomplish this, wasn't sure which one to use so I got them both.
https://www.amazon.com/dp/B0C6DNMKS7?ref=ppx_yo2ov_dt_b_fed_asin_title
https://www.amazon.com/dp/B08M36F6XD?ref=ppx_yo2ov_dt_b_fed_asin_title

And the batteries I purchased are as follows.
https://www.amazon.com/dp/B0CLY68D5L?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1

For the battery backup you did not put in a charging option, and connecting the output of a buck converter directly to the 12V input is not good practice. Diodes will be needed there.
I thought the charging option would come from the 12v wall wart.  What type of diodes should I use for this, and how should I make the connections?  During storms my power almost always goes out.  I have a 13Kw generator that kicks on automatically but there is lag time from mains to generator.  A little background on why I made this unit.  My garage is detached from the house and sits to the south of the main entrance way, which means that if I want to know if the garage door is open, I have to step outside and look.  So I came up with a device that uses a reed switch to detect the door being open or closed.  If the LED is red, the door is open, if green then it's closed.  The problem is when the unit loses power, it switches to red even though the door may be closed.  I have no way of knowing unless I either look outside at the door, or press the open / close button to trigger a change in the code.  You all probably didn't really need to know all that, but I wanted to explain it so you understood what I was doing.  Again, I just want to thank you all from the bottom of my heart for helping me, and yes, I'm learning a lot by your questions and examples.  Enough to know that I completely botched the schematic.  :-DD
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #37 on: April 29, 2025, 06:29:56 am »
The cleaned up schematic is not yet finished, so the battery, the 12V input and the Vrelay for that matter, are not yet connected.

In a schematic one can use power supply symbols to connect the power. This is done with the T shaped symbol with a name above it. The name determines which net it is, and all the supply symbols with the same name are tied together.

For the mosfet it is needed to know the model and make of the used relays. There is the need to know the current that flows when the relay is activated.

The wall wart outputting a steady 12.6V is closer to the battery pack max voltage, but with a diode in series it will drop enough to not fully charge the batteries, which is better for them.

When there are multiple power sources you can't just connect them together without making sure it won't cause issues. In this case the highest voltage might win and start pushing current where it should not flow. Most buck converters don't like feedback through the output and can die due to this. So a diode in series mostly does the trick.

But in your case there is no need for the second buck converter. If I feel up to it later today, I will update the schematic to reflect the needed changes. As I have a wife too, and we have a new piece of land that needs to be worked on, I'm a bit occupied with that.

The boards you bought on Amazon are only for protecting the batteries, not for regulating the charge current/voltage. The 4S one is for a four in series battery pack and is not suited in this case. The 3S one is what you need.

For connecting the battery and the input supply to the buck converter the 1N4007 diodes are fine.

The issue with the door being open or closed depends a bit on where the reed switch is mounted if it can be used on power on to determine if the door is closed or not. Best position would be near the ground in such a way that when the door is closed the reed switch is activated.

Feedback of this information to the remote control might also be possible, but it depends on what you are using for the transmission. Probably best to address later.

Edit: I modified the schematic to show a possible supply setup. The charging of the batteries is not optimal, but I don't think it will be problematic. Worst case the batteries are drained to cutoff point of 2.7V per cell will lead to about 260mA through R4 and while charging the current will drop to zero when the batteries are charged to the same voltage as the supply. The BMS protects them from overcharging, but with a supply of 12.6V and the series diode this won't happen.

The Arduino Nano is supplied via two diodes making the voltage below 12V, which also should be fine. The buck converter is used to make the 5V for the relays. It could also be used for the other 5V in the circuit, but it depends on the current being drawn by the extra modules connected to this 5V from the Arduino Nano.

For the MOSFET's more input is needed to decide which ones could be used. So I left the transistors for now.
« Last Edit: April 29, 2025, 12:02:50 pm by pcprogrammer »
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #38 on: April 30, 2025, 12:16:33 am »
Hello again, and thanks so much for your help with my schematic.  Here are the relay's I'm using https://www.amazon.com/dp/B09J23B9WJ?ref_=ppx_hzsearch_conn_dt_b_fed_asin_title_2 I'm terribly sorry to take you away from your family.  I'll look at your design and most likely use it.  Again, thank you.  I'll let you know how it goes.  Until later, my friend.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #39 on: April 30, 2025, 05:56:07 am »
I'm terribly sorry to take you away from your family.

That is my own choice, so no worries.

The relays, according to the datasheet, have a nominal current of 71.4mA. The transistors can handle this and the 2k7 Ohm base resistor is fine for this. The only problem may be that the relay is getting a to low voltage due to Vce, but if it is higher than 0.3V you can lower the base resistor value to maybe 470 Ohm, but this increases the current drawn from the Arduino Nano.

Another option is to switch to the 2N7000, which is a n-channel mosfet. With these there is almost no current drawn from the Arduino Nano. The gate resistor can be lowered to 47 Ohm.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #40 on: April 30, 2025, 12:15:25 pm »
The only change I made was to add 7v to the top relay so the fan turns on when it's supposed to.  Otherwise there is no power source for it.  I also noticed that the NANO looks like the VIN pin is being supplied with 12v.  Is that correct?  I was just wondering if you meant to take the power from the input of the buck converter rather that the output. 
« Last Edit: April 30, 2025, 12:18:23 pm by gkraniske »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #41 on: April 30, 2025, 03:29:39 pm »
The Arduino Nano can be supplied on Vin up to 12V. With the two diodes in series and an input voltage of 12.6V the voltage on Vin of the Arduino should be ~11.4V.

I forgot about the 7V for the fan, but what is the fan actual working voltage of the fan. If this is 12V you can use the voltage present on the input of the buck converter that makes the 5V.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #42 on: April 30, 2025, 06:15:52 pm »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #43 on: April 30, 2025, 06:53:28 pm »
Then you best use the 5V output from the buck converter to run it.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #44 on: May 11, 2025, 08:18:52 pm »
Hello again,

I'm back lol.  So I ordered the new boards and they came in about a week ago.  I built one of them up and it seems to work great, except for one thing, it doesn't charge the batteries.  I used your schematic with no modifications so I was just wondering if you had any ideas on what it might be.  Thanks again.  :)
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #45 on: Yesterday at 06:31:07 am »
Did you measure the voltages. If the batteries are at the same level of the supply voltage they won't charge any higher, and that is a good thing.

Just for fun, show us some pictures of the finished board.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #46 on: Yesterday at 02:08:30 pm »
Sure thing!  I just kind of put everything into place for the pictures.  I have a few bugs to work out before I put it all together.  Once completed I'll be sure to post a video of it in action.  Yeah I'm charging it with 12.6 volts and it doesn't appear to be charging at all.  It went all the way down to 11 volts.  So I cut a small slice in the insulation and charged it straight from the wall wart, and that charged it all the way up.  By the way, on the PCB, the footprint for the 18650 3S BMS is wrong and I can't seem to locate the correct one on EasyEDA's list of parts.  Does anyone have any ideas on how to resolve this?  I soldered jumper wires to it as a temporary fix, but in the completed project this won't work.  Also, the HC05 bluetooth module is going to be relocated to the top of the board.  I accidentally designed it wrong which is why I had to put it on the bottom of the board.
« Last Edit: Yesterday at 02:16:54 pm by gkraniske »
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #47 on: Yesterday at 02:09:57 pm »
Here are some more photos
« Last Edit: Yesterday at 02:13:30 pm by gkraniske »
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #48 on: Yesterday at 02:10:56 pm »
And some more  :box:
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #49 on: Yesterday at 02:11:41 pm »
Almost to the last ones lol
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #50 on: Yesterday at 02:12:13 pm »
Last one
 

Online squadchannel

  • Frequent Contributor
  • **
  • Posts: 553
  • Country: jp
  • deepl translate user
Re: Need help with a schematic
« Reply #51 on: Yesterday at 02:28:43 pm »
9900mAh in 18650 is definitely scam. 3500mAh or so is the limit. :-DD
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #52 on: Yesterday at 03:49:14 pm »
Thanks for the photos.

But AI!!!!, another big no when using Lithium Ion batteries. Soldering wires to them directly. With this you risk overheating them. Would have been better to use a battery box like this: https://www.aliexpress.com/item/1005007051308086.html

As for circuit board design there are also things to be learned, like using thicker traces for power supply tracks and a ground plane. The latter not so important for this project though.

For the footprint of the BMS module, you can easily make that yourself in EasyEDA. From the file menu select new footprint, and draw it to measure with pads, outline and texts.

But for the rest it does look nice.

If you save the EasyEDA project and upload it, I will take a look at it to see why the battery is not charging.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #53 on: Yesterday at 04:15:23 pm »
Cool, I'm going to figure out how to do the footprint in EasyEDA, I had no idea you could do that.  As for the project, here it is.  I do appreciate your help.  Another user on here got me this far so I can't take credit for it's cleanliness lol.
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #54 on: Yesterday at 04:22:20 pm »
And I actually bought battery boxes, but in a youtube video I saw several people solder the wires directly to the terminals.  Buuuut I won't be doing that again, I didn't think of the damage factor.  I had to heat the soldering iron up to 600 degrees to make it stick.  Thanks for the info.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #55 on: Yesterday at 05:59:18 pm »
Cool, I'm going to figure out how to do the footprint in EasyEDA, I had no idea you could do that.  As for the project, here it is.  I do appreciate your help.  Another user on here got me this far so I can't take credit for it's cleanliness lol.

This looks like the wrong version. The schematic is not the one that I cleaned up for you, and the board does not resemble what is in your photos.  :palm:

And I actually bought battery boxes, but in a youtube video I saw several people solder the wires directly to the terminals.  Buuuut I won't be doing that again, I didn't think of the damage factor.  I had to heat the soldering iron up to 600 degrees to make it stick.  Thanks for the info.

That is the problem with the internet and youtube, there is so much crap on it and people take it on face value, risking al sorts of problems. So on the one side good that you came to the forum, but should do it more often.  :)

Edit: I noticed a small f***up of my own. The power connector for the wall wart needs pin 2 connected to ground. Maybe this is why you soldered it on the bottom?

So you see, don't trust what you get on the internet. Always check for yourself.  :-DD

« Last Edit: Yesterday at 06:04:06 pm by pcprogrammer »
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #56 on: Yesterday at 06:40:44 pm »
Sorry about that, I'm not sure how I ended up zipping up the wrong one.  Try this one lol.
 

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #57 on: Yesterday at 06:43:58 pm »
And yes, in the final schematic that I sent to China pin 2 and 3 are both connected to ground.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #58 on: Yesterday at 07:00:37 pm »
Sorry about that, I'm not sure how I ended up zipping up the wrong one.  Try this one lol.

That looks more like the one needed.  :-+

I can't see a reason why the batteries won't charge, so you need to do measurements to trace down the voltages. But the files you posted last still differ from the photos of the board. The big resistor in your photo is near the LDR, where in EasyEDA it is near the power input. I can't see in your photo where the other side of the resistor connects to. The trace is not on the back side of the PCB. So maybe that is the problem?

Another question is about the LED lights the relays control. What voltage and current are we talking about. You might not have the right clearances between traces for main voltages, nor wide enough tracks to support the current.

Offline gkraniskeTopic starter

  • Contributor
  • Posts: 28
  • Country: us
Re: Need help with a schematic
« Reply #59 on: Yesterday at 07:10:56 pm »
Yeah I made some minor changes to reduce the number of "vias" on the PCB.  The 2 watt 15K resistor is above the Nano in the pictures, but I moved it above the step down converter.  I probably should've documented that.  It's also possible that the batteries were damaged when I soldered the wires to the terminals.  Like I said I heated the iron up to 600 degrees to get everything hot enough for the wires to stick.  The garage LED's shouldn't matter because I'm using an external power source of 120VAC.  The hot leg from the LED's will go into the common pin on the relay, then I'm using NO to power the LED's up when the relay is triggered.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5107
  • Country: nl
Re: Need help with a schematic
« Reply #60 on: Today at 05:42:34 am »
Yeah I made some minor changes to reduce the number of "vias" on the PCB.  The 2 watt 15K resistor is above the Nano in the pictures, but I moved it above the step down converter.  I probably should've documented that.  It's also possible that the batteries were damaged when I soldered the wires to the terminals.  Like I said I heated the iron up to 600 degrees to get everything hot enough for the wires to stick.

Best to measure the voltages on the board. The 12V input, just after the diode before the 2W resistor, after the 2W resistor and the separate cells to see what they do.

The garage LED's shouldn't matter because I'm using an external power source of 120VAC.  The hot leg from the LED's will go into the common pin on the relay, then I'm using NO to power the LED's up when the relay is triggered.

And this is where you are wrong. The 120VAC is connected to the board via those green terminals and the current has to flow through the tiny traces on the board. Also creepage distance is important between the 120VAC traces and the low voltage DC traces, but also between two 120VAC traces it can cause problems.

I'm not behind my development computer at the moment, but looking at the photos of your PCB make me worry.

So again, what current will flow for these LED lights. Or state the wattage of them.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf