Jump to content

I built a flash drive, I think.

Lamez

I am currently really interested in hardware and hardware design. I have been learning eagle cad at work and in my spare time, I decided to build a flash drive to put on a resume. 

 

From what you guys can tell, did I make any mistakes? Its going to cost me ~$66, at a 10 quantity minimum, so I am trying remove any mistakes before ordering. Let me know what you think.

 

I forgot to mention my parts list:

 

Description MPN Purchase Link
USB Flash Controller CY7C68034-56LTXI https://www.arrow.com/en/products/cy7c68034-56ltxi/cypress-semiconductor
NAND Memory MT29F16G08ABACAWP-ITZ:C TR https://www.digikey.com/product-detail/en/micron-technology-inc/MT29F16G08ABACAWP-ITZ-C-TR/557-1835-1-ND/9673816
5.0v to 3.3 LR LDCL015 https://www.arrow.com/en/products/ldcl015m33r/stmicroelectronics
USB A Connector 480372000 https://www.digikey.com/product-detail/en/molex-llc/0480372000/WM7086CT-ND/3045005
24Mhz Crystal CX3225GB24000P0HPQCC https://www.digikey.com/product-detail/en/kyocera-international-inc-electronic-components/CX3225GB24000P0HPQCC/1253-1198-2-ND/4453918
2.2k 0805 Resistors ERA-6AEB222V https://www.digikey.com/product-detail/en/panasonic-electronic-components/ERA-6AEB222V/P2.2KDATR-ND/1465757
26 pf 0805 Capacitors CL21C250JBANNNC https://www.digikey.com/product-detail/en/samsung-electro-mechanics/CL21C250JBANNNC/1276-2621-2-ND/3888279

sch.png

pcb.png

Link to comment
Share on other sites

Link to post
Share on other sites

