Comments (9)
I think I've found something really helpful!
A get request to https://cart.jlcpcb.com/shoppingCart/smtGood/getComponentDetail?componentCode=C2286
Gives back a nice JSON object with all sorts of helpful data.
- "leastNumber":20,
- "leastNumberPrice":0.1520,
- "stockCount":399792,
Here's the full response:
{
"code":200,
"data":{
"assemblyMode":"smtWeld",
"assemblyProcess":"SMT",
"attributes":[
{
"attribute_name_en":"Illumination Color",
"attribute_value_name":"Red"
},
{
"attribute_name_en":"Dominant Wavelength / Coordinate rank",
"attribute_value_name":"615~630nm"
},
{
"attribute_name_en":"Luminous Intensity (IF=20mA)",
"attribute_value_name":"100~120mcd"
},
{
"attribute_name_en":"Correlated Color Temperature - CCT(K)",
"attribute_value_name":"-"
},
{
"attribute_name_en":"Mounting Type",
"attribute_value_name":"Surface Mount"
},
{
"attribute_name_en":"Lens Color",
"attribute_value_name":"-"
},
{
"attribute_name_en":"Luminous Flux/Radiant Flux",
"attribute_value_name":"-"
},
{
"attribute_name_en":"Color Rendering Index(CRI)",
"attribute_value_name":"-"
},
{
"attribute_name_en":"Vf - Forward Voltage",
"attribute_value_name":"1.9~2.2V"
},
{
"attribute_name_en":"Size / Dimension",
"attribute_value_name":"1.6mm x 0.8mm"
},
{
"attribute_name_en":"Height (Max)",
"attribute_value_name":"0.7mm"
},
{
"attribute_name_en":"Operating Temperature",
"attribute_value_name":"-40℃ ~ +85℃"
}
],
"canPresaleNumber":290199,
"componentBrandEn":"Hubei KENTO Elec",
"componentCode":"C2286",
"componentDesignator":"D",
"componentImageUrl":"https://assets.lcsc.com/images/lcsc/900x900/20180914_Hubei-KENTO-Elec-KT-0603R_C2286_front_10.jpg",
"componentLibraryType":"base",
"componentModelEn":"KT-0603R",
"componentName":"Hubei KENTO Elec KT-0603R",
"componentPresaleType":"buy",
"componentSource":"jlc",
"componentSpecificationEn":"LED_0603",
"componentStatus":"yes",
"componentTypeEn":null,
"dataManualUrl":"https://datasheet.lcsc.com/lcsc/1810231112_Hubei-KENTO-Elec-KT-0603R_C2286.pdf",
"describe":"Red 615~630nm 1.9~2.2V 0603 Light Emitting Diodes (LED) RoHS",
"encapsulationNumber":4000,
"encapsulationUnit":"PCS",
"erpComponentName":"LED_灯_红_Iv=100-120_λd=615-630",
"firstTypeNameEn":"Optocouplers & LEDs & Infrared",
"initialPrice":0.0030,
"jlcPrices":[
{
"componentCode":"C2286",
"createTime":null,
"deleted":false,
"endNumber":199,
"jlcComponentPriceAccessId":null,
"jlcComponentPriceKeyId":null,
"lcscComponentId":null,
"productPrice":0.0076,
"startNumber":1,
"updateTime":null
},
{
"componentCode":"C2286",
"createTime":null,
"deleted":false,
"endNumber":-1,
"jlcComponentPriceAccessId":null,
"jlcComponentPriceKeyId":null,
"lcscComponentId":null,
"productPrice":0.0030,
"startNumber":200,
"updateTime":null
}
],
"lcscComponentId":2659,
"lcscGoodsUrl":"https://lcsc.com/product-detail/Light-Emitting-Diodes-LED_Hubei-KENTO-Elec-KT-0603R_C2286.html/?href=jlc-SMT/?href=jlc-SMT",
"leastNumber":20,
"leastNumberPrice":0.1520,
"lossNumber":5,
"matchedPartDetail":"Hubei KENTO ElecRed 615~630nm 1.9~2.2V 0603 Light Emitting Diodes (LED) RoHS",
"minImage":"https://assets.lcsc.com/images/lcsc/96x96/20180914_Hubei-KENTO-Elec-KT-0603R_C2286_front_10.jpg",
"minPresaleNumber":4000,
"minPresalePrice":null,
"minPurchaseNum":4000,
"overseasStockCount":399792,
"preMinPurchaseNum":null,
"prices":null,
"secondTypeNameEn":"Light Emitting Diodes (LED)",
"stockCount":399792,
"storyGoods":true,
"warehouseCode":"sz",
"warehouseName":"深圳"
},
"message":null
}
from kicad-jlcpcb-tools.
We could also calculate the cost for the SMT assembly:
The number of solder joints is available from the database 😀
from kicad-jlcpcb-tools.
Maybe this gets solved with #55
from kicad-jlcpcb-tools.
I implemented the use of the API and it works but does not line up with what JLC's Website calculates for some reason:
Dummy PCB, 1 LED (C2286), 40 Resistors (C25804)
The leastnumber for both is 20 so the led gets the leastprice of 0.152, the resistors the regular price of 0.0025
5 Assembled PCBs should calculate like this:
1x 0.152 + 40x 0.0025 = 0.152 + 0.1 = 0.252 x 5 = 1.26
But JLC's Website gives me totally wrong number for the parts count and a much lower parts cost for some unknown reason:
20x LED seems ok, because thats the least number and the price of 0.152 fits also
206x Resistor does not fit at all, we have just 200 Resistors, but their price for the 206 fits with 0.5150
from kicad-jlcpcb-tools.
Oh man, it just made click!
I cannot simply multiply the price for one pcb by 5 because the leastnumber
for the led is 20 which is < the led count on 5 PCBs so we get the leastprice
just once and not 5 times 🤦🏽♂️
What do you guys mean, should we always calculate the price for 5 assembled pcbs to get a correct sum?
Edit:
I did just that and the price lines up with the website (if they fix their part count issue):
from kicad-jlcpcb-tools.
It makes sense to calculate for the 5PCBs since you can't order fewer, but then you can also present that number divided by 5 to show how much it's per board.
from kicad-jlcpcb-tools.
@arturo182 Indeed, that sound right!
I've implemented the solderjoint x partcount x 0.0015 x 5
calculation as well, but again, I get a different result that is correct in my eyes 😕
LED: 2 x 1 x 0.0015 = 0.003 x 5 = 0.015
Resistors: 2 x 40 x 0.0015 = 0.12 x 5 = 0.60
I guess the calculate the assembly fee even if the parts are not populated.
20 LEDs are charged, but just 5 are really mounted, so I guess thats where the difference comes from ...
from kicad-jlcpcb-tools.
Ouch, so you're paying them for throwing out the extra LEDs 😅
from kicad-jlcpcb-tools.
I'll close this for now as its unrealistic to get this right without proper API access.
from kicad-jlcpcb-tools.
Related Issues (20)
- BOM is written CPL content instead of BOM on 2024.06.02 HOT 5
- Idea: add component count selector in "component search" section HOT 3
- BOM is not generated - KiCad 8.0.3 + JLCPCB Tools 2024.06.03 HOT 9
- Windows Mapped Drive Problems (recent windows 11 update?) HOT 4
- Plugin fails on components without pads HOT 4
- "Do not place" attribute ignored when creating BOM file HOT 2
- Update of parts DB fails HOT 4
- No files are generated in the latest nightly 8.99.0-unknown-5c22162d85 HOT 5
- Plugin not showing up kicad 8.0.3-1 HOT 1
- Help understanding the rotation feature HOT 2
- Some JLC part numbers missing in the HOT 3
- Idea: add component grouping in main view HOT 2
- Error after downloading DB HOT 5
- Stock and Type are no longer updated
- Show age of the database
- Failed to download JLCPCB Database HOT 2
- Failed to download JLCPCB Database HOT 1
- Improve part list HOT 6
- Empty BOM file HOT 5
- Feature Request: Export Additional Layers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kicad-jlcpcb-tools.