Project price estimation - image scanner - Page 1
Forum section: electronics / general

author: gaminn
author_rank: Frequent Contributor
timestamp: January 10, 2019, 11:40:50 am
content: Hi,I'm a HW & FW & SW freelancer. I'm working on a card scanner and I would like to ask you, how much would you ask to design this scanner. This are requirements:- double sided image scanner for credit card sized cards. User inserts 2 1/8" wide card into slot of the scanner, wheels/rollers powered by a motor moves the card between two contact image sensors (CIS, 300 dpi reolution), the image is being sent to control PC during scanning process. When the scanning process finishes (should take less than 2 seconds), the card stops inside the scanner, waiting for control PC to process the image data. Then PC sends command to release the card - motor reverses and the scanner moves the card back into the slot where user removes the card from the scanner.- my job: electronics & firmware with analog front end, optical sensors to detect card, motor control, communication protocol (USB) and some basic software on PC to demonstrate and test the scanner. Mechanical part (CIS placement, rollers/wheels, slot, ...) is not my job.- I pay for electronic components and PCBs during development, I use my own equipment - scope, power supplies, multimeters, soldering station, ...- USB is used to power the scanner including motor. The PCB can have 2 USB connector to supply enough power for both scanner electronics and motor.- CIS calibration procedure must be implemented to achieve decent image quality (on PC the image is processed using OCR; a note: OCR is not my job, I just send image data from scanner and receive them on PC and provide some basic interface to command the scanner from PC and to signal a status of the scanner on PC)- measures against attempts of inserting too long or too short card must be implemented. The card can stuck inside the scanner because it can have some defects. When this happens, the scanner waits for somebody to manually release the card.- cost of the electronics (assembled PCB, motor, optical sensors) should be 40 - 50 USD @ quantity 100. CIS cost is not included in the price.- final product of the project is assembled PCB and demo software for Windows. Connector placement and shape of the PCB is specified by customer.How much $$$ would you ask for this project? I'm just curious about my price estimation hopefully being similar to more experienced designers. I'm aware that cost of labour is different at different places around the world.This is one of the prototypes and scanned image to see what the acceptable quality is. And demo app for PC.

author: OwO
author_rank: Super Contributor
timestamp: January 10, 2019, 12:44:43 pm
content: $10000

author: JVR
author_rank: Regular Contributor
timestamp: January 10, 2019, 01:44:39 pm
content: If those are the only requirements you have, 100000€ should do it.If you somehow have a proper requirement specification that will limit the scope of the project, then it depends on future volume, and whether you will be the OEM or not.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 10, 2019, 02:17:59 pm
content: Quote from: JVR on January 10, 2019, 01:44:39 pmThanks for your estimation.I'm not OEM, customer will manufacture it. I give him all source code and design files. And one or two working PCBs together with demo software which he will test to confirm the requirements were fulfilled or not.

author: JVR
author_rank: Regular Contributor
timestamp: January 10, 2019, 02:23:26 pm
content: Then you will need to up your cost a bit, as once you hand them the design files, they will come back and expect you to support "small changes".Is that the only requirement you have? And what price were you thinking?Honestly, if it was a POC, I'd probably charge in the range of 8000€-15000€, depending on their needs and time pressures.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 10, 2019, 02:33:20 pm
content: Future changes, even small ones, are paid, the customer knows it.I will write my price here tomorrow.POC? Proof of concept? No, this goes to production soon. So, 100 000 € or 8 000 - 15 000 €. That's quite a difference.

author: JVR
author_rank: Regular Contributor
timestamp: January 10, 2019, 02:44:37 pm
content: 100k is taking the piss, its meant to show that with so few requirements, I wont touch the job.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 10, 2019, 03:33:12 pm
content: Not sure what else one needs to know about this project. I added some pictures to ilustrate what customer expects to be delivered.

