SCD30 CO2 + temperature + humidity sensor

Thanks for the reply!

I just did as you suggested, and it looks OK to me (thanks to @Old_Grey for his detailed video!). Any next step I should perform to further ensure the part is OK?

Even though it gerbers I didn’t check the dimensions, so make sure it is right before you get any PCB made that this part plugs into, ie, print out the PCB and see if the part plugs into the paper.

EDIT - if you watch all that vid it explains why it’s so important.

I see what you mean, thanks!

if you watch all that vid it explains why it’s so important.
indeed, quite condensed amount of information, I like that :slight_smile:

SCD30.fzpz (13.1 KB)

here we did it. There was another version around but it had some errors.

Summary: There are several breaking errors in this version of the part too. As well as additional cosmetic problems that should be cleaned up.

I ran the contents of that part file through FritzingCheckPart. Here is a summary of what it reported, and what I noticed doing a manual inspection and smoke test in Fritzing.

There are ‘px’ units on font-size attributes in the schematic view svg file that Fritzing is known to not handle well. The text size can change from what was intended. Fritzing wants just numbers, without units. Fritzing wants just numbers, without units. Using ‘px’ units is valid for the svg format specification, but Fritzing does not handle it.

The new convention is to use black graphics for pcb silkscreen, instead of white. Fritzing automatically converts (and so does the FritzingPartsCheck tool), but for future reference, black is preferred for the silkscreen of pcb svg files.

The fzp part definition file does not have a “fritzingVersion” attribute for the module element. The handling of some part details has changed over time (older versions of Fritzing), and the value of the version is used to choose which way certain things are interpreted. A value of “0.9.4b” should tell Fritzing to use the (currently) latest rules. Fritzing Parts Editor automatically fills in the full version number. When manually creating parts files, a shorten version is good enough.

The connectors in the part have been configured with the type set to “female”. Except for parts that act like breadboard, and some ‘shield’ or ‘hat’ parts, that is normally better as “male”. The connectors need to be “male” to all the part to be dragged onto a breadboard, and automatically connect. With “female”, other (male) parts will automatically connect to this part when the connectors line up. Without using any wires. Which way this should be implemented depends on the part (and user preferences), but using “male”, and allowing the part connectors to link to breadboard connectors is the usual expectation.

A warning is being reported about an “-inkscape-font-specification” with an invalid value. As long as the standard svg “font-family” entry also exists, the inkscape specific extension can be safely ignored.

The “breadboard” layerId specified in the fzp part definition does not exist in the matching svg image. This will “appear” to work in Fritzing, but exporting a sketch to an svg image will not include the part. The “breadboard” id should be added to the first/outer wrapper group element. Currently there is not wrapper group, so it should be created. Select all, create group, in Inkscape.

The same problem exists for the “schematic” layerId and matching schematic svg file.

The part definition shows terminalId attributes for connectors in the breadboard view, which do not actually exist in breadboard svg. If the terminalId is defined, a matching graphic element should exist in the svg.

Normally, a terminalId is not needed for breadboard view connectors. Especially when the connections are just header pins. An edge connector might need one.

The part definition shows terminalId attributes for connectors in the schematic view, which do not actually exist in schematic svg. These should exist in the svg. They are used to give Fritzing a reference point, to “snap” wires to. Without this, wires attached to the connectors will be drawn to the middle of the connector pin line, instead of to the end.

There is a graphic element at the start of the pcb svg file, that is not in any of the layerIds specified in the fzp file. It is probably intended to be part of the silkscreen. As is, it will not be included in any export of the pcb view.

The fzp definitions show both copper1 and copper0 layerIds for the pcb view. That normally indicates that the part is through hole. However, the pcb svg file only contains a copper1 layer (group). There is no ‘bottom’ copper for the connectors. So the pcb information has this as an SMD part.

FCP also complains that the pcb connectors do not have a radius, which means that no hole will be drilled. If this is really an smd part, the connectors should be drawn as filled pads. This visually look like circular holes with copper rings around them, but that is not what will be exported to gerber. If these are supposed to be through hole connectors, the “connector«n»pin” elements should be circle elements. The radius of the circle, combined with the thickness of the stroke determine the hole size. Non-circular copper rings can be create by adding additional elements, but the circle needs to exist to get a hole drilled.

The connector pin lines in the schematic view should be a standard color, not colorized by function.

All connector pins in the schematic view should align to a 0.1 inch grid. Because the terminalId elements are missing, the part is aligning to the center or the lines, instead of the ends.

