Jump to content
IGNORED

Atari Lynx II - Raspberry Pi Install


cowdog360

Recommended Posts

Ok, so I'm going to start documenting my project of putting a raspberry Pi B+ into a Lynx II shell. I realize this has been done before, and in fact I'm using a lot of the information to make it happen.

 

My goals for the project:

 

Have a 3.5" Composite Screen for main display

Use original Lynx Controls (Working!)

User Original Lynx speaker

Install a LiPo battery and charger

Have Wifi and bluetooth modules (so I can use bluetooth game pads)
Have external HDMI out so that I can use the unit as a retrogame station with external game pads on the TV.

 

Additionally, once I build my prototype unit, I may even design a PCB that replaces the factory lynx PCB that you can just solder the PI and connectors onto to make it super clean (and maybe even re-use the factory volume knob. First step is just to hand wire it all.

 

First part is done, I've gotten my B+ and installed the latest version of RetroPie on it. I then installed Adafruit's retrogame.c program to turn the GPIO ports into a keyboard to translate the original Lynx controls.

WIred up the original Lynx flat panel connector to a 40-pin IDE cable that nicely pushes onto the GPIO header.

 

Did a test tonight with the Pi hooked up to the TV, and it works perfect! I'll document all my other steps and progress. I have ordered a composite LCD from DealXtreme (dx.com) for about $20. I'm assuming the project is going to have a cost around $100.

 

Attached is a photo of the pi connected to the original flex circuit controls.

post-42136-0-54451200-1449651130_thumb.jpg

post-42136-0-55103000-1449651131_thumb.jpg

  • Like 3
Link to comment
Share on other sites

I've been planning on doing this with a dead lynx 2 that i've had for a while and started ordering the bits to have a go.

 

Glad you've gone with a composite screen, i was reading that spi versions just can't handle the FPS required for a decent game.

 

A good idea would be to add buttons on the back for shoulder buttons, which is where i'm currently at. I don't want to mess up the aesthetics of the Lynx by doing so and for that reason have shelved it until i can figure out how i best want it configured.

 

Good going!

Link to comment
Share on other sites

Yeah, I've read the same things too, which is why I figured composite is the way to go. I was actually thinking a RPi zero would be the perfect choice for this project too. I figure my prototype will be all hand wired using a B+, but I'll make another unit with a PCB that you can just stick the Rpi zero on, and it will have all of the connectors, audio amp (maybe even the Lipo circuitry).

 

This is the screen I chose ($20): http://www.dx.com/p/2-ch-video-input-3-5-tft-lcd-display-monitor-module-w-cable-black-silvery-grey-ntsc-pal-201631#.VmhKgriDFBc

I'll use this for the Lipo Charger and 5V voltage boost ($20): https://www.adafruit.com/products/1944

Probably go with the 2500mah battery ($15): https://www.adafruit.com/products/328

 

Shoulder buttons would be nice, as would real X/Y buttons somewhere. I'll have to look into that one.

Link to comment
Share on other sites

I have a retropie setup that is literally just sat on beside my xbox all open to the air that i play various emulators with.

 

By sticking with shoulder buttons and a four way buttons for x/y wouldnt limit your game choice and make the handheld a great platform. I was also thinking about building the whole thing into a mk1 gameboy case, it fits, but damn its tight. I think the Lynx is a better platform, but it's a bit of a shitter to tear it up with the a/b/x/y, shoulder button pads. I'm not very graceful at rework like that!

Link to comment
Share on other sites

I just got my Lithium battery and charging PCB last night. Hopefully the LCD gets in this weekend and I can get this thing all built.



Looking at it more and more, I'm really thinking about building a PCB that has a socket for an RPi, audio amp circuitry, lithium battery charging circuitry, connector for lynx controls. Maybe even a USB hub.


Link to comment
Share on other sites

Gonna work on this more this week.. I have a feeling an Raspberry Pi 2 is in my christmas presents under the tree.

 

Here are some good references I'm using for the project:

http://rickybee.com/index.php?option=com_content&view=article&id=157:lynxpi-project&catid=77&Itemid=435

 

and

 

http://www.instructables.com/id/Raspberry-Pi-Arcade-Game-Emulator-in-an-Atari-Lynx/?ALLSTEPS

 

Between those two articles, almost everything is covered, but I'll cover what I'm doing as I go.

Link to comment
Share on other sites

  • 2 weeks later...

Ok, so had some progress and some setbacks. I actually decided to use a Raspberry Pi 2 instead of the B+ I had because it boots runs things a lot faster. The screen I bought from DX.com really didn't turn out that great. The text was hard to read and the video had a lot of noise in it. Instead. I decided on the 3.5" TFT car backup monitor on amazon. I bought mine from the seller Touchshop for $16.97. http://www.amazon.com/gp/product/B0045IIZKU?keywords=3.5%26%2334%3B%20tft&qid=1452188101&ref_=sr_1_1&sr=8-1

 

I think a lot of the vendors sell variations on the same screen. When I cracked mine open, the internals look different than what other people show on the web. I got lucky though, because mine runs perfect on 5V, and doesn't need any modifications to it. If you get one and it doesn't run on 5V, you'll need to bypass the internal voltage regulator, which is a little 8 PIN SMD DIP chip. On most of those regulators, you can just solder the +5V wire to pin 2 and a gorund wire to pin 8. That effectively just runs 5V right to the output leg of the regulator. Mine also has a detachable button control board, which is fantastic! That means I can easily relocate it in the Lynx body and drill holes so that I can control the screen brightness/contrast/etc.

 

I'm setting up a photobucket of all my work here: http://s1300.photobucket.com/user/cowdog360/library/lynx%20raspberry%20pi?sort=3&page=1

 

Here's the 3.5" monitor I got:

20160106_182047_zpsfngt8csp.jpg

 

On the back, you have two screws to remove, one on the left, and one on the right under the little label:

20160106_182059_zpsch5ee1jq.jpg

 

One you're in, you can see the back of the LCD, the driver board, and the button control panel. I detached the button panel, and unsoldered the 4 conductor power/av cable. It's good to have a picture to remember the order of power, ground, AV2 and AV1 (from left to right).

20160106_182310_zpsikb982bo.jpg

 

I used that blue plastic case cracker tool to carefully pry the LCD from its housing. It is attached with double sided tape, so take your time and don't crack it. You can even apply a little heat to make it come up easier.

 

Once you have it all out, it looks like this:

20160106_183705_zpsqvttof2r.jpg

 

I put mine in the Lynx with some dabs of hot glue for testing. I figure at some point i'll make some mounting tabs so I can use the original screws.

20160106_184448_zps5qruxcz6.jpg

 

I installed the Lithium battery with a dab of glue, installed a power switch and the Adafruit Powerboost 500C board in place. The power switch is wired to the powerboost's GND and EN lines. When the switch it closed, the power is off, so that means if I slide to the left, it turns on. I got lucky with my switch, it fit perfectly with no case mods. I bought it at Fry's, I'll have to note the model. The powerboost has several outputs, so the button + and - are wired to the raspberry pi GPIO header on Pin 2 for +5V and Pin 9 for Ground. You can also use Pin 6, but I already used that for ground on the controls. I also ran a pair of wires from the 5V and GND spots on the right of the powerboost for the upcoming audio amplifier. I haven't built it yet, but I wanted to have everything ran so I could get everything secured. I used more hot glue to secure the switch and the powerboost. I had to file out the hole in the case to be more square, and also thin up the wall on the plastic so a USB cable secures better. A quick test, and it all works!

20160107_085328_zpsxcl6gynx.jpg

 

Here is a shot of everything wired up for testing. The Pi is unsecured at this point. What I didn't show is that on the LCD, I wired the power (white wire on left of LCD) to the pin 2 on the GPIO header on the Pi. I wired the ground to the PP6 pad on the back of the Pi. I also soldered the AV1 output (gray wire) to PP24 on the back of the Pi. I soldered to these points instead of building a cable to attach to the 1/8" jack. I did this because I want the 1/8" jack exposed on the outside to also be able to be used for external output and I want to be able to have it covered up when not in use and not have a plug sticking out.

20160107_085315_zps6lld9bbl.jpg

 

So what's next is some work on the software to get the controls working on my Pi2 (I have them working on my B+, but need to install the software). I also need to figure out how I'm going to make USB extenders to put two USB ports above the Pi on the bottom so that the bottom of the Lynx has all the connectors to hook up external controllers, a TV, etc.

 

More to come!

Link to comment
Share on other sites

Nice. I got the same screen from ebay. But I intend to use it with PiZero for an information display in the hallway. Mainly weather, rain radar picture and bus time tables so I know if I can walk or have to run.

 

You are probably going to run RetroArch on it?

Edited by karri
Link to comment
Share on other sites

Yes, I've loaded up the latest version of RetroPie on it which has Emulationstation/Retroarch.

I'd love to get a PiZero and use the extra LCD I have to make some other gadget like that.

 

What I just realized is that the Powerboost 500C I bought will have enough current to run everything, but won't be able to charge faster than the power draw, so you really can't just use the device plugged into the wall that way. I'm betting the Powerboost 1000 would be a better fit. Although, I think for just portable use, it is fine. I still have the Pi's microUSB exposed on the bottom near the HDMI port, so if I plan to hook it up to a TV, that would be the better place to plug in. The downside is that the battery doesn't get charged at the same time. It's a learning experience for sure. It's an OK tradeoff since I'm betting I'll use it plugged in most of the time and the portable will be more of a "wow factor" thing.

Link to comment
Share on other sites

Wiring the Audio

 

Ok, so after testing everything out and getting things wired up, it is time to build an audio ampilfier circuit. I wanted something that can drive the original lynx speaker, as well as have a headphone jack and also use the original thumwheel volume control.

 

There's a super easy solution for this: Use the original audio circuitry!

 

First, I examined all of the original lynx board and schematics, and it is a pretty easy task to simply cut out the audio circuits with a dremel and retain all of the original jacks!

 

Here's a picture of the original board with the audio and commlynx secition cut out. I cut down right next to the commlynx jack and was careful to cut pretty straight across. In hindsight, I should have cut the board to save the mounting holes too, but it will be OK.

20160109_112124_zps7zwkipvs.jpg

 

Here's the sliced up audio board wired up and sitting in the case loosly for fitting:

20160109_112113_zps5jpd5uj4.jpg

 

Wiring:

 

This one is a little tricky, but not bad. I wired +5V from the powerboost and soldered the wire to pin 6 on the rightmost LM386 audio amp chip. That provides the whole circuit with 5V. For the ground, on the back I just soldered two wires to one of the capacitor legs that is on the ground plane. On the outside of the board, there is a trace that provides ground for a lot of parts, so you can just solder to any point on that. I have two ground wires, one goes to the speaker, and the other goes to PP6 on the back of the raspberry pi. Originally, I wired it to ground on the powerboost, but I got a lot of audio interference. PP6 is the ground point on the Pi's audio section, so that helped a lot. For the + line on the Lynx Speaker, I simply soldered that to one of the pins on the back of the headphone jack.

 

For audio in, I have an orange and yellow wire soldered to the - side of the caps C61 and C58 on the right of the board. You can see I removed the original caps, and soldered right in.

 

Here is a shot of all the soldering on the back. The thick red wire is the speaker + output, the thick black wire is the speaker - output and the thin black wire goes to the RPi.

20160109_112202_zpsgbdjguzs.jpg

 

Here is the back of the Raspberry Pi. I have two grounds on PP6, one for the audio and the other for the LCD screen (again the LCD screen didn't want to power up on another ground, only this one). The audio out lines are soldered to PP24 and PP25. You could just make a 3.5mm plug and plug into the Pi's jack, but remember I didn't want that, I want to use that jack for output to a TV should I choose to. The white wire is +5V to the LCD screen soldered to pin 2 on the GPIO header.

20160109_112222_zpsdkgyqwp6.jpg

 

That pretty much completes the wiring for the AV stuff. Pretty easy and fairly clean.

 

Here's the insides before I mount everything and shorten the wires up.

20160109_112059_zpsjmdzbkiw.jpg

 

Double Dragon anyone?

20160107_175519_zpsb5rhkmga.jpg

Here's what everything looks like on the top of the case. All the original ports, except a modified power for microUSB, and a switch in the brightness location. Nice and clean.

20160109_112330_zpslqrs1hw8.jpg

  • Like 7
Link to comment
Share on other sites

Got a lot of things done on the project, here's a 10 min video overview of it:

 

I'll post up some more details next here including how I wired the GPIO pins to the raspberry Pi header, and also all of the software configuration and scripts I used to make things work.

 

Here are some important things I've discovered:

 

1. The LCD screen I have now is slightly taller than the lynx cutout. Need to change resolution in software.

2. The original Lynx audio amp works, but there's a little hiss. A lot of hiss was removed by turning off audio dithering in config.txt. Also, since the amp is running on 5V now instead of the Lynx's 9V, the gain is a lot less. It's great on headphones, but the speaker is pretty quiet even at full volume. I'm going to need to switch the 16ohm stock speaker out for an 8ohm one.

3. Really need to bump up font sizes.

 

Over all, very happy with the project. Just need to finish up the external USB ports.

  • Like 2
Link to comment
Share on other sites

I'd love to do a build using:

 

Pi Zero

Original Battery tray

USB Sound card

Better amplifier circuitry than the stock LM386 amps.

Better quality LCD.

 

I think I am going to grab a $3 USB sound card since the audio would be better. I need to start finding some dead Lynxes now that it looks like some others want me to make them a variant of this project.

 

I really need to buy some calipers so I can measure everything and build some custom PCBs for the audio/power section. I also want to figure out a way to put some plastic mounts inside the case and screw everything down instead of hot glue mounting. The glue works, but I like things to be removable and modular.

 

This first revision was more of a proof of concept to me, and it turned out great. Thanks for the kind words everyone.

  • Like 1
Link to comment
Share on other sites

Wow, just found another LCD, which is a 3.5" 640x480 VGA screen. Looks like a nice alternative, but the price is really high.

http://www.ebay.com/itm/180922018470

 

The Screen/driver board part number is PD035VX2. I'm just throwing this in here for future reference. I would assume you'd also need an HDMI to VGA output adapter as well for this one to work. I wish there were some other native VGA/HDMI smaller screen options!

Link to comment
Share on other sites

Why not the PiTFT ? Is there any downside ?

 

So the issue with the PiTFT is that it uses the GPIO pins on the raspberry pi to send out the video data. By doing this, it is bypassing the Pi's graphics accelerator. Most of the emulators and games need the graphics acceleration to have good frame rates (smooth and not choppy). Therefore, your options are pretty limited if you want to run all of the emulators, or some of the higher performance demanding ones. You'd have to either use composite video out OR HDMI (and you can do VGA to HDMI adapters as well).

 

If you do use a Pi 2, it is better performing, so it might run a little better. I didn't want to take a chance on having poor performance, so I went composite. The funny thing is you can get 5" HDMI screens for about $50 -$60, but that would involve serious case modifications. I'm actually thinking about cutting up a very rough Lynx I model and putting a 5" screen in it along with more buttons.

 

I am going to offer building these for people if they'd like. I'm looking into some options for better sound and video right now.

  • Like 2
Link to comment
Share on other sites

Finishing up some more of the modifications tonight. I just took an old PC USB card, and basically hacked up the bracket and the card. I then soldered up some USB cables to the ports and connected them to the Pi. Glued the bracket in on the bottom, but I need to make some modifications for the battery door to fit on easier (it fits, but it's not easy).

 

The great thing is that now I can easily plug in USB controllers, wifi, and other things. This way I don't have to leave dongles inside sucking up power. This one is turning out pretty good!

 

20160112_210102_zpsswqqjubj.jpg

 

And as promised, here's another video talking about the insides of the project:

Edited by cowdog360
  • Like 1
Link to comment
Share on other sites

 

So the issue with the PiTFT is that it uses the GPIO pins on the raspberry pi to send out the video data. By doing this, it is bypassing the Pi's graphics accelerator. Most of the emulators and games need the graphics acceleration to have good frame rates (smooth and not choppy). Therefore, your options are pretty limited if you want to run all of the emulators, or some of the higher performance demanding ones. You'd have to either use composite video out OR HDMI (and you can do VGA to HDMI adapters as well).

 

Thanks, good to know.

Link to comment
Share on other sites

Cowdog360,

Great project, I would love to do this!

Are you able to post a parts list and some blow by blow instructions for a novice.

Cheers

Russell

 

Hey there, I will go ahead and post up a complete how to. I mentioned a little bit above the other two blogs I got a lot of info from, but I really want to consolidate what I've done. In the meantime, here is my current parts list:

 

Atari Lynx II Shell - Owned existing

Flat panel Ribbon connector - From existing Lynx board

Audio Amplifier circuit with 3.5mm jack and wheel potentiometer - From existing Lynx board

Raspberry Pi 2 - $35

3.5" Composite TFT Car backup monitor (Amazon, Ebay) - $17

32 GB Class 10 Micro SDHC Card -$15

Adafruit 2500mah flat Lipo pack w/JST connector - $15

Adafruit Powerboost 500c charger (I'd change this to the 1000c ) - $15 - $20

40 pin IDE cable - Salvaged from junk bin

Edimax Wifi USB - $10

Philmore slim power switch - $2

USB Keyboard for setup - Owned existing

2 USB cables to cut up and attach as external ports - Used old iphone cables

Dual USB port with bracket - Used old PCI USB card from junk bin

Hookup Wire

Electrical Tape

Hot Glue

Shrink tubing (various sizes)

Solder

 

Optional parts:

Replacement 8ohm poly speaker - $5

 

You're looking at an entry cost of about $95 if you have some of the things already on hand like I did. If you have to buy a dead lynx and other parts, it goes up from there.

I am going to make some revisions to mine, which would include a $3 USB sound card, maybe another $3 for a class D digital amp, and a custom PCB for the new audio section (probably about $5). Over all, it is about a $100 project to do plus your time of course.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...