author: Domagoj T
author_rank: Frequent Contributor
timestamp: January 10, 2019, 03:41:29 pm
content: Having never worked with contact image sensors, do they work properly only in actual contact, or do they have a usable range (a few mm) where they maintain sharp image?

author: gaminn
author_rank: Frequent Contributor
timestamp: January 10, 2019, 03:43:36 pm
content: Image is sharp only when there is direct contact or max 0.3 mm between object and sensor.

author: JVR
author_rank: Regular Contributor
timestamp: January 11, 2019, 11:40:36 am
content: Quote from: gaminn on January 10, 2019, 03:33:12 pmUhm...Voltage Ranges / PSU capability?Transient Environment?Temperature range?Humidity?Expected operational life?Edge case behaviour?Error detection and resolution?Logging?Physical Security?Software Security?Tamper Proofness?Spoofing?Physical I/O control spec?Motor type, spec, gearing, stall current?What is "too long or too short" for the cardLength of the USB cable?Optical environment?That list goes on for long.Requirements are not just another shitty piece of admin, they are the document where you and the client make sure that there are no misunderstandings as to the problem, and the capabilities of the solution. And in those requirements lies the rub of making a profit, or losing your shirt.Have you done this sort of project before? What is your experience level with building products from scratch?

author: gaminn
author_rank: Frequent Contributor
timestamp: January 11, 2019, 03:28:57 pm
content: OK, I forgot to mention this will be used in normal clean room. Security? Not important. Just enable MCU's flash read back protection, nothing else specified. 4 years lifetime but it is expected this is mainly limited by the motor. Some ESD immunity is good (mainly on USB), the electronics is closed in metal enclosure, inaccessible to ESD strike. Motor is DC, 1 A motor driver si OK. Error detection - too long is 7" and too short is 2"There should be no other errors - the customer will test the scanner and if it won't scan the card than you will fix the scannerI/O specification is up to you, just get the data to and from PC via USB.I ask here because I finished the project with a loss (invested more time than I expected). I know exactly why this happened - I idealized the project, expected that everything will work like a charm and underestimated the time needed. But in reality, there are bugs in software libraries you use, you make mistakes, you spent more time with some parts of the projects, because you realize that something can be done better... Here, I wanted to confirm if my rate was low, normal or high. If low - then, in future projects, I will be more expensive for sure. If normal or high - then I'm not a good designer.

author: nsrmagazin
author_rank: Regular Contributor
timestamp: January 11, 2019, 03:36:04 pm
content: 4000 EUR is possible, but thats only the materials.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 11, 2019, 03:43:22 pm
content: Thanks. In my case I invested much much more of my time than materials. I expect this to be similar for anyone else.

author: JVR
author_rank: Regular Contributor
timestamp: January 11, 2019, 04:05:15 pm
content: Quote from: gaminn on January 11, 2019, 03:28:57 pmNever in your life say those words again. A user WILL find an error, somewhere somehow.Quote from: gaminn on January 11, 2019, 03:28:57 pmIf this comes across as me being an asshole, I apologize, as that is not the intent. The above is wrong. Due to not having cemented goalposts with the client, you could never get to the "good enough" point, and you never will, we are engineers, we strive for perfection. Remember the adage that perfection is the enemy of good enough.Please share your numbers with us, including time taken to complete, I'd also love to know how my earlier projection fits in there.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 11, 2019, 04:19:33 pm
content: Quote from: JVR on January 11, 2019, 04:05:15 pmOf course there will be errors. And they will be fixed. If the error is found during testing period, you fix them for free. If they are found later, you are paid for it.Quote from: JVR on January 11, 2019, 04:05:15 pmI'm chronic time underestimatorAnd I also design almost perfect electronic devices. That is bad combination.Quote from: JVR on January 11, 2019, 04:05:15 pmNot now, I really want to see other's unbiased price estimations.

