It has options to be powered by a Li-Ion battery (rechargeable via the USB port, with a MCP73831), as well as by a CR2032 coin cell. There’s an other option for the 1,8V EEPROM SDO line pull-up voltage adaptation.
All the options are selectable by fitting or not 0 Ohm resistors and adding the dedicated components.
In the Li-Ion version, it’s supposed to fit into a case like that (but with a hole for a button and a LED). It’s 19mm x 40mm.
The blue connector is the ICSP program port. I designed it to be “off-snappable”, as it’s connected only by three bits of PCB, where the signals pass.
NB: Some of my 3D models aren’t exact (like the battery socket, the 3D model is SMT instead of the through hole I have)
Here, an other PCB, Li-Ion only. Just for fun, I wanted to see how small the PCB (19mm x 38mm) can be routed with the components on the same face. On the bottom, there’s only a contact-style connector for ICSP:
The components names couldn’t fit on the top side, so I put them on the bottom.
The PCB could maybe get even smaller with a smaller 3,3V regulator, in a SOT23 package instead of the SOT223. The 32,768KHz crystal could also use a smaller package. But here, I hit the limits of the 2 layers, 6mil/6mil routing and I’m not sure some tracks won’t interfere each other.
The prototype on the first two images is the one I’ll be using to continue the software development.
A short update, hoping it could answer some questions people are asking themselves. This time, I ordered two different boards. One 15x10cm and one 5x5cm. I placed the order and uploaded my gerbers the 4/11/2011. As I had two different boards, I named the zips containing the gerbers with the size of the board (“10x15cm” and “5x5cm”). The shipment mail came the 11/11/2011 and the package the 18/11/2011. This time, it was sent with HK post registered airmail with a tracking number. Unfortunately, the tracking isn’t as good as the one with Chinapost (at least, with France as destination. I only had “the item left HK”). But it was fast. Also cheap, because they put the two board sets in the same box, so I only paid one dollar more (same price as one batch of 5×5 PCBs)
The small PCB had twice the same design. It seems to be OK, as long as you don’t put anything that eases the board cut (slots, holes line or V-groove):
As usual (so far) the fabrication quality is excellent for the price.
You’ll notice the slots for the USB plug. I’m using Altium and when a board has slots, it generates a separate drill file for them. I included the two files (round holes and slots) in my zip and apparently the fab managed to figure out what to do with them. Cool.
I used 0,15mm lines for some silkscreen (the rectangle around the tiny temperature sensor package). I see I should rather use 0,2mm lines instead, like for the other lines. The tracks, vias and separations have the same size like before (see my previous notes about iTeadStudio). I soldered the components, everything worked fine (at least mechanically). Except that one of the regulator packages is wrong, should be SOT233. Argh. Stupid me. (Well, better too big than too small.)
The 10x15cm PCB is a 16 input, SNMP state output board. You can configure each input to be pull-up, pull-down or current loop —active. Each input is opto-isolated, plus MOV and fuse protected. A web page allows you to configure the board (IP,SNMP and inputs), display the inputs state and the embedded temperature sensor reading. Then, you get the inputs state by SNMP polling or traps. I’ve been working on this for quite some time and it’s really cool.
I had one board extra (cool, especially I’ll use all of them this time) and I took the 100% e-test option. One board has a small offset in the holes, but still within the specs.
I’ll try to make a separate post about this board if I have time.
Two years ago, I spoke with a film maker who told me about the problem of manual focusing with the video enabled Canon DSLRs. As the focusing sensor works only when the camera’s mirror is down, when in video mode, with the mirror up, the camera switches into manual focusing mode, via the lens focusing ring. Several solutions exist on the market, but they mainly use mechanical links to deport the focus ring to more accessible place on the camera rig.
Some electronic solutions exist, but they use the Camera’s USB input and the focusing speed is quite low.
I decided to dig into the communication protocol between the camera body and the lens.
Canon EFS lenses are connected to the body via a 7 pin connector. Three for the power supply and four for a standard SPI serial interface (including digital ground).
Then, I bought a lens extender to be able to probe the communications on the bus. First only in parallel, dumping the data and then, I interfaced a microcontroller between the camera body and the lens:
The communication is always initiated by the camera. The lens can send a busy state by pulling the Dclk pin down (what it does after every received command as an acknowledge sign). The clock frequency is approx. 80kHz. One byte length, including the busy state from the lens, is 113us.
The camera reads the Din line state on rising edges of the Dclk line it generates. If there’s no ack from the lens, the camera will display an error after two or three tries.
The Dout line is held down when the camera generates the Dclk to read a byte from the lens on the Din line.
Being (also) a photographer myself, I had several camera bodies and lenses to test and I was able to find out some of the basic commands:
I started by making my microcontroller to repeat the commands and answers, including the busy flag management. Then, I implemented a small function that allowed me to turn the focus ring using a digital encoder. It worked ok. The problem is, every lens has different number of steps for the whole focusing range. Some have like 800, for others, it’s more 2500. It’s clear I had to increase the number of steps of the focusing ring for each of the encoder’s steps. That’s where the problems started to appear. The only solution I could come up with was to calibrate each lens at power-up by making it go across the full range of focus, counting the steps so I could use this number in my firmware.
Another problem was to make the camera generate the power supply for the lens motor when I was sending commands to it with my microcontroller, as the motor power is only generated by the camera when it has to send focus commands.
The protocol data speed is quite fast, so a powerful micro must be used, as it has to translate the commands on the fly and transmit the correct answers to the camera body (if not, the camera displays an error and stops filming). But the biggest problem was to figure out how to fit and connect my circuit to the lens. There must be an input for the command (digital encoder or potentiometer). The power supply can be external. Adding a lens extender is the easiest solution, but it changes the lens parameters (depending on its focal length, it becomes more or less a macro lens)
I settled on two cables coming from the lens, one from the camera side connector, the other from the lens circuit side. For still pictures mode, the two cables would connect together, without the interface circuit. For video shooting, the interface circuit containing the microcontroller, user input and probably a battery for lens motor drive would be connected. Each lens has to be modified to be plugged to the Follow Focus circuit.
Unfortunately, I had to stop working on this project. It was taking me too much time and I didn’t have the appropriate measurement equipment (a good digital oscilloscope with a big memory). It’s obviously a big project, especially if the result is supposed to be sold to video makers, with rugged and bug-free design. Canon could change its protocol, or increase the data speed, making the new lenses or cameras incompatible. The development requires a lot of testing, with all the possible lens/camera combinations. (whereas the price don’t come so much into account, the mechanical follow focus systems are extremely expensive and this electronic follow focus would be for the professional market).
Even if this project left me a bit disappointed, it was still interesting to try to reverse engineer the protocol and understand how the Canon lenses work. If you’re interested in taking it over, just leave a comment and I’ll be glad to help you.
After Dave’s Tektronix MDO 4000 teardown I decided to try to reverse-engineer its spectrum analyzer PCB. I used Dave’s high resolution photos (from his Flickr), my general RF knowledge and one of Dave’s post comment, by “Carlos” (helpful, thanks!).
My last work consisted of RF maintenance and design, with a large range of frequencies, so the block diagram I made shouldn’t be too off from the reality.
I think I got the most of the PCB. A lot of parts are from Hittite (RF switches, amps, VCOs and Log detector). I omitted some minor parts (DC and AC blocking for example). Unfortunately, I wasn’t able to find the I/Q analog-to-digital converter. Maybe it’s under one of the shielded cans or on an other PCB. As it’s a 10GSpS, it must have direct access to a memory of any sort, so it could be close to the main processor/FPGA.
Photo with the numbers matching the schematics (pdf, 6Mb):
Block schematics with PCB components thumbnails (pdf, 9Mb):
If you find any error or want to add comments to the schematics I made, don’t hesitate to comment!!
Just a quick informative note with my Design Rules settings for the iTead Studio PCB service, with Altium.
Electrical Minimum Clearance: 0.2mm
Routing Width: 0.2mm
Routing Corners: 2,54, 45° (not really relevant)
Routing Vias: Minimum Diameter: 0.5mm; Minimum Via Hole Size: 0.3mm Preferred: 0.35mm
Solder Mask Expansion: 0.1mm
Power Plane Connect: Conductor Width: 0.3mm Air-Gap:0.3mm Expansion: 0.5mm
Power Plane Clearance: 0.5mm
Polygon Connect: Conductor Width: 0.3mm
Manufacturing Hole Size: Minimum: 0.3mm
Hole to Hole Clearance: 0.2mm
Minimum Solder Mask Sliver: 0.1mm
Silkscreen over Component Pads: 0.15mm (actually, should be rather 0, as the silkscreen isn’t (or shouldn’t be) printed on pads)
Silk To Silk Clearance: 0.1mm
Also, don’t forget the minimum Soldermask line width is 0.1mm (for text and drawings)
Sorry for the metrical system impaired people. As you can see, these settings are a little bit tighter than the ones specified by iTeadStudio, to go along with their “6mil (recommended >8mil)” funny sentence. Well, not really, as 0.2mm are equivalent to 7.87mils but it worked for me. Maybe the 0.35mm/0.5mm vias are borderline. If you want to be sure about the results (and not get the Fab people angry), you should make it more 0.35mm/0.6mm or 0.3mm/0.7mm, as there’s a 0.09mm tolerance in the hole registration and diameter.
For Gerber generation, I use the default settings, with the 2:3 and inches option. Don’t forget to select only the layers you use (top/bottom, Silk top/Silk bottom, Solder top/Solder bottom) and the RS274X format.
If my second batch of boards have a problem, I’ll update this post.
As last advice, I’d say to not rely on your power plane connections (if you poor a power plane on your board), but to make connections with tracks first and only then poor the power plane, so you’re sure that you’re within the minimum width/spacing specs.
After I received the PCB ordered form iTeadStudio last week, I soldered the components today.
So far, everything related to the quality of the PCB looks fine. The footprints match, the FR4 substrate handles the temperature well (1 mm thick option) and the HASL finish is ok and easy to solder on. It changes from my hand-etched PCBs.
I successfully programmed the PIC with Microchip’s USB device example firmware.
Unfortunately, the board wasn’t recognized once plugged. The LEDs were blinking, but nothing in the USB device list. After some investigation and noticing that the LEDs were brighter when the board was powered by USB than with the external power supply jack, I found the problem: I have dyslexia.
Or rather, let’s say: “Don’t name you schematic nets with names that one could mix up” Indeed, in the schematics I inspired myself from, there were two different nets with very close names. One called “Vbus” and the other “Vusb” all written with caps / small caps. And of course, I connected the Vbus to the Vusb and when powered with USB cable, the 3,3V regulator was by-passed and the PIC was fed +5V directly to its “VUSB” pin.
Luckily, the PIC didn’t die, even if +5V is over its maximum voltage rating. The PCB was easy to fix by cutting a track, adding a wire and de-soldering a diode. Unfortunately now I have to be careful to not plug an external power supply when my board is plugged to a computer (no more protection preventing back feeding of current to the USB cable). Well, I should live with it.
This board is inspired form Microchip’s FS USB plug-in board. I added a Texas Instrument’s RS232 transceiver (MAX3221), three LEDs, three push buttons and connectors with the six GPIO ports from the PIC.
I’ll play with it now to see what I can do with USB and all those GPIOs.