Updates on three different fronts
At roughly the same time a couple of weeks ago, I received my turret board and main boards back from OSHPark. I was busy with other stuff but finally did solder my main board up with a voltage regulator and DIP sockets for the microcontroller and motor controllers.
It took me quite some time and I had to bodge the reset line but finally I did get my FTDI board to program the chip sitting on my PCB and make a light blink. This was a first for me, programming a standalone ATMega328, and it felt pretty great. Mistakes made here were: the capacitor on the reset line was too small (I had better luck with a 1uF cap), the resistor on the reset line was inline instead of a pull-up (I keep doing that!), and a jumper was required to make my FTDI work at 5V (I had thought that the jumper was optional, for selecting 3V. This explains why I had never before been able to program anything with my FTDI board. Doh.)
After that success, I pretty quickly figured-out that my motor controllers had no power. Their motor-power pins were connected to each other but not anything else. [Incidentally, while I was attempting to power motors with no motor-power, the motor controller IC got very hot.]
So, I guess, in KiCAD, a net doesn't necessarily have to be completely interconnected? It's likely my own problem rather than a fault with the software. I know I'm missing something fundamental, here.
I bodged a wire onto the motor-power pin and then the tank-tread motors did turn, just barely. I had known that I should have increased the motor-power trace widths, I just hadn't done it. Oh well. So I spent a few hours last weekend laying-out a new main board, with increased width for motor traces, a ground-plane and heat-sink near the motor controllers, and fixing the above-mentioned mistakes with the reset line.
I forgot to put in mounting holes, so I'll need to add those. I'll also need to carefully inspect the laid-out board to make sure everything is connected as it should be.
So much for the main board. The turret board came out looking very nice with its breakoff camera mount section. I think that I could specify that the entire thing should be cut in half? I was worried that perhaps one section or the other would be lost. As it is, I will have to dremel-away the camera mount section. But that's all assuming that it works perfectly and I'm in no danger of that anytime soon!
I quickly realized two problems: The six-pin footprint I used does not use 2.54mm spacing and so my boxed header would not work. The second is that the my Wiicam footprint is still slightly off, so the alignment bulges on the camera did not quite line-up. To solve the first problem, I just soldered solid-core wire to the pads, instead of using pin headers. For the second, my trusty Dremel saved the day.
So, I soldered up the first board, made sure that the power was correct (I thought that the camera required 3.5 volts ... I only had so many resistor combinations for my configurable voltage regulator, so I settled on 3.8 volts) and .... no worky. After some attempted troubleshooting, including trying to measure signals with my new oscilloscope (Oh, did I mention that I got an oscilliscope off eBay? I have no idea how it works.), I ended-up soldering a camera to a second board, and hooking that camera up to my Arduino and a crystal on a breadboard, and ... it worked. Which was a great relief but it only demonstrated that my breakout-board worked. The circuit I built to drive the camera was not working and I didn't know why. So, I started swapping lines, one by one, between my Arudino and breadboard, and the original PCB. Double-checking schematics on the Internet, I saw that the camera is supposed to run off of 3.3V, not 3.5 (and I had been running it at 3.8). Doh. Swapped some resistors and I had a 3.1V. More swapping. More troubleshooting. One thing I discovered was that the clock line was sensitive. Sticking a bare wire into a copper through-hole with no solder just did not do the trick. I had a mess like this (and worse):
I was able to demonstrate that the I²C lines were working (Thank God, there aren't any components on them between the camera and the Arduino. I do have pull-ups on the board but haven't soldered them in, yet.) and also the clock was working. So it's something to do with the power? It seemed also that connecting the reset line to my 3.1-ish power supply wasn't working, which is strange. So I ordered some resistors to configure my LM317 voltage regulator to a proper 3.3 volts. Then I ordered some static 3.3V regulators. One way or another, I'll get proper power to my camera. So it's sorta discouraging that I don't have a properly working independent camera PCB, yet. But, if it's just a power issue, I'm sure I can figure it out.
It's hard to know how quick-and-dirty you can be with these things. I figured being .3 or .5 volts off target wasn't so bad (and, still, I'm not sure that it is). Some people build these Pixart circuits with 3.3V/5V logic convertors and then I saw that some people were not using them. And, indeed, it seems like it is not necessary. Maybe these things matter more if you desire hours of stable operation (which reminds me: using up one of my micro-controller pins to control a transistor that switches on and off power to the turret board may not be such a bad idea).
One other problem with my turret board was that the clock was not connected to 5V. It's 5V pin was connected to the IR transmit connector which was in turn connected to ... nothing. This is the same problem I ran into with my main board. The issue is that I have a single power-in connector that should drive that net across the entire board. But KiCAD thinks that connecting a 5V label to anything else with a 5V label is sufficient. I thought that I had addressed this with a power flag on the driving pin but apparently not. Again, I know that this issue is due to my own lack of understanding but it's extremely frustrating nevertheless. Maybe I shouldn't use labels but instead explicitly map-out the wires? I think that I should at least explicitly map out the power circuit. Also, I need to spend some time double-checking my board layout, instead of excitedly sending away for a board.
So, that's where I'm at. I'm nearly ready to send away for version 2 of my main board. And I have some more work to do before ordering-up version 4 of my turret board (really, version 3, since version 1 was a test piece that did not incorporate the Pixart camera).
The final area I've been working in was the turret gear that I modeled and had printed. I got my order back from Shapeways and it mounted right up! It works but it is noisy! I think that the original gear was noisy, but this one is far noisier. There is some definite vibration happening with the turret. The original gear did not fit snugly but I think that there is ever-so-slightly more tolerance with this one. I think that this will be helped with a little weight on the turret (just my electronics package should help somewhat). But also I think that I can make both the tolerances somewhat tighter, by increasing the diameter of the ring and of the gear itself (the mounting holes are perfect as is). This is something I'll work on whenever I'm waiting for boards or such. The turret gears that I have (both my hacked-up versions and the 3D-printed one) do work as is, so it's not critical right now.
One final thing, here is my new (used) Tektronix 465B scope, in all its glory:
Even though I have barely any idea how to use it, I already did get some value from it, as it helped me when I was trying to figure-out if I had a working clock signal.
It took me quite some time and I had to bodge the reset line but finally I did get my FTDI board to program the chip sitting on my PCB and make a light blink. This was a first for me, programming a standalone ATMega328, and it felt pretty great. Mistakes made here were: the capacitor on the reset line was too small (I had better luck with a 1uF cap), the resistor on the reset line was inline instead of a pull-up (I keep doing that!), and a jumper was required to make my FTDI work at 5V (I had thought that the jumper was optional, for selecting 3V. This explains why I had never before been able to program anything with my FTDI board. Doh.)
After that success, I pretty quickly figured-out that my motor controllers had no power. Their motor-power pins were connected to each other but not anything else. [Incidentally, while I was attempting to power motors with no motor-power, the motor controller IC got very hot.]
So, I guess, in KiCAD, a net doesn't necessarily have to be completely interconnected? It's likely my own problem rather than a fault with the software. I know I'm missing something fundamental, here.
I bodged a wire onto the motor-power pin and then the tank-tread motors did turn, just barely. I had known that I should have increased the motor-power trace widths, I just hadn't done it. Oh well. So I spent a few hours last weekend laying-out a new main board, with increased width for motor traces, a ground-plane and heat-sink near the motor controllers, and fixing the above-mentioned mistakes with the reset line.
I forgot to put in mounting holes, so I'll need to add those. I'll also need to carefully inspect the laid-out board to make sure everything is connected as it should be.
So much for the main board. The turret board came out looking very nice with its breakoff camera mount section. I think that I could specify that the entire thing should be cut in half? I was worried that perhaps one section or the other would be lost. As it is, I will have to dremel-away the camera mount section. But that's all assuming that it works perfectly and I'm in no danger of that anytime soon!
I quickly realized two problems: The six-pin footprint I used does not use 2.54mm spacing and so my boxed header would not work. The second is that the my Wiicam footprint is still slightly off, so the alignment bulges on the camera did not quite line-up. To solve the first problem, I just soldered solid-core wire to the pads, instead of using pin headers. For the second, my trusty Dremel saved the day.
So, I soldered up the first board, made sure that the power was correct (I thought that the camera required 3.5 volts ... I only had so many resistor combinations for my configurable voltage regulator, so I settled on 3.8 volts) and .... no worky. After some attempted troubleshooting, including trying to measure signals with my new oscilloscope (Oh, did I mention that I got an oscilliscope off eBay? I have no idea how it works.), I ended-up soldering a camera to a second board, and hooking that camera up to my Arduino and a crystal on a breadboard, and ... it worked. Which was a great relief but it only demonstrated that my breakout-board worked. The circuit I built to drive the camera was not working and I didn't know why. So, I started swapping lines, one by one, between my Arudino and breadboard, and the original PCB. Double-checking schematics on the Internet, I saw that the camera is supposed to run off of 3.3V, not 3.5 (and I had been running it at 3.8). Doh. Swapped some resistors and I had a 3.1V. More swapping. More troubleshooting. One thing I discovered was that the clock line was sensitive. Sticking a bare wire into a copper through-hole with no solder just did not do the trick. I had a mess like this (and worse):
I was able to demonstrate that the I²C lines were working (Thank God, there aren't any components on them between the camera and the Arduino. I do have pull-ups on the board but haven't soldered them in, yet.) and also the clock was working. So it's something to do with the power? It seemed also that connecting the reset line to my 3.1-ish power supply wasn't working, which is strange. So I ordered some resistors to configure my LM317 voltage regulator to a proper 3.3 volts. Then I ordered some static 3.3V regulators. One way or another, I'll get proper power to my camera. So it's sorta discouraging that I don't have a properly working independent camera PCB, yet. But, if it's just a power issue, I'm sure I can figure it out.
It's hard to know how quick-and-dirty you can be with these things. I figured being .3 or .5 volts off target wasn't so bad (and, still, I'm not sure that it is). Some people build these Pixart circuits with 3.3V/5V logic convertors and then I saw that some people were not using them. And, indeed, it seems like it is not necessary. Maybe these things matter more if you desire hours of stable operation (which reminds me: using up one of my micro-controller pins to control a transistor that switches on and off power to the turret board may not be such a bad idea).
One other problem with my turret board was that the clock was not connected to 5V. It's 5V pin was connected to the IR transmit connector which was in turn connected to ... nothing. This is the same problem I ran into with my main board. The issue is that I have a single power-in connector that should drive that net across the entire board. But KiCAD thinks that connecting a 5V label to anything else with a 5V label is sufficient. I thought that I had addressed this with a power flag on the driving pin but apparently not. Again, I know that this issue is due to my own lack of understanding but it's extremely frustrating nevertheless. Maybe I shouldn't use labels but instead explicitly map-out the wires? I think that I should at least explicitly map out the power circuit. Also, I need to spend some time double-checking my board layout, instead of excitedly sending away for a board.
The final area I've been working in was the turret gear that I modeled and had printed. I got my order back from Shapeways and it mounted right up! It works but it is noisy! I think that the original gear was noisy, but this one is far noisier. There is some definite vibration happening with the turret. The original gear did not fit snugly but I think that there is ever-so-slightly more tolerance with this one. I think that this will be helped with a little weight on the turret (just my electronics package should help somewhat). But also I think that I can make both the tolerances somewhat tighter, by increasing the diameter of the ring and of the gear itself (the mounting holes are perfect as is). This is something I'll work on whenever I'm waiting for boards or such. The turret gears that I have (both my hacked-up versions and the 3D-printed one) do work as is, so it's not critical right now.
One final thing, here is my new (used) Tektronix 465B scope, in all its glory:
Even though I have barely any idea how to use it, I already did get some value from it, as it helped me when I was trying to figure-out if I had a working clock signal.
Comments
Post a Comment