Go Back   Hardware Canucks > PC BUILDERS & TWEAKERS CORNER > Case Mods, Worklog & Gallery

    
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old March 26, 2015, 08:35 PM
Arinoth's Avatar
Moderator
F@H
 
Join Date: May 2009
Location: Halifax
Posts: 8,927
Default Sega PC Mark II

It's about that time to finally start posting about my second attempt at moding a Sega Genesis Version 1 case and sticking a mITX PC into it.

This time it will be greatly different then last for multiple reasons.
  1. I will be using proper tools to cut the backing as well as anything else within the case to ensure the items can proper fit, this is a change from using a handsaw last time which...didn't turn out that professional looking...
  2. Everything will 'work' on the Sega Genesis as if it were a real Genesis:
    1. The volume slider will change the volume in Windows
    2. The power button and reset buttons will be usable, there will be a conversion of the pole switch to push button.
    3. Headphone jack will operate correctly.
    4. The controller ports will convert controllers into USB controllers.
    5. LCD Screen that will show the Sega Genesis Logo on bootup of the PC, also play the SEGA bootup music we all know and love.
    6. LCD Screen that will show/cycle through sponsored images when the PC is on
    Probably a few more things too that will be added later on.

The list of the PC parts is still changing, as it will depend on what the sponsoring Real Hardware Reviews gives me to work with. I will update that when it keep changing and I have the parts in my hands.

To accomplish half of the tasks mentioned I will be using an Arduino to do some of the 'heavy' lifting. This is a perfect segway into what I have accomplished so far with the electronics sides of things.

The slider was one of the easier things to start with, as it is just hooked up to the Arduino's power source, ground, and to an analog input port. As it ranges from 0 to 1023 I need to drop this down to the number of 'steps' that the PC can boost the volume at. Turns out a volume increase or decrease command or keyboard event changes it by a value of 2 rather than one. This means going from 0 to 100 in volume I only have 50 steps. Dividing by 10.23 gives me a range of 0 to 100, which is perfect. I can send that value to the PC then have the PC program divide tat by 2 and give me the correct volume levels.

There are a few kinks to work out, the main one being that the Arduino and PC need to be synced to whatever the Arduino volume slider is set to when the PC is turned on. I need to fiddle with a few things, potentially making the slider not as sensitive since really I only need 50 steps, and I'm converting from 1024 steps.

I bought what is called a TFT LCD Module with SD Card Reader. The screen is 1.77" diagonal, with 160 x 128 pixel resolution, which is more than a perfect size to fit up inside of a Genesis cartridge, replacing where the game logo/sticker would be. The benefit of it having an SD Card Reader in it is that I can copy whatever image I want in bitmap form, put it on there, then just push the image from the SD card to the LCD using the magic of an existing Arduino library.

Here is the first working test of the Arduino Uno driving the TFT LCD Module:
Sega Genesis PC Case Mod Arduino Uno driving a TFT LCD Test
Notice how slow it takes for the LCD to load an image, this is due to the speed of the processor and SPI lines.

I was able to borrow an Arduino Mega from a school friend who happens to live in the city to see if the more powerful Mega would allow me to load faster:
Sega Genesis PC Case Mod Arduino Mega driving a TFT LCD Test
It is faster however you can still notice it takes more than a half a second to load the image.

To remedy this I went searching on the internet for solutions. I found out that the Arduino Due (which I have since ordered) is able to load images faster, especially with library someone has made using DMA. In test videos I've seen it load an image almost instantly, perfect for me to do the intro Sega music/animation when the PC turns on. As of right now I am waiting for it to come in the mail, so anything else with the LCD will mainly be adding more pictures to it, and hooking up the power and backlit to a transistor so I can turn the screen off with the Arduino when the PC is off.

With the LCD screen working and well on hold, I moved onto the second part of the Sega Bootup portion. This involves hooking up a speaker to the Arduino and then using a few libraries for it to play back audio. The fortunate part of having that TFT LCD module with SD Card is that I can store wav files on it and access it to push the audio out to the speaker.