author: Tomorokoshi
author_rank: Super Contributor
timestamp: January 11, 2019, 05:57:50 pm
content: Unclear from the specifications so far:1. Is the transport mechanism off-the-shelf and already designed and tested, or:2. Does it have to be designed?3. Who is designing it?4. Has it been prototyped?5. What are the requirements?

author: coppercone2
author_rank: Super Contributor
timestamp: January 11, 2019, 06:03:41 pm
content: how long did it take you develop * your salary and how much do the parts cost * random number you feel you can get away with * another number you think you can get away withrealistically you look at how much work you got in a year, where you want your salary to be and how much time the project occupied.

author: coppercone2
author_rank: Super Contributor
timestamp: January 11, 2019, 06:06:01 pm
content: Quote from: gaminn on January 10, 2019, 02:17:59 pmmake a prototype and put in a box that kinda has the idea right so you look goodscrew it to a piece of wood so you don't get screwed by some guy complaining about chassis manufacturing costs etc. they won't act so high and mighty for putting your guys into a plastic box then. It will just be a plastic box and not a systems engineering challenge if you already put it into a crate for him. Otherwise he might say your price is unreasonable because he needs to hire someone at 80$ an hour to shorten a ribbon cable or something. Instead he might pay someone like 40$ an hour to 'change the way this box looks'.

author: nctnico
author_rank: Super Contributor
timestamp: January 11, 2019, 06:13:24 pm
content: The best thing to do is break a project down in small tasks like selecting components, creating the schematic, doing the layout, building the prototype, testing, setting up the microcontroller, writing low level driver, testing the software, etc, etc. I usually do this by a granularity of half a day (=4 hours). Then add all the numbers and there is the number of hours you'll likely spend on it. When working on the project keep track of the number of hours and make sure not to get carried away making things much nicer than necessary.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 11, 2019, 07:34:52 pm
content: Quote from: Tomorokoshi on January 11, 2019, 05:57:50 pmThe transport mechanism is designed by someone else. I got a prototype of the mechanism to have something to try the electronics with.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 11, 2019, 07:38:12 pm
content: Quote from: nctnico on January 11, 2019, 06:13:24 pmThis sometimes happens. And also it often happens that my time estimation is bad. I have to multiply by 1.5 to get realistic time estimation for this project. Not sure if my planning or design skills are bad.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 11, 2019, 07:39:43 pm
content: Hey guys, give me some numbers.I will average them and from statistical point of view, we should get the correct number. You have all information I had when I started the project.

author: james_s
author_rank: Super Contributor
timestamp: January 12, 2019, 04:27:25 am
content: Is there a reason you can't use an off the shelf sheet feed scanner? They are available in double sided format, even small ones for scanning business cards and ID cards. Cheap and ready to go.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 12, 2019, 04:56:35 pm
content: The scanner is built in a ATM like machine. The client doesn't want to adapt his machine to new scanner, when old scanner is discontinued. There is also need for stopping the card inside the machine until the PC processes the card and maybe some other specific needs.

author: nctnico
author_rank: Super Contributor
timestamp: January 12, 2019, 05:04:08 pm
content: What I'm also wondering about is why not use a USB camera? If there is a Windows PC involved anyway...

author: soldar
author_rank: Super Contributor
timestamp: January 12, 2019, 06:00:54 pm
content: I was involved in something similar about ten years ago. A Hungarian company made an ID/passport reader. It worked with a video camera which took the image and processed it, OCR, etc.I see the company still existshttp://www.arhungary.hu/

author: gaminn
author_rank: Frequent Contributor
timestamp: January 12, 2019, 06:52:10 pm
content: We didn't try usb cameras. There is a limited space available over and under the card in the machine, now there is 6 cm (but could be a little more). What distance would two (top and bottom) standard usb cameras need to output sharp image without distortion? And I also think it would not be easy to perfectly glue at least two video frames (it is not possible to take just one frame as part of the card is always hidden behind mechanism of the scanner) to obtain complete image of the card and not to distort any characters on the card (OCR is then used). And realtime. Another delay of one or two seconds is not very good. But I'm not expert in this area.