I see no input/output caps on the voltage-regulator, I see no transient voltage-spike protection on the USB data-lines ( https://www.digikey.com/product-detail/en/stmicroelectronics/USBLC6-2SC6/497-5235-1-ND/1121688 ), also I see zero caps for either the NAND or the controller -- they may work fine without, but have you actually tested whether they do or not?

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

The documentation for the linear voltage regulator says the capacitors on the input and output side are not required.

 

Quote

 also I see zero caps for either the NAND or the controller

 

Where would I put caps on the NAND and controller?

 

I have not tested anything yet. I was just thinking about bread boarding, I might have to make some breakout boards for the micro controller and the NAND IC.

 

Thanks for the input, I really appreciate it.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Lamez said:

The documentation for the linear voltage regulator says the capacitors on the input and output side are not required.

Where would I put caps on the NAND and controller?

Not required isn't the same thing as recommended. As for the caps for the ICs, as close to VIN- and GND-pins as possible.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, WereCatf said:

Not required isn't the same thing as recommended. As for the caps for the ICs, as close to VIN- and GND-pins as possible.

Fair enough, I guess I will add in those capacitors for the LR. I was trying to cut cost, but whats $0.50 really?

 

As far as the caps for the ICs, what size do you recommend? How would I calculate such a thing?

Link to comment
Share on other sites

Link to post
Share on other sites

Maximum 100uF capacitance at the input (USB restriction, the ldo is unlikely to care) ... i think a couple of 10uF 25v or higher ceramic caps in parallel would be enough.  Usually as close as possible to usb connector.

I'd use a minimum of 10uF on the output of the LDO and honestly, I'd use one that's rated for higher current. May go to 22uF if it's cheap or something around that value. Should be rated for 25v, 35v... or more.

 

For decoupling purposes, a 10nF/0.01uF (and maybe also  100nF/0.1uF ) ceramic capacitor (these can be 10v or 16v rated if you want small footprints) as close as possible to the controller IC voltage and ground pins, and the flash NAND voltage and ground pins. 

There's a shortage of these values so lately the prices went up a lot and often they're not in stock - the values are not critical as long as they're in the ballpark ... so if there's a cheap 15 nF in stock, that's totally fine to use instead of 10nF

 

Maybe you should start with something simpler if you just learned eagle and don't have basics such as using capacitors.

Do you even know how to program that cypress part to behave as a mass storage device?

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, mariushm said:

Maybe you should start with something simpler if you just learned eagle and don't have basics such as using capacitors.

Do you even know how to program that cypress part to behave as a mass storage device?

 

 

 

I appreciate the non-requested recommendation, and yes.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Lamez said:

Fair enough, I guess I will add in those capacitors for the LR. I was trying to cut cost

I don't think it's a good idea to try to cut costs by leaving caps out. With the voltage-regulator, caps are used to filter out the switching-noise of the regulator, which could cause issues if left unfiltered. Also, caps are used to filter out current-spikes, which there will be a lot of in such a high-speed device.

 

Just as an example, I just used an Attiny85 in a project to read an analog value and to generate a PWM-signal to drive a MOSFET; it worked fine without a cap on VIN and GND all on its own, but as soon as I added the MOSFET, it began to behave erratically: the PWM-signal was unstable and the analog-values were kinda random. Adding a suitably-sized cap fixed both issues. Sure, I knew already from the get-go that I'd need a cap on it, but I just wanted to see how bad it'd be without, or if it'd work at all.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, Lamez said:

The documentation for the linear voltage regulator says the capacitors on the input and output side are not required.

When the datasheet says something like that it means the device itself does not require them to be stable, it says nothing about your application, which the device's manufacturer can't know anything about. It even literally says so on the first page of the datasheet:

Quote

It is stable with no input or output capacitor

Stable means it won't oscillate, it does not mean it can magically maintain output when the input drops below the dropout level due to high impedance from the power feed. It also does not mean the part can somehow regulate above it's bandwidth. From the datasheet graphs it looks like it starts rolling off at 10Khz. That means from 10Khz onward it starts becoming worse and worse at regulating until it stops regulating at all somewhere beyond 100Khz. Your application will most certainly be working at frequencies far above that (+harmonics), it's up to the output/bypass capacitance(s) to pick up the slack in the frequency ranges above where the regulator leaves off. Make sure to pick as physically small as possible ceramic (X7R) MLCC capacitors. The small size reduces parasitic inductance which makes it a better capacitor at higher frequencies. There's no need to be limited to a couple of nF as suggested. Pick the largest amount of capacitance in the physically smallest possible device you can get/budget for.

 

USB could sometimes come trough a somewhat lengthy cable (front panel USB for example). This wire has some inductance that will present high impedance at some frequency and beyond. When the regulator suddenly has to draw more input current this inductance will prevent this and the regulator will be starved (And inductive spikes the other way around). That's why you need input capacitance. Because the inductance is unknown one usually picks some ballpark figure (say 1uH) and work from there to calculate the capacitor value(s) and damping to reduce the filter Q.

 

Furthermore the PCB layout looks horrible. This is high frequency stuff, it's not as simple as simply connecting all the points. First and foremost, your 2 most inner layers should be dedicated power planes. That means 1 layer completely copper over the entire surface of the board for ground and another layer like that for VCC post regulator. The idea is to minimize all the loop surfaces. With full power planes, each HF loop can return directly underneath the trace from whence it came, making for the smallest possible loop. This will happen automatically as HF current follows the path with least impedance. 

 

The regulator should be as close as possible to the USB connector with as wide a trace as possible connecting it to the positive input. Then decoupling capacitors as close as possible to the supply pins of each IC, on the same layer as the IC, and connect them locally. Then stitch trough to the power planes with via's as close as possible to the decoupling cap. A ferrite bead between the VCC via and decoupling cap can help. The idea is to decouple as much HF noise as possible before it can get to the power planes to prevent it acting like a patch antenna and radiating all that crap into the world.

 

(And yes, that implies the noise is generated by the IC's and you want to shunt it before it feeds back to the power planes, not the other way around like most ppl think).

 

Then, no 90 degree angles in traces, especially the HF signal traces. Sharp bends like that cause changes in the trace width, which in turn cause impedance variations which can cause reflections. USB is a differential signal with 90 ohms characteristic impedance. So your D+ D- pair should be length matched and impedance controlled.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×