Tuesday, 23 August 2011

Experiments with PS2 controller, HD44780 and nRF24L01+

Once in a while my robot project gets into surface. This time I decided to get back into bottom(s) up design, and build a remote to it. I took the parts which were already in my drawers;
  • Atmel Atmega8 for CPU
  • HD44780-compatible LCD, 8x2 chars of GUI
  • PlayStation 2's Dualshock controller as input device
  • Connector from PS2 extension cable for interfacing the controller and board
  • nRF24L01+ module to transfer the command and conquer data wirelessly
The idea in nutshell is to be able to read the PS2 controller by Atmega8, display the control data by LCD and transfer it to the mr Robot by nRF24L01+. After drawing the draft of schematics, I tried a new wiring technique for me; making connections with a thin enamelled copper wire by a pencil, and soldering it directly through the insulation. More of that on next post.
I rewrote my HD44780 driver code using a original Hitachi data sheet and after debugging and rewiring the mixed D6 and D7 lines it had a visible output. The PSX controller code was also a nice learning experience in firmware and hardware debugging, but it finally worked very well. Luckily the protocol and interface are well documented, so I could blame for troubles only myself. Perhaps next time I will first double check the port assignments, as it is much better to use PINC port for reading pins in port C, instead of PIND, which was used in my original code:-)
The nRF24L01+ driver part is still in progress and actually completely untested, which can be witnessed from the board too, as there is no <3.3V power supply even wired for it. The power source needs some re-evaluation as a whole. I planned to use a 9V battery and a simple pair of L7805 and 78L33 for 5 and 3.3V rails. But this might also be a nice test bench for BL8530 step up converters I have waiting for a inspirational SMD SOT-89 soldering session. Well, currently the whole system is powered by the USBASP-compatible programmer.

Underside, logic level connections done mostly by the 0.1mm enamelled copper wire. The connections may look a bit scary, but they work.

No comments:

Post a Comment