author: james_s
author_rank: Super Contributor
timestamp: January 12, 2019, 06:57:49 pm
content: Seems like adapting the machine would be easier than trying to design a custom scanner from scratch. Depending on the volume I would at least look into contracting a company that makes scanners to make a custom model meant to fit in place of the old one. I would guess that trying to design something like that from scratch would require a lot of custom mechanical components which would get very expensive in small quantities. I don't see how you'd beat a company that already makes this sort of thing. Surely there are OEM scanner engine type modules meant for integration into customer equipment. Similar to the way early laser printers almost all had Canon engines inside.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 12, 2019, 07:05:09 pm
content: Quote from: james_s on January 12, 2019, 06:57:49 pmI don't think my client would pay less for adapting an existing scanner. He is also quite happy he has his own solution which he could easily adapt to his needs in future.You are right there are custom mechanical components which are not very cheap. The price to produce this scanner is same as buying commercial scanner they used before.

author: ebastler
author_rank: Super Contributor
timestamp: January 12, 2019, 07:10:40 pm
content: Quote from: gaminn on January 11, 2019, 07:39:43 pm$20kEdit: Yours was probably not the best way to ask. "Give me some estimates, but send them to me via PM, don't post them in this thread" would have worked better, to avoid biasing others by the earlier posts. Too late now...

author: Tomorokoshi
author_rank: Super Contributor
timestamp: January 12, 2019, 07:43:12 pm
content: Production ready: $100,000.1000 hours at $100 per hour. That is, a 6-month full-time project. And this is ambitious.Technical areas include: Software, electronics, mechanics, optics, machine integration, etc. EMC? Other approvals?

author: gaminn
author_rank: Frequent Contributor
timestamp: January 14, 2019, 01:49:02 pm
content: Thanks all for their comments. I asked approx. 10 000 USD for this project. Next time, I wouldn't go under 15 000 USD (but then the question is whether my client would start the project...). And I live in the Czech republic.

author: JVR
author_rank: Regular Contributor
timestamp: January 14, 2019, 01:58:56 pm
content: And how long did it take to complete?

author: gaminn
author_rank: Frequent Contributor
timestamp: January 14, 2019, 02:20:37 pm
content: Approx 3 months of pure time.

author: janoc
author_rank: Super Contributor
timestamp: January 14, 2019, 02:57:21 pm
content: Quote from: gaminn on January 12, 2019, 06:52:10 pmDistortion is not a big deal if you have a decent quality lens that doesn't have other problems (heavy chromatic aberration, for ex) - just calibrate the lens using e.g. a checkerboard pattern (do once and then store the calibration in a file) and then undistort images in software. The same could be done to deal with keystone correction if the camera isn't exactly perpendicular. If there is PC involved you have plenty of computational power to do this type of processing - it moves the complexity from hardware to software which may be easier to deal with. Libraries like OpenCV are a popular solution for this type of stuff.The distance problem can be handled e.g. using a wide-angle (fisheye) lens and/or a mirror. Both are fairly common tricks in these situations.

author: Kilrah
author_rank: Unknown
timestamp: January 14, 2019, 03:09:53 pm
content: I'd have said $30k.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 14, 2019, 03:45:46 pm
content: Quote from: janoc on January 14, 2019, 02:57:21 pmGood points, thanks. How much you think would be a suitable USB camera?Illumination could also be challenging. The cards are shiny.

