Well its been another long time since I've updated. I haven't done a thing with that PS2 controller. Much of my effort has been centered around getting the Milwaukee Robotics Club up and running. The first club contest will be Mini-Sumo.
To that end I've been working on getting a detection scheme working that I saw many years ago in Atlanta on the robot Delta Force. Tonight I got the two high-power LEDs running 1.32Amps for 10us, 300 times per a second. And they didn't burn up! It was tough to get higher than that. I ran them with a variety of current limiting resistors and found that the lower the resistance the less voltage the resistor would drop. I think it is likely that I'm not turning my FET on all the way. They are supposed to be TTL compatible, but maybe just barely. Or possibly the voltage drop of the LED starts to get wonky at these high current levels. Still 1.32 Amps is good enough. The sheet says they are rated for 2 Amps for 10us, 300pps.
The detection circuit was much tougher. I don't fully understand the circuit he is using. I am pretty sure that the first stage is a current to voltage converter and the second stage is a regular voltage non-inverting amplifier. However, there are clearly AC aspects to the circuit and those are a bit beyond me. I think the circuit is designed to pick up the momentary current flow that results when the photodiode changes capacitance due to incident light. On my bread-board I was able to get it pretty much working but with only a half to one volt change with a 1 volt bias. I messed about with the circuit quite a bit to try to get a higher voltage swing out, but all I did was demonstrate my ignorance of the fundamentals behind the circuit. Worse, later I *think* discovered a serious wiring error even though the circuit seemed to have been working. After correcting it the circuit seem to have a strange warbling noise that was not present before. However, the circuit seemed to still function, just with the noise added in. It was starting to get late so I left off.
I think my next step is to either make an etched pcb for the detection circuit or do point-to-point on one of Eddy's nice prototype boards. Bread-boards are super great for messing about with the structure of a circuit. But, they are sloppy. Things pull out of the sockets under the weight of o-scope probes, leads get pushed down and into other leads they are not supposed to touch and there is stray capacitance aplenty. And anyway, as was made apparent to me tonight, I am not qualified to mess about with the structure of this circuit. With a soldered-up etched or point to point circuit I am hopeful that I'll get better results.
Tuesday, January 27, 2009
Thursday, August 28, 2008
PS2 Controller no worky
Well, last session I got the code into the MCU and got the receiver attached to the MCU. However, I could not get the receiver to respond to my SPI requests at all. A bunch of the session time was spent diagnosing what I was transmitting however. I had the bit order wrong. I was going at the maximum 500Khz which probably wasn't so good on a bread-board with all it's capacitance. I had a code path which didn't manage the slave select properly.
I was able to see all this on Tom's nifty LogicPort usb analyzer. Oh, yea, it took a while to figure out how that software worked too.
However, I worked through all those issues and got what I was transmitting to look pretty good before the session was over. However, still no replies.
I have two things I want to investigate next time:
I was able to see all this on Tom's nifty LogicPort usb analyzer. Oh, yea, it took a while to figure out how that software worked too.
However, I worked through all those issues and got what I was transmitting to look pretty good before the session was over. However, still no replies.
I have two things I want to investigate next time:
- I am mixing 3.3V and 5V tech here. Now, the logic analyzer was set to 1.5V logic so I would have seen any response from the PS2 controller on the LogicPort even if the MCU didn't see it. However, the notes I'm reading say only some of the PS2 controllers are good at 5V whereas others won't work at all. I need to suck it up and slap down the transistors I need to do the voltage conversion properly. I should also look into using the ATmega48/88/168 which will run at 3.3V no problem. However, the code is setup for the ATmega32 core at the moment and it will take less time to plop down the transistors than switch the code to the newer cores.
- One odd bit I noticed about the slave select: it selects long before it sends any data. In fact about half the time the the device is selected, no data is sent at all. Most of that time is before any data is sent. I'm not sure what my code is doing to cause such a delay but I should look into the issue against the possiblity that being selected so long with out data angers the reciever.
Wednesday, August 13, 2008
PS2 Controller