After several hours of trying to figure out the library and how to properly hook it up I was rewarded with this:
Sega Genesis PC Case Mod Arduino Mega driving a TFT LCD Test With Audio Test 1
Notice how quiet it is, this is due in part to the fact the Arduino output port has a rather low maximum current output on it (40 mA). At 5V (though it's PWM so it's never quite at 5V) the maximum wattage I can kick out is 200mW. As the speaker is an 8 Ohm 0.5W speaker, this is only about half the maximum it can receive.

I need to boost the signal, need to amplify it to be exact. Well I grabbed a trust NPN transitor, a resistor and configured it in a way to amplify the current. PLEASE NOTE, LOWER YOUR SPEAKERS ON THIS NEXT VIDEO:
Sega Genesis PC Case Mod Arduino Mega driving a TFT LCD Test With Audio Test 2
As we can see this is considerably louder, to lower it, which I plan to, I'll need to change around the resistor I'm using, large the resistor, the lower the current being sent to the amplifier and thus quieter the speaker will get.

What I also need to do is throw on a high pass filter into this circuit to filter out any DC coming from the Arduino output as to make the sound a bit more crisp.

So far this is all I have to update, though as I stated I'll be tackling more of the PC volume control section shortly and hope to have that done. After that I plan to look at the Reset and more importantly the power button/switch configuration and how to determine when the PC is on or off (I have a few ideas that I'll need to test out).

Hopefully all will go well with this project and that it explained in a way that both the technical electronic hobbiest knows some of the nitty gritty details and that the average modder will understand too. Either way, let me know what you think, in the end this may end up becoming a contest prize, but we'll see with my sponsor later on.
__________________
Here I am: here I remain

Last edited by Arinoth; March 27, 2015 at 05:21 AM.
Reply With Quote
  #2 (permalink)  
Old March 27, 2015, 10:14 AM
MARSTG's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2011
Location: Montreal
Posts: 2,450

My System Specs

Default

and what are the specs of the pc?
__________________
Reply With Quote
  #3 (permalink)  
Old March 27, 2015, 11:15 AM
Arinoth's Avatar
Moderator
F@H
 
Join Date: May 2009
Location: Halifax
Posts: 8,927
Default

Still to be determined based on what I get, what I am going for is something that is mITX with a very low profile heatsink, with it easier passively or actively cooled. If needed I'll put in a few fans inside of it to help circulate/vent.
__________________
Here I am: here I remain
Reply With Quote
  #4 (permalink)  
Old March 27, 2015, 05:48 PM
MARSTG's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2011
Location: Montreal
Posts: 2,450

My System Specs

Default

I guess it could be an AMD apu with a scythe shuriken
__________________
Reply With Quote
  #5 (permalink)  
Old March 27, 2015, 07:14 PM
Arinoth's Avatar
Moderator
F@H
 
Join Date: May 2009
Location: Halifax
Posts: 8,927
Default

The original idea was an AM1 system since the heat sink on that is quite small, though we'll see if it is that or not. I'll post a more detailed update this weekend, I have solved my volume control problem as well as the ability to turn on/off the LCD so that it won't always be on.
__________________
Here I am: here I remain
Reply With Quote
  #6 (permalink)  
Old March 29, 2015, 07:44 PM
Arinoth's Avatar
Moderator
F@H
 
Join Date: May 2009
Location: Halifax
Posts: 8,927
Default

Haven't had an overly 'great' weekend aside from being able to make some headway on Friday evening.

The volume slider now works so that whatever level the potentiometer slider is at, will result in changing the Windows volume correctly. The more challenging part was making it so that if the Arduino or PC are off and someone changes the volume slider that once the PC is on its volume is correctly set to this new offline value. This took a few hours to troubleshoot but it's been solved too.