author: janoc
author_rank: Super Contributor
timestamp: January 14, 2019, 08:17:23 pm
content: Quote from: gaminn on January 14, 2019, 03:45:46 pmDifficult to say, the largest cost will be the lens. The cameras themselves are cheap compared to lenses. You can get some prices here, for ex.:https://www.ptgrey.com/camerasOf course, you can always buy a Chinese board camera from Alibaba/AliExpress which is going to be much cheaper - possibly good enough for a one-off. But if you need more of these, then better go with a vendor like Point Grey.E.g. these Firefly cameras:https://www.ptgrey.com/firefly-mv-usb2-camerasBut there are a lot of board camera vendors - pick based on your requirements and budget. A prototype can be built even from two webcams ...Quote from: gaminn on January 14, 2019, 03:45:46 pmAngle the light source so that the reflection isn't going back into the camera. And/or use diffuse lighting, e.g. a panel similar to the LCD backlights.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 14, 2019, 11:14:01 pm
content: We are talking about a device with manufacturing cost of 80 - 90 USD of electronic part (image sensors, illlumination, motor, electronics). These machine vision cameras are out of the budget. If the client would consider going this way then the price of both cameras must be well under 50 USD. I guess webcam or some chinese camera module is the only solution but then resulting image quality would be questionable.

author: janoc
author_rank: Super Contributor
timestamp: January 15, 2019, 12:48:43 am
content: Quote from: gaminn on January 14, 2019, 11:14:01 pmNot necessarily, the Chinese cameras often use the same sensors, etc. Of course, you will need to find one that actually has a decent lens (or provide your own). Moreover, you want to do some sort of OCR/code reading, not photography, so you don't need perfect image quality - as long as you can decode the content.If you use a contact sensor, you may save a bit on the sensor itself but will need to deal with all the interfacing (those linear CCDs are quite non-trivial to use) and the mechanics of the scanning itself, requiring a lot more complex setup than a camera would.

author: Kilrah
author_rank: Unknown
timestamp: January 15, 2019, 07:39:17 am
content: Remember one of the reasons for in-house dev was avoiding cases where the manufacturer EOLs the whole scanner. You don't want to get yourself into the same issue by designing around a no name Chinese cam that may or may not exist anymore in 6 months, would be even worse.

author: JVR
author_rank: Regular Contributor
timestamp: January 15, 2019, 08:53:06 am
content: Quote from: gaminn on January 14, 2019, 02:20:37 pmThat is damn fast, considering you had to do HW as well. That is generally the timeline for a POC with multiple engineers on a medium sized project.

author: gaminn
author_rank: Frequent Contributor
timestamp: January 15, 2019, 12:08:06 pm
content: Quote from: JVR on January 15, 2019, 08:53:06 amThe project as a whole took quite a long time to complete. We started the project in 2017 and finished it (almost) now. There were many breaks during the project, at least for me. After POC the client needed some time to get money for the project, several times I was waiting weeks for prototypes of mechanics of the scanner to be designed by the client and delivered to me, etc... I'm just saying I spent <600 hours of pure time with HW, FW and demo SW design.

author: janoc
author_rank: Super Contributor
timestamp: January 15, 2019, 08:10:37 pm
content: Quote from: Kilrah on January 15, 2019, 07:39:17 amThat's why I was originally recommending Point Grey - there you don't have this problem (but you do pay for it ...). OTOH, with a bit of a smart design you could make the device flexible enough to accommodate many different board cameras and circumvent this problem entirely.If you use USB to talk to the PC and standard UVC compatible cameras, the rest is mostly mechanics (how to fix the camera in the frame) and lenses (which are mostly standardized). The exact chipset, resolution etc. don't matter that much (beyond some sane minima) if the goal is only to read what is on the the cards. But yes, I probably also wouldn't design a product around a camera from AliExpress unless I had a guarantee from the manufacturer that it will be available for some reasonable time.On the other hand, if you do this using a bare linear CCD sensor and the sensor becomes unavailable, you are in much deeper kimchi ...

author: Mr. Scram
author_rank: Super Contributor
timestamp: January 15, 2019, 08:16:24 pm
content: Quote from: gaminn on January 11, 2019, 07:39:43 pmThat's a risky approach. I'd just have to suggest a price of fifteen million dollars to ruin that plan.