Nets to be Routed?

Yes, that is the easiest solution. You could unsolder the female headers from the Arduino and mount the Arduino on top of the board with male headers, but there is a risk of damaging the arduino as you unsolder the female headers so switching sides of the board and using the existing female headers is likely a better bet (it also makes replacing the Arduino should it ever fail easier.) That is also why I added the holes for the Arduino mounting holes to the pcb. Then you can screw the Arduino to the pcb (or to the case if you wanted to use @microMerlin 's shield suggestion if you can make holes in the case which match the Arduino mounting holes.)

To do this with the current layout, you need to move the sensor to the top of the board and jb3 to the bottom of the board. That way the arduino jb3 and the lcd display are on the bottom of the pcb ( which will be the top of the drawing above) and the sensor will be alone on the top of the pcb (which is the bottom of the picture.

It is an svg created with Inkscape since I’m used to manipulating svgs to make parts, it is my easiest method of making drawings as well.

Peter

Here is an updated version, Peter. With the sensor on top and the JP3 on bottom. Let me know your thoughts!

Yes, I rather not unsolder the female header on the Arduino. What screws do you suggest to use for the Arduino to the PCB?

SeniorDesignV13.fzz (41.6 KB)

Looks good, some cosmetic issues in schematic, but otherwise fine.

In pcb view I did File->Export->For Production->Extended Gerber

to generate the gerber files (which the board will be made from) then used the gerbv gerber viewer to display the drill.txt file (the image above) which shows where all the holes will be drilled. All the mounting holes (4 for the board, 3 for the Arduino and 2 for the sensor) appear so all should be well. Then I displayed the copper and silkscreen layers (2 of each top and bottom) to see the entire board

which also looks fine so you should be good to go. In schematic there are some cosmetic issues which wont’ affect functionality but look messy and are easy to fix (circled in red here)

The 5V wire shouldn’t go through the resistor (it makes the resistor value hard to read.) So click on the wire join on the left and pull it up to above the Vin wire like this:

Then pull the other end of the wire to the same level like this:

Then move down to SCL / SDA and JP3

In this case I clicked on the dot on the wire and dragged it to the position shown (so it will be on the wire from the sensor to the Arduino.) Then I double clicked on the dot on the wire down from the SDA pin (circled in red here):

That has the effect of straightening the wire like this:

Now repeat this for all the other lines that aren’t straight:

Now click on the labels on the resistor and the sensor and move them so the closer to their associated part like this:

and we are done.

edit:

The holes are sized for an M2 metric screw. You probably want to put fiber or plastic spacers on the screws to control the height of the Arduino off the board so as to not stress the Arduino when it is plugged in.

Peter

1 Like

Thank you for your help Peter!

  1. I know you mentioned changing the sensor to 5V pin (instead of the 3.3V pin) because according to the datasheet, it should be able to handle 5V just fine and to make it consistent with SDA and SCL on the sensor. I rewired the sensor on the breadboard and have Vin connected to the 5V pin (with the LCD screen using 5V pin too) and the LCD screen was reading a temperature 210F, which is incorrect. When the sensor is being supplied by the 3.3V, the sensor is reading correctly. Any idea why the sensor can be powered by 3.3V but not 5V even though the datasheet states differently?
  2. Would you suspect the sensor to read higher temperatures if you continuously ran the device with a PCB?
  3. Would you believe adding a small fan/blower to the interior of the device to pull the air through before the sensor read the first measurement would make the reading more accurate?

The data sheet says the pins are 5V tolerant not that the sensor will run on 5V. The sensor needs to be powered at 3.3V but you can apply 5V to the data pins safely (even thouth the sensor is powered at 3.3V) because the input pins do not have substrate diodes and are capable of taking 5V on the input. The maximum power voltage is 3.6V (and the intended power voltage is 3.3V.)

I’d expect the sensor to report the accurate temperature as long as the power supply is the expected 3.3V (it looks like the 5V affects something in the sensor and makes it read incorrectly at 5V on the power pin.)

It shouldn’t make the reading more accurate (that is controlled by the accuracy of the sensor itself) it may make a difference if the sensor is at a different temperature (bue to heat in the enclosure for instance) than the outside air. The fan would (hopefully) make the sensor the same temperature as the outside air.

Peter

1 Like

Can you look at this file? I updated the Vin for the sensor to be connected to 3.3V on the Arduino. Can can you ensure that the Gerber files look good to go! Excited that this is all coming together!

SeniorDesignV16.fzz (40.0 KB)

As far as I can see the gerbers look fine.

I don’t see anything wrong (that doesn’t mean something isn’t wrong, but that I’m not seeing it if it is.) It looks like you should be ready to go.

Peter

1 Like

On the schematic view, the routing makes it look like the 5V line from Arduino to the LCD connector is ALSO connected to A0. The wires are right on top of each other, and the bend corner looks almost like a connection (join) point. Same for the wire from A4 to the LCD connector. It looks like it is also connected to A5. They are not connected, it just looks like it.

If the resistors are just a voltage divider for monitoring the input source voltage, 1K is lower than needed (drawing more current). Increasing them to 10, or even 100K should be better.

The resisters both have a label of ‘1K’ (set in Inspector). Using ‘R1’ and ‘R2’ would be more common. Which properties of the parts are to be displayed in each view is controllable from the label. Right click the label (not the part), and (un)select options under “Display Values”.

On PCB, instead of running a trace from each of sensor pins to different GND pins on the Arduino, you could run a trace from one sensor pin to the other, then a single trace from one of those pins to a GND on the Arduino.

I do not know what the physical constraints are for your project, but rotating the LCD connector 180° would make the routing of the traces cleaner. No need to go ‘around’ the connector.

There does not seem to be any need to have the SCL trace from the Arduino to the sensor pin route around the bottom Arduino mounting hole. Straight through the middle works fine. Switching the SDA trace to the bottom layer means it can run directly across as well.

On schematic view, you can use “Power” symbol parts for the various power bus lines. That simplifies the routing quite a bit. More so, if there were more parts.

Since the Ardunio does not mount ‘flat’ to the PCB, the SMD resistors could be placed under the Arduino. Shortening the traces considerably. Adjusting the routing of the traces to the connector allows (what I did here) the resistor traces to be shortened, while keeping just outside of the Arduino pins.

Are those SMD pads on the sensor “really” flush with the PCB? Design rules check complains if a trace from the sensor pins runs across them. I “expect” that those are on the sensor board, but do not connect to the pcb, so a trace across them (on the PCB) would be just fine.

This version of the part file has those, and a few other ‘personal preference’ adjustments. I did not look at the gerber output for either the original or my modified version. This was just some hints for alternate ways of doing the same thing, and trying to reduce confusion when looking at the drawings.

SensorDesignV16.fzz (38.3 KB)

Sensor-sch
Sensor-pdb

1 Like

Thank you for all those suggestions! I appreciate it!

Sorry I am late to the party… :crazy_face:

I’ve read this thread off and on, here and there, but I haven’t read all of it, word for word. Having said that, let me share a couple of ideas…

In a case like this I would use 1/16 inch plexiglass. It’s fairly easy to work with, it can be cut with a metal straight edge, a utility knife, and a good solid work surface. Plenty of youtube videos out there on cutting the stuff. Basically you hold the straight edge in place and score the plexiglass with the knife repeatedly, then bend the plexiglass where the knife cuts are and it’s snaps apart. Clamping the straight edge to the plexiglass at the edge of a workbench would be best. For a small piece like you would need, you could even use a hacksaw to cut across the surface, (plexiglass laying flat and hacksaw horizontally), to cut it. If you have access to power tools, it’s easy to cut. Anyway, drill holes in it to fit your case, then drill holes to mount arduino. Mount arduino on plexiglass, then mount plexiglass to case.

I realize you might be too far along to re-think this part, but I just wanted to put it out there

I ran into this recently. The data sheet stated the device could handle 5.6v max. It can handle that voltage without being destroyed, but that wasn’t it’s operating voltage. Other parts of the data sheet indicate that it was a 3.3v device. Correcting it to 3.3v and it worked.

You’ll have to build it and see. Moving the temperature sensor as far away from the UNO’s chip isn’t a bad idea. My UNO has a 28 pin dip chip in it, never really noticed them as a chip that produces much heat.

I crammed a DHT22, an ESP32, and an bunch of other components into a small case. The ESP32 and one other part generated some heat. Once stuffed into a case, the temperature reading was 20+ degrees what it should have been. I drilled holes in the case to help vent it, but not much change. I changed the layout to move the hot components away from the temp sensor. I don’t know how much that will help me, but you might be able to correct that in the software.

If once everything is inside your case and the reading does increase because of heat, just subtract that amount from the sensor reading. Of course, with this approach, readings will be off until the devices and case warm up.

Good luck with your project!
Randy

I am needing the center of the drill holes to mount the PCB (not the Arduino drill holes) to be 79mm x 100mm apart. Is there a way in Fritzing to make those measurements exact as it keeps correcting the measurement to something close, but not exact? I want the holes to be 5.4mm in diameter.

At present this is as good as it gets (which is probably a bug.) Here I dragged 4 holes in to pcb and set the hole diameter to 5.4mm

when the last hole is the default 2mm hole

Then I set the x coord of the top hole to 65mm

but as we see it shows as 64.980 mm
then I did the same to the bottom hole (set it to 65mm)

and it shows 65.014mm (and setting it to 64.980 makes no difference so you can’t adjust it.) I think what is happening is floating point roundoff errors converting from whatever units are being used internally. The errors are small enough that they should be ignorable for mounting holes, but this should probably be reported as a bug to see if it can be fixed as exact coordinates are desirable.

Peter

1 Like

It’s all fun and games, until you make the enclosure the size of the stated measurements and being millimeters off, which could affect if the PCB fits! :slight_smile:

The ones I have seen are fractions of a mm off (not mm) but they are still annoying. I just opened an issue on github

to see if this can be improved. It may be the result of floating point roundoff errors and we may just have to live with it, but it may also be a bug that can be fixed!

Peter