The other accomplishment of Friday was the ability to turn on/off the LCD with SD Shield whenever I want. There is no point in having the LCD screen on if the PC is off as it would be a waste of power. This was resolved by using a NPN transitor and a circuit configuration to allow it to act like a digital switch. If the transistor get a high, it will turn the LCD on, if it gets a low it will turn the LCD off.

There will be some video of both of these things in action within the next day or two, just wanted to update people.
__________________
Here I am: here I remain
Reply With Quote
  #7 (permalink)  
Old October 24, 2015, 03:46 PM
Arinoth's Avatar
Moderator
F@H
 
Join Date: May 2009
Location: Halifax
Posts: 8,927
Default

Time for an update.

I purchased several months ago a slightly larger 2.2" 240 x 320 TFT LCD screen that works with a specific DMA library that is supposed to decrease how long it takes for an image to be displayed on the LCD display if it is connected to an Arduino Due.

Sega Genesis PC Case Mod Arduino Due TFT LCD
We can see in the attached Youtube video that the RHR Logo, takes only about 113ms to load each time (there is an timer program built in to let one know how long it took). Comparing that against the previous above videos it is a great accomplishment, potentially even allowing me to make the 'animated' Sega animation that I was hoping to when the PC boots up.

Look what just showed up:


Suppose I should open it?


Here is the PC that'll be going inside of the Sega Genesis itself:


Removed from its box:

We will be upgrading those 2x1GB to 2x2GB since who runs 2 Gigs of Ram these days?

Decided to crack open the Sega Genesis itself (remember this is a DEAD unit)


An up close shot of internals a Sega Genesis:


Removed the metal shielding around the Coax that was there probably to reduce EMF noise


I have also performed a brief 'fit' test to see how well the motherboard will fit in the gutted Sega Genesis, it fits 'alright' so far, but I will still need to drummel down some of the support pegs inside in order for it to properly sit in there, not to mention cut out the rear I/O panel as sadly none of it lines up that well. If I can get a better shot of the motherboard in the Genesis I'll post it.
__________________
Here I am: here I remain

Last edited by Arinoth; October 24, 2015 at 04:01 PM.
Reply With Quote
  #8 (permalink)  
Old October 24, 2015, 03:53 PM
Arinoth's Avatar
Moderator
F@H
 
Join Date: May 2009
Location: Halifax
Posts: 8,927
Default

It was finally time to bust out the dremel I received from my father two Christmases ago and start to cut out some pieces of this Sega Genesis that I either don't need or that will be in the way of either the motherboard sitting in it, or the low profile I/O panel.

After cutting out some of the button plastic supports that were used for the Sega Genesis itself I temporarily super glued some motherboard mounting posts so that I could mount the motherboard to the case so it won't move all over the place. The motherboard was only installed AFTER I made additional cuts to the back of the Sega Genesis case and not when it was in there. I will also be using additional adhesive on the motherboard posts so that they won't easily move.


Next is the rear I/O panel roughly in place with the motherboard install, I will need to cut out a bit more of the case at the bottom right corner as it's causing it to stick up a bit more than I want.


Here is the Sega Genesis case assembled, I know the cuts aren't the best, first time using this thing plus cutting on a curved service isn't the easiest. If I am not happy with this I do have the second Sega Genesis case I can cut and learn from these mistakes.


This final picture is just showing the front peaking in from the top of the closed case.
__________________
Here I am: here I remain
Reply With Quote
  #9 (permalink)  
Old November 11, 2015, 08:56 PM
Arinoth's Avatar
Moderator
F@H
 
Join Date: May 2009
Location: Halifax
Posts: 8,927
Default

It is time for another update, seeing as it's better to update you guys with things you can see versus me just droning on about coding issues.

First off, I did have to solve a few coding issues with my Windows program that handles the data communicated to it from the Arduino. For some reason Upgrading to Windows 10 AND Visual Studio 2015 the code that I was using for serial (aka USB) communication wasn't working. I spent several days trying to find out different ways to do usb/serial communication until I stumbled upon a slightly modified version of what I was using. All said and done, USB communication between the Arduino and the Windows program is fixed.

