10 boards, 10x10cm, 4 layer, ENIG finished, 100%E-test and a aluminium framed laser cut stainless steel stencil. I payed 132,73$ shipping by hongkongpost included.
Soldermask in them looks more like the one on your first picture. It has several tight pitch WFN (I think they're tighter than yours) and some have soldermask between pads and the tightest pitch ones don't.
Well, I placed C2 in there and guess what... it works. Perfectly. Thank you very very much. After your explanation everything made sense.
Things like these make me realize that there's still a lot to learn. After a whole course about feedback, another whole course about analog design and a whole course of microelectronics where I learnt how a mosfet works from the very very basics I still can't design a extremely simple analog circuit without falling in every possible pitfall. Damn it. They teach you a lot of concepts but not how they relate in real life. At least the basics of my circuit were "right".
[quote author="Bertho"]This version [attachment=1] is simplified. It uses R1 to limit the rush current from the digital port (~18mA peak) and C1 to isolate the digital output from the mosfet. R2/C2 is the timing constant where D1 limits the voltage to positive only.
Note that R3 is only added to aid the simulation to prevent parasitics from interfering with the output voltage at the drain of M2.
edit: add image. [attachment=0][/quote]
That was the first version of my circuit except for C2 which I don't know what it's pourpose is. I mean, that capacitor increases the amount of charge that the PIC needs to deliever to the gate of the transistor and that would delay things. Maybe I'm missing something very important there. I added the 10k rush limiting resitor because it didn't seem to affect anything in the simulator and if you ask for more than about 5mA to a PIC output driver it'll start dropping the voltage.
My version of the circuits behaves very similarly except that in the simulation it doesn't have any negative spike (not even -0.4V). I know that even a -5V spike wouldn't damage the transistor as it'd be well within spec but I'm a bit scared of fast uncontrolled charge redistributions.
I've spent some of the afternoon tweaking values and still the same behaviour. Only about 1.8V max at gate and negative spike....
I'm designing a simple board to control two liquid pumps and several other things. The pumps are for pulverizing a product and they work once in a while, being active for about 100 to 200ms (they are high speed pumps specific for pulverization). As the board is controlled by a computer via USB CDC and they will be the programmers (I only have to give them an arduino-ish abstraction layer so they can copy-paste sketches and get them running in a PIC) they wanted an extra layer of safety to prevent the pumps for being active for more than half a second if the microcontroller went crazy for some reason. Of course there's the watchdog to handle those situations but to be even safer I designed a very small circuit that should limit the duration of the pulse. It's basically a high time constant highpass filter driving a low threshold mosfet with some diodes placed in there to avoid negative spikes at the mosfet's gate, not because they would kill them but just to be a bit safer. That MOSFET drives an optocoupler and has a 1V threshold voltage.
Here's the circuit:
The real MOSFET is a DMG1012 which is smaller than the AO6408
If there's a rising edge at V1 then D1 would turn on and C1 and R3 would make a highpass filter with a high time constant. The expected waveform at the transistor's gate would be a slow-decaying negative expontential starting at about 4.5V. That would turn on the MOSFET until the exponential decay reaches about 1V, and then the MOSFET would turn off. When there's a falling edge then D2 would turn on and R2 and C1 would make a smaller time constant highpass filter with a much faster decaying exponential so that the circuit would quickly be ready for the next rising edge. So basically the circuit would behave "transparently" as long as your pulse duration is short enough, and would limit the pulse duration if the pulse length exceeds the time it takes for the negative exponential to reach the threshold voltage. With the values shown the pulse width limit would be about 600ms.
R1 is there to limit inrush current and I haven't taken its effect into account for the highpass explanation.
I've simulated the circuit in LTspice and I've even added the estimated parasitic inductance of the PCB trace and the estimated series resistance of the PIC's output driver and it works just as expected in the simulation. I also used LTspice's models of real ceramic capacitors. But in reality I can't get it to work. It limits the pulse to less than 20ms and the exponentials don't get to 5V but only reach about 1.8V. And I have a negative spike of -4.5V at the mosfet's gate every time there's a falling edge. I've checked the PCB layout and looks fine.
LTspice is supposed to simulate diode turn-on and turn-off times and most parasitic effects and the simulation works perfectly. Anyone can give me a clue about what's wrong? [attachment=0]
I ended up using a PIC16F1459. I already have not one but two pickit3's and compiling the available CDC example for the PIC16F1459 leaves me with half the RAM and flash for the main program. I needed it to be cheap because this project will eventually get to a production state and probably 500 to 1k units will be manufactured. I'm not a fan of premade boards, I always custom design, even (parts of) prototypes. The arduino code is very very simple so I'll just code some arduino abstraction layer for the PIC so they can just copypasta the arduino code and get it running with very little modifications.
Pinguino uses powerfull 18F's and I'm talking about something that's $2 a piece tops when bought in singles. For the price of a nice 18F with USB I can almost implement an atmega8 based arduino with the cheapest usb to serial available in the market. That's what I'm trying to avoid here. I need something to read an analog and a digital sensor and turn on a motor and some lights in consequence, nothing fancy. It also has to send the state of the sensors to the computer and that's where the USB need comes in.
I have to design a board that needs to control a couple sensors and drive an actuator. Very simple operation, nothing really fancy. Only characteristics required are a simple ADC and the ability to communicate to a PC over USB, if possible via a virtual serial port. Also, the guys who developed the prototype did it on an arduino and they don't want to port too much code and are not experts in microcontrollers. I know about the V-USB library and I wonder if theres's some stand-alone arduino implementation that works over v-usb in a cheap micro like an ATTINY 2313. Also, if no simple alternatives exist, anyone knows how does the microchip/honken USB stack work in PIC16F145X microcontrollers?
[quote author="nickjohnson"]Devices like this definitely already exist, though I can't point to any off the top of my head. Most often they're designed for transferring photos from an SD card to an external hard drive.
It's more difficult than you might think because you want high data rates for something like this, which means USB High Speed support, which means 4 layer boards and carefully controlled impedance.[/quote]
If you wanna run some long USB high-speed traces they better be carefully routed over a substrate as thin as possible and with controlled impedance, but the rise times involved in USB2.0 high-speed signals are long enough so that the short-trace model is still valid for traces up to some centimeters long (I don't know, but maybe 4 or 5). As long as you route the signals as a differential pair with the target trace width for the target impedance given by some transmission line calculator software and you keep traces short the thing should work without issues over a crappy substrate two layers board. The thinner the board the better. In fact many consumer products such as USB hubs are built that way, and they don't even equalize the lengths of the differential pair traces.
If the attached pictures are from your board's design and if it's meant to be a two layers board, then I'll just place some stitching vias between top and bottom groundplanes to improve grounding a bit and I'd clean up floating copper areas (unconnected copper fills) because they can act like patch antennas and although most times that isn't a concern it's always better not to have them.
For anything else it looks perfectly nice and solderable to me.
Yes, there is progress. But I have virtually no spare time to dedicate and won't have it until summer.
For now, Invensense's MotionApps firmware has been succesfully ported to PIC32, and we have the MPU6050's DMP outputting a quaternion at 200Hz and the output looks perfectly valid.
Some freescale code for the barometer/altimeter has also been ported but it's still mostly untested. Only checked that communication does work. Also, all systems of the quadcopter have been tested and work. Motors move, sensors work, PIC works, charger works and power regulators work perfectly.
Didn't find any CW CCW propellers pair small enough for this, so we had to invert the pitch of two SYMA-S107 tail rotors. That was accomplished using a nails clipper and some superglue. Seems to work OK.
Next test will be lift test. We'll push the motors at full throttle and see if it can lift itself. Final weight is about 9g, looks like it could work but still unknown.
Here's how it currently looks like:
There are some wires soldered instead of the bluetooth module. Serial lines are shared with ICSP1 and for now we're using ICSP for debugging through those wires you see. When the hardware interface layer works perfectly we'll solder the bluetooth module. We'll probably try to implement some sort of neural/fuzzy logic controller for this thing.
[quote author="ginpb"]I don't know what magnets are you using but most probably have a curie point above the solder temperature. And lead can be avoided.[/quote]
These small motors have neodymium magnets. I'm not 100% sure but IIRC their curie point is about 300-350ÂșC. Too risky and also i'm not sure that they woudn't degrade with temperature (they have parts made of plastic). Also, even with lead free solder soldering would still add unnecesary weight (and here every 0,1g counts), and in the event of a broken motor replacement would be complicated.
Future versions with multilayer boards would have plated-through mounts connected to thermal planes and the motors glued to them with thermal epoxy. The thermal resistance would be quite large but it would probably help dissipate some heat from the motors.
[quote author="ginpb"]You could leave some copper on the motor mount to solder the motors to the frame. also can you post a link to the motors and propellers that you have chosen[/quote]
That would make the magnets in the case go above their curie points and bam, motors gone. You can't get those magnets very hot. I'll rather use UV cured epoxy or regular epoxy. Also, solder has lead and lead is heavy.
Still no commited choice of motors/propellers. The candidates are SYMA S107 tail motors and propellers. My tests show that with smaller propellers the motors have about 1,7g of thrust. When the S107 props arrive I'll re-test and see. The expected weight is about 7.5g. I hope that the propelers I'm waiting for provide more thrust...
[quote author="matseng"]What's the width of the "arms"? 4 mm?[/quote] They're exactly 3.6mm I read you had problems with similar arms in a project. I told seedstudio in the order comments section that I'd rather have 5/10 boards broken than having to make the arms wider. They didn't complain at all and I got all 10 boards perfectly done. They're 1mm thick instead of 1.6mm.
Still a lot of things to arrive. (MPU's, 128kB PIC32's, propellers and battery) and i'm not sure if I'll have to order different motors. But all those things should arrive sooner than later.