Going to try to start blogging regularly again. I think its a good habit. Anyway, I'm working on my Robomagellan again. Towards that project I've been working on communicating with a regular Sony PS2 wireless controller.
When I got the controller I decided that I did not want to bust out the receiver from its plastic case and solder to the connections inside directly. I found a place that sells repair parts for the PS2 console and bought a controller/memory card socket module for $20. There were two controller receptacles in the module and a circuit board. I de-soldered the circuit board and sawed the module in half netting me two sockets. The socket you see above has had junk desktop computer wires soldered back to it and all plugged into a long pin length 0.1" header to make it compatible with a ordinary solderless breadboard. I'll use this to debug the controller interface software I've written. The socket I will eventually mount on to my own custom circuit board for integration with my robot.
Wednesday, October 24, 2007
Fall Chibotica 2007 at iHobby Expo is finished!

Well Fall Chibotica 2007 is finally over. Months of effort culminated in a pretty great show. I hope we get invited back. The combat side went the worst in the planning stages and yet they got invited back immediately. Go figure.
Things went wrong during the show to be sure. Chibotica definitely had creeping contestitis. We were so far behind our schedule it wasn't funny. Its a good thing three contests were canceled due to lack of participants. Next year we'll spread it out over both days and maybe even run some some loser brackets during the trade only days.
Scotty and Mike Overstreet have some good footage of the show.
I'll be glad to get back to some regular robot time for a little while. At least until Spring Chibotica starts getting hot. The bi-annual schedule kills me. Calkins wants to do RoboGames once a quarter. I can't even imagine.
Anyway, I want to revive my Robomagellan dreams, do some good humanoid balance and gait work and make a decent Mini-Sumo with my secret weapon. I'll consider myself lucky if I get one of the three done in '08.
Tuesday, July 24, 2007
RoboGames

Has it been so long since I've posted? Amazing.
I'm back from RoboGames (long since, actually). It was a blast! So many pictures. I've been so busy with work and trying to organized my own little robot competition that I have neglected my duties here. I won two bronzes at RoboGames 2007. One for Robo-One Wrestling and one for Robo-One demonstration.
I had the opportunity to give Dave Calkins one of our medals in thanks for his inspiration to build our medals in the first place. I hung out with the Robo-One guys quite a bit and even convinced Matt Bauer, a particularly good Robo-One Builder, to come to Fall Chibotica. I'm really going to enjoy going back in 2008! We had four Chibots members there this time! My hope is to go as Team Chibots in 2008. That would be the bomb!
Thursday, May 17, 2007
Laboratory Night
I've decided that my robot building sessions need to be scheduled if I'm to make any progress at all. Usually I just do fits and starts of intense robot building that result in poor robots. I had my first official laboratory night tonight. However, I need to move it to Tues. to align with my gf's late work night.
It should be noted that it is "La Bore A Tory" and not "Lab Ra Tory". The difference is important.
It should also be noted that one can get lab coats with one's name embroidered for about $35. I'm seriously considering getting one. If the night is to be official I need official garb, naturally.
In any case above is the results of my first night. I built this step up converter out of the simple, but not widely available MAX856 and Eddy's new prototype board. Eddy's prototype board is kinda cool in that it some what mimics the layout of a regular breadboard. I wound up with about as many jumpers as one would on a breadboard, but I also didn't need to glob together pads with cold solder. It is a pretty nice board. I had just recently tried to build this circuit with a traditional isolated pad prototype board and, not unexpectedly, it did not work. Who knows where a glob went wrong? This board worked perfectly on the first try.
I'm going to see what else I can cram on the board. I'd like to use it on my upcoming mini-sumo.
Saturday, May 12, 2007
Spring Chibotica 2007 a Success!
Tuesday, February 13, 2007
More Sponsored Material