With that fixed I received a few timely packages in the mail. One is an MP3 module with an amplifier in it that 'should' let me hook up a speaker, insert a micro SD card with mp3s on it, then hit the play button and get a song pumping out out of the speaker. Sadly this didn't seem to be the case, and without any form of datasheet for this MP3 module I didn't really have much to go on for troubleshooting or debugging the issue.

Putting that aside I went to the other item I received in the mail, an LM386 audio amplifier circuit that is pre-built on a PCB board. Hooking that up to the output of the Arduinos DAC (Digital to Analog Converter) I went and tried to use the Simple Audio Player sample program that Arduino includes in its library to see if I could get it to work. Well for some reason it wouldn't, I was getting no sound out of the DAC0 through the amp to the speaker. I was able to find another person's library/program that converts an audio wav file into a c++ header file that a program reads and spits out over the DAC to at least see if I was using the wrong wav file format. After a little fiddling around I was receiving audio out of my speaker. I tried to convert my Sega audio sample to this header file, but sadly the audio quality was rather poor. Instead I was determined to get the Simple Audio Player program to work, and now I knew my circuit worked.

I converted the audio file I had to the specific wav file details that are required, fiddled with the pot to control the gain/volume and voila, audio! I am still trying to figure out how to remove the static that the speaker plays when there is no audio file to play, this is because the DAC is putting out a non zero value which the amplifier circuit amplifiers resulting in the noise/static.

I also was able to make it so that I can digitally control when the LCD screen will be on. Originally I had hoped to use a transistor, but because of the supply voltage I required vs the voltage that the Due Digital Output pin could provide it wasn't matching/lining up. As I don't have any 'standard' buffer circuits, but I have several logic gate chips instead.Being creative I determined if I hooked up TWO NOT gates one after the other I would get the same output as I would an input. As the NOT gates act like buffers and their output values are that of what the chip itself is powered by (5V), me supplying it a 3.3V high would just trigger the the gate high and give me the 5V I need for the LCD backlight screen.

What is shown in the video attached is the Arduino being powered on, with the LCD screen turned off. On a command terminal I feed it the value I have 'preset' in both my programs that will let the Arduino know that the computer has turned on, thus enabling the LCD screen to show the eventual Sega logo animation (right now it's just the RHR Logo) and play the Sega wav sound at the same time. Enjoy!

Sega Genesis PC Case Mod Arduino Due TFT LCD toggle and Audio Test
__________________
Here I am: here I remain
Reply With Quote
  #10 (permalink)  
Old February 17, 2016, 06:15 AM
Arinoth's Avatar
Moderator
F@H
 
Join Date: May 2009
Location: Halifax
Posts: 8,927
Default

No pictures for this update, but I just received my Serial straight through extension cables as the Sega to USB adapter I ordered by Mayflower isn't spaced correctly to fit into the Sega Genesis' controller slots. This is odd as it means the multi-tap won't work on it either, maybe that is by design.

It took some troubleshooting, along with going through 3 different controllers and my old Sega to USB adapter I still have from the Mark I to get the Mayflower adapter to properly recognize the Sega Genesis Controllers. Once that was a success, I checked to see if the serial straight through extension cables were straight throughs (bought them from eBay), the controller still works in Windows!
__________________
Here I am: here I remain
Reply With Quote
Reply


Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
[WTB] Sega Genesis Console Arinoth Buy/Sell & Trade 18 April 9, 2015 02:53 PM
[WTB] Old Video Games and Consoles SNES, SEGA, N64 dlactin2408 Buy/Sell & Trade 8 November 8, 2012 11:17 PM
Sega Genesis Mod Arinoth Case Mods, Worklog & Gallery 36 September 4, 2012 06:03 PM
[WTB] Sega Genesis Big Controller, DB9 male header, USB back plate Arinoth Buy/Sell & Trade 5 January 9, 2010 09:10 AM
Sega Genesis Big Cartridge Arinoth Off Topic 6 January 3, 2010 08:54 PM