Several of the connector descriptions in the fzp file seems to be overly verbose. Having details is good, but try to keep it to only enough to understand what the connector is for. Not the complete history, and how to use it.

here we did it. There was another version around but it had some errors.

I’m curious now: what was wrong with my version (attached to one of my post further up in this thread)?

ok thanks for the feedback. This was the first part we did. Is there a up to date full tutorial somewhere?

it was mirrored (so you had to use bottom for top) and the holes were to small so my 1/32 inch (0.8) mill could not mill the holes and the copper ring was very small. Also better to have copper rings on both sides. The part works for me now but we will try to fix the errors.

I saw you on Freie Maker. Nice to meet you! Below you see your part on top.

This is the corrected version from us now.

I would agree that the copper pads are too small in the original.

But the mirroring is the other way around. The original part actually has the correct orientation, while you apparently intent to mount the sensor bottomside-up onto the PCB, so now the footprint is flipped.

Which exposes an interesting problem. Fritzing’s PCB view does not offer the possibility to flip a part, like it does by default in schematic view and like it can be enabled in breadboard view. Which makes sense for classic components. But for breakout boards one could actually decide to mount it upside-down, like in this case. Which would require being able to flip the footprint. Also in the case of double-sided assembly this would be needed. Certainly not the most common case, but how far fetched is it really?

No your original part is flipped. Look here at watterot they also mount it like we mounted it. This way the LED is visible and the humidity/temperature sensor is on top and you can design a case for it. Also the seedstudio grove SCD30 board is mounting it like that. Do you want to argue that all these professionals made a mistake but you that did a part the first time and did such a project for the first time are right?

https://wiki.seeedstudio.com/Grove-CO2_Temperature_Humidity_Sensor-SCD30/

The OP linked to the website of the manufacturer of the sensor, from where the data sheet for this sensor is available. This data sheet clearly states what is the top-view and what is the bottom-view. I would say that the original part is based on this data sheet, and therefore correct. The breadboard view shows the top view, and so does the PCB view.

If everybody decides that the sensor should be mounted bottom-up, fine. If that is what makes the most sense, sure. I would want to argue, though, that the better approach for everyone following later and wanting to use this part would then be to create a new part which is explicitly this sensor turned around. Which means, PCB view is bottom-view and breadboard view is bottom-view. Which, of course, involves a lot more work to create a new BB SVG. So that doesn’t make sense if all one wants is a quick way to use this part in PCB view, mounted bottom-up.

This provides a new aspect to the more interesting question, whether PCB view should allow to flip parts. Right now BB view can do it, but the part image is simply mirrored. It’s not like its flipped around and then shows a bottom view image of the part. Since that is possible and already deviates from the maxim to mirror reality, then PCB view should probably allow it, too, where it would actual real sense, as seen in this example here.

Ok I saw it now it the datasheet as well. According to that your orientation is right. And what is if the person that has written the datasheet made a mistake? There are so many clues to put it as we put it. In the data sheet it also says that max 3V for i2c and thats because we designed a levelshifter for that and then we got the info from Sensirion that they had not been any problems been reported with 3.3V and that is should be fine as well.

and

apply to the current version of Fritzing.

Peter

I beleive that the tutorials Peter references mostly assume that the configuration of the part definition is done through the Parts Editor. From what I saw, some of the fzp content for this was done manually. If so, you want to use 2.1 part file format as a reference.

Extra note about the fzp content. The board seems to be 7 pins, but the fzp says 8.

that was a fun event :slight_smile:

This is indeed what I had used as a starting point. I agree, though, that this might not be the best way to actually mount the SCD30 into your CO2-monitor. I am, for example, currently mounting all SCD30 at an angle of 90 degree to the board (i.e. with the side pointing upwards), which is something I cannot model in fritzing (at least in my understanding).

Indeed, this seems to be the best approach. But it involves also the most work - I am quite busy at the moment but will see if I can make a second object (similar to the first I made, just flipped (not mirrored, just to be precise)) within this month.

Parts can not be flipped in breadboard and pcb views by default, but “in theory”, per views and layers, you should be able to explicitly mark the view as flipable. However, in my few tests I could not get that to actually work for pcb view. :frowning:

Mine don’t, as I don’t use parts editor, they are all about editing the underlying files and may (or may not :slight_smile: ) be easier than the part file format document (which my tutorials are based on.)

Peter

@vanepp :+1:
That will make it easier to match to what looks to have already been done.