The PCBs from Advanced Circuits came in and they look great! Thanks a bunch, Advanced Circuits!
With all the sponsorship so far, the cost of the medal has fallen to $7.81!
I'd also like to thank our other sponsors Rick Buesing, Tom Gralewicz, Terry Surma, Wright Hobbies, Merkursets, Robots Dreams, and once again Atmel.
Friday, January 26, 2007
Thursday, January 18, 2007
Chibots Digital Medal
The design is a success! All five prototype medals worked perfectly on the first try. They look great! With sponsorships and donations the cost is at $12.10 per a medal and is falling as more donations come in. I'm really excited to be able to deploy this medal to the club! I can't wait to award the first one!
Friday, December 22, 2006
I put the LEDs in and put it in a 1/3 drop resin medal. Red for this prototype. I'll make white and blue medals as well. I ended up going with 180 ohms in the reds after all. That brings them to just at 20mA whereas on the white LEDs its more like 14 or 15mA. The whites actually seem a touch brighter than the red even so.Overall the effect is wonderful. In the picture the area around the LED is saturated but it looks great in person. Woot!
Success for the Serial Medal
The very first PCB for the serial medal worked flawlessly on the first attempt! I know it looks a little screwed up in the picture, but that is because of my crappy cell phone camera's very slow shutter speed. Anyway, I am terribly excited! This thing is finally coming together. I need to run out to get resistors for the red LEDs I want to put in it. 180 Ohms works great for the white LEDs but the reds have a much lower voltage drop. And I probably need to snag some 47s for the row selectors as I just had 58s on hand. Although, it looks fine with 58s.To be certain I need to make up the other four boards and sit on them for a few days to be sure they are stable. Assuming that goes OK the next step will be to finish the work up on the Bill of Materials. I'm pretty sure I'm going to need some sponsorship to get the cost under $15 per a medal. However, I have high hopes for getting the PCBs themselves sponsored which may land me right in the $13 range.
Sunday, December 17, 2006
Brazing

I gave aluminum brazing a shot this weekend. Its pretty cool really. I got a pound of rods from DuraFix. (Check their sales video. Another company that sells the stuff and also has a video is Aluminum Repair.) I also picked up a mapp gas torch kit from a hardware store. The idea is that you get the aluminum up to a certain temperature such that the silver alloy in the rods will melt, but the aluminum itself won't. The alloy act as a sort of metal glue.
It turns out that the metal needs to be pretty clean and further it has to be cleaned the right way. A stainless steel brush was provided with the rods but I soon discovered you really need two: one for pre-cleaning and one for manipulating the alloy while hot. To to make a joint its a good idea to tin both sides.
It also turns out that mapp gas is plenty hot enough to melt aluminum. I slagged a couple of pieces before I got the hang of it. Probably need to back down to propane or even butane.
After around five or six attempts I got a pretty strong joint. Its the one in the picture. I managed to crack the joint open but it's still pretty strong and it took a hell of a beating just to get to that point. To be able to make that strong of a joint with a couple hours practice is pretty cool. Supposedly, after I master the techniuqe the joints will be stronger than the original metal.
I figure this brazing thing can be very useful for making custom aluminum chassis for my robots. When it comes time to make my RoboMagellan bot water tight I think I'll be using this technique.
Anyway I just wanted to do a quick post with a couple links. Sorry its not longer and doesn't share the experience more in depth.
Saturday, December 09, 2006
The Serial Digital Medal PCB Layout
However, the last layout took about a week and a half of work to get it 100% routed to where I was happy. This board auto-routed fully on the second placement attempt. I still needed to do some manual re-routing but nothing too serious. Plus, all the normal lines are 10 mil and the power lines are 15 mil. Each chip has its own 0.1uF anti-noise cap to boot. I'm hopeful the intermittent noise and dust problems of the past will be gone from this design. I'll still probably get it a good solid flux cleaner bath though.
Chances are I'll put PCB layout in today or Monday. I kinda wish I could have them for tomorrows meeting, but that meeting is going to be busy anyway and I absolutely don't wont to rush this. Rushing was a big factor in all the mistakes of the previous version of the medal.
This is starting to get exciting again!
Serial Digital Medal now on ATtiny45

So the medal is now working off of the ATtiny45 instead of the ATmega32. You can see the 8 pin DIP just to the left of the red dip switch. The display is working great with no glitches. I'm not sure what caused it before but if the problem doesn't come back I should be good. It might have been a loose connection or something. There are a lot of wires for this circuit.
In the picture the text looks pretty bad, but its really my cell phone camera. In real life the display is perfect. I still can't find my good 3MP cannon. :(
If you look to the lower left in the picture you'll see two more ATtiny45's. Those are the two MCUs I bricked before realizing that the programmer was still set to ATmega32. I wondered why the display started out slow and then actually got SLOWER when I set the fuses for a faster clock. Doh! I hope someone in the club with an STK500 can get them back for me.
Wednesday, December 06, 2006
Serial Digitial Medal working!
So the problem with the breadboarded serial medal was that the data and the strobe line was backwards and I had shifted the pins connections by one on one of the displays. Nothing that required an o-scope/logic analyzer at all. If I had bother to trace the lines I would have found it. Once I fix the problem the code started working pretty well. Oh well, the device I bought looks fairly neat. At the very least the software is super simple to use.
The breadboard is still using the ATmega32 at the moment but there is not much logical difference in this case. Still, to be safe I will through the ATtiny45 in there before I put the board order in.
Also the display isn't perfect. It does seem to glitch some times on the capital letters. It doesn't look too terrible, but I'd like to figure it out. It seems to be associated with the character rather than a particular location on the display. So it could be the algorithm. Overall it still looks good even with the glitch.
The breadboard is still using the ATmega32 at the moment but there is not much logical difference in this case. Still, to be safe I will through the ATtiny45 in there before I put the board order in.
Also the display isn't perfect. It does seem to glitch some times on the capital letters. It doesn't look too terrible, but I'd like to figure it out. It seems to be associated with the character rather than a particular location on the display. So it could be the algorithm. Overall it still looks good even with the glitch.
Tuesday, November 28, 2006
The Serial Digital Medal Design

So I mentioned before that, to reduce cost and pin count, we were changing the digital medal design over to some serial driver chips. I'd like to talk about the new design a little.
The big cost saver is the ability to use the ATtiny45 (2.13USD Qty: 1) instead of the ATmega32 (8.28USD Qty: 1). Previously, the driver chips that we were using were really just gangs of transistors. Each transistor had an input and output pin. Hence the MCU pin count requirement to operate the chips was high and forced us to the ATmega32.
After some searching our members came up with transistor arrays that, instead of individual transistor inputs feature a clocked serial data input line that feeds into a shift register and a strobe line that latches the shift register bits up to the (now internal) transistor inputs. Additionally the chips feature a serial data out line that leads away from the far side of the shift registers. The source driver, U1 in the schematic and used to select rows in the 5x7 LED matrix displays is the MIC5891. The sink drivers, U2 and U3 in the schematic, used to select columns, are two A6821's.
So in the new design the three driver chips and the MCU are daisy chained: Serial Data Out connects to Serial Data in, one chip after another with common clock and strobe lines. From the point of view of the MCU this forms a single shift register that is 24 bits wide. The first two bytes shifted out become the column selectors and the final byte becomes the row selectors. The idea is for the MCU to clock out three bytes, hit the strobe and then repeat. This basic scheme uses a mere three pins to reset the state of all row and all column selectors and is why the ATtiny45 will work.
Of course, this is just the design. I have the circuit fully breadboarded up and can see the clock, data and strobe lines popping away at the first chip in the daisy chain, but nothing is coming out of the other side of the shift register on its Serial Data Out line. Most likely this mean that something is wrong with the clocked data that the MCU is emitting and thus the first chip isn't properly receiving the data in the first place. I only own voltmeters so it is hard to tell what is wrong with the signal. I've ordered a cheap O-scope/Logic Analyzer from Hobby Lab that should help me out. It should present me with timing diagrams of the signals on clock, data and strobe lines that I can then compare to the example timings in the data sheets for the chips. Hopefully there will be something I can do to correct the signal. My concern is that since I'm using the Bascom Shiftout command, that the only solution will be to shift to C for greater control of the timing. Maybe it won't suck too bad if I really do have to port the code though.
Monday, November 13, 2006
Chibotica Fall 2006
Chibotica went pretty well. The turn-out was lower than I had hoped for. To my knowledge we only got one person from iHobby Expo. Still, I'm convinced the the Outreach program is the right thing to do. If I can convince the member to have our next fall contest at iHobby Expo, I think we will be quite well attended.
But again the show itself was very fun. The Mini-Sumo especially was dramatic. Its great that Mel's grand-daughter won it. I wish I could have given her a medal as reward. But oh well.
But again the show itself was very fun. The Mini-Sumo especially was dramatic. Its great that Mel's grand-daughter won it. I wish I could have given her a medal as reward. But oh well.
Monday, November 06, 2006
Digitial Medal Super Funness!
Well, I'm still working on the damn digital Medal. I have one fully working. It looks great actually. (I'd post a pic but I can't find my camera) But of course, we are going to change the design. The board is just not stable. I had one that worked great after construction but then it failed a couple of days later. It improved a lot with a alcohol bath. So at least part of my problem is just dust and debris. I need to buy flux cleaner so I can clean these boards too.
However, my ability to experiment further is limited because I have no good boards left. Basically i can try to repair one malfunctioning board. I will do that, but it won't bring me the confidence that I truly know what is going on with the boards. I am NOT going to order more boards. At $95/five they are just too expensive.
Anyway, another problem with the board is that it is expensive. The massive number of pins required on the MCU means that a ATmega32 is required. However, the MCU can't drive the LED matrix directly so driver chips are required. Some of the members rounded up some driver chips that take a serial input and can be cascaded. This means that the MCU now only needs three pins instead of 22. So we can go from an ATmega32 to an ATtiny45. Its a pretty big savings.
However, my ability to experiment further is limited because I have no good boards left. Basically i can try to repair one malfunctioning board. I will do that, but it won't bring me the confidence that I truly know what is going on with the boards. I am NOT going to order more boards. At $95/five they are just too expensive.
Anyway, another problem with the board is that it is expensive. The massive number of pins required on the MCU means that a ATmega32 is required. However, the MCU can't drive the LED matrix directly so driver chips are required. Some of the members rounded up some driver chips that take a serial input and can be cascaded. This means that the MCU now only needs three pins instead of 22. So we can go from an ATmega32 to an ATtiny45. Its a pretty big savings.
Thursday, October 26, 2006
Still More Digital Medal
Weirdness.
Having missed all my deadlines for the medal I can now relax and go back to the drawing board to get the stupid thing right. I have breadboarded the entire circuit to see where I went wrong.
I got the same sort of weird errors on the breadboard. That's good from a troubleshooting perspective. When I traced it back I came all the way to the MCU pins. Some of the MCU pins can't hold an Active High under any condition except open. The inputs to the ULN2803A are decently high impedance I think. But some of the MCU pins can do it. Others can.
I may have been mis-handling the MCUs the whole time and destroying outputs at random. That could explain what I've been seeing in all my prototypes. I'm going to swap MCUs tonight and see if the symptoms change.
Having missed all my deadlines for the medal I can now relax and go back to the drawing board to get the stupid thing right. I have breadboarded the entire circuit to see where I went wrong.
I got the same sort of weird errors on the breadboard. That's good from a troubleshooting perspective. When I traced it back I came all the way to the MCU pins. Some of the MCU pins can't hold an Active High under any condition except open. The inputs to the ULN2803A are decently high impedance I think. But some of the MCU pins can do it. Others can.
I may have been mis-handling the MCUs the whole time and destroying outputs at random. That could explain what I've been seeing in all my prototypes. I'm going to swap MCUs tonight and see if the symptoms change.
Subscribe to:
Posts (Atom)







