AREF Complications (Nano)

I am currently creating a greenhouse project utilizing solar charging to charge the on-board battery pack. My PCB incorporates a 5 V plane, and a GND plane. This 5 V plane comes from my buck converter (LMR51430) that powers the Arduino as well as several peripherals. A big issue I am having (and have now learned from for the future) is that this supply is not isolated, and my 5 V plane is very noisy. Inserting a capacitor anywhere on this plane to smoothen the signal actually changes the buck circuit since there is no isolation, therefore is not a viable solution. For specifics, there is a about a 1 V ripple at 5 V, averaging to about 5.5 V. I compared the AREF signal that is being used when connected to my computer, vs. only the battery pack, and it is evident that this AREF signal changes depending on the supply that is connected. Unfortunately, I did not know about this before hand.

From what I've tested, the AREF signal becomes isolated within the Arduino somewhere, which was discovered when I ran a capacitor across AREF and GND, I do end up smoothening the signal and not changing the switching frequency of the buck. This AREF however, ends up being about 4.5 V vs. the 5 V that is present while connected to a stable power supply (USB to computer).

A fix that I thought could work possibly is using a linear regulator, such as the L7805, run this straight to AREF (setting external AREF in code of course) and hopefully provide a constant 5 V reference emulating the stable supply that the USB provides. However, is there an easier software solution to this problem considering there is already a possible provided stable 4.5 V at the AREF. This is an issue as I am monitoring the voltages and currents and basing my MPPT algorithm for the solar charge controller. These measurements should be accurate, and vary wildly when connected only to the battery pack.

Any help would be greatly appreciated. I apologize in advance if I am not posting correctly as this is my first post.

That is a very serious problem, suggesting a major circuit design error, PCB error or component failure. For help, post a complete schematic diagram and the PCB design details.

Be sure to list all the peripherals, and details of the external circuitry such as power supplies and wiring.

2 Likes

As mentioned above the first step should be to fix the power supply.

If you are going to use an external reference something like a 4.096 volt LM4040 is much more accurate then a 7805 voltage regulator. Notice it is a power of 2 so the reading to voltage conversion is simple.

You didn't say which of the many boards with Arduino in the name you are using. If it is an UNO or similar there is an internal voltage reference in the 1 volt range that is stable but needs a one time calibration.

1 Like



For some reason, I am getting this weird bug in KiCad layout viewer where I cannot see the layout, however the 3D viewer shows everything there. I am using KiCad 9.0. I have printed a PDF version and it shows the layout fine I believe. Any tips on a further layout would be greatly appreciated as well. I definitely will be doing more in the future.

Yes unfortunately it is a major problem however I can no longer order a new PCB or change anything drastic. Worst case scenario I will demo my product with the computer connected to the board as it works perfectly this way. I know I have some mistakes with the board, however in terms of connections, everything is tested and works well. I'm pretty sure I have an extra fuse as well, however this could be fixed in a V2. 1 PCB was recommended therefore making this one a little more packed than I would've liked it to be. 10x10 cm at JLCPCB was very reasonably priced as well for a 4 layer board.

Let me know of any other clarifications you need. Thank you very much in advance! I truly appreciate the timely response and help.

That's good to know. I will look into this. I apologize, when I first posted it asked me which board I am using and I thought it would show up on my post by itself. I will add that to the post. I am using the Nano. 2 Nanos actually. 1 deals with charge control, the other deals with environment control. In a V2 I definitely would stick to 1 ucontroller, however this is how it ended up working out.

Applying 5V to Classic Nano Vin is a serious design error, especially with a servo also connected to 5V.

Apply clean, regulated 5V to the Nano 5V pin, or 7V minimum to Nano Vin, and a separately regulated, appropriate voltage to the servo.

3 Likes

No issues with adding extra capacitors between 5V and 0V, the buck circuit won't mind. Indeed ideally there should be 0u1 decoupling capacitors at the point the 5V connects to anything.

Based only on past experience with power supply faults if you brought this to me and told me it used to work OK but now had the symptoms you describe the first thing I'd do would be to check and possibly change C10. Are you sure C10 is rated for the switching frequency of U8?

The tracks around U8 are far too thin and too long, tracks carrying high current and / or high frequency should be short and thick. I would expect the datasheet to have a suggested layout, or at least guidelines for layout. Switching regulators are fussy about layout, unless you are an expert in designing them it's best to closely follow the manufacturer's guidelines.

Not the cause of your problem but the junction of R13 R14 is marked A2. A2 on the Nano is marked as not connected.

1 Like

That is good insight. I forgot to mention that the cap I am using for C10 is actually 47 uF as this is what I had on hand. I assumed that it would be alright. Do you believe that a 3 uF difference is enough to cause such high ripple at the output? The circuit that is being used is what was recommended on the data sheet other than C10 being slightly different.

While making the connections for U8 I definitely did not feel good about it. That is good to know about the data sheet layout tips. Thank you for this.

Oh I apologize, I mentioned it in a previous comment but I have 2 Arduinos. The R13/R14 in the power management portion Arduino is connected to A2. On my environment control Arduino, A2 is not connected, and that's the one I showed. I will update this image in my previous post.

Thank you very much for your response.

No, it doesn't matter. The exact value of the capacitor is unimportant, and bigger, up to a point, is better. I would expect it to work perfectly well with 500uF.

That I don't doubt, it's not the circuit I'm concerned about it's the way it's laid out on the PCB. The tracks are too long and too thin. I would expect there to be guidance about layout in the datasheet.

You could try soldering copper wires to the PCB to make the tracks thicker, by which I mean all the tracks going to and from L3, U8 and C10. Those are the critical ones. If doing so reduces the problem then you know you are in the right place.

I am not familiar with U8, switching regulators usually need an external diode, but I don't see one in your circuit, is it missing? Is it built into U8? Does U8 somehow work without a diode?

Edit,
I looked at the datasheet

No diode needed.

Page 23 has a suggested layout, it's very different to what you have done. I would expect this to be your problem.

1 Like

I see. I will add an extra capacitor across the one currently there. Ah I see the layout in the data sheet now. Thank you for directing me. Much different that what I did for sure. I have definitely learned from this.

A question I was wondering about is, should the power portion be isolated from the load somehow via some sort of buffer? How is this typically done? Not necessarily in reference to this application, but rather a general question.

I'm not clear what you are asking, but no, there's nothing you need to isolate. If you had a circuit with very delicate, low level analogue signals then you would have to take a great deal of care with layout and shielding, but that's no applicable here.

1 Like

Summary:

  • Redesign the PCB in line with the recommended layout in the datasheet
  • Add 0u1 decoupling capacitors at each point where something is fed by 5V
  • Feed the Nanos at their 5V pins

Share your revised design here before having it made.

3 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.