Automatic Voltage Selection - sanni/cartreader GitHub Wiki
Automatic Voltage Selection (Vselect) is an optional feature of HW5. It allows the firmware to select the voltage for you based on the cartridge you've selected. This simplifies the use of the OSCR HW5, leaving only a power switch. Because this feature removes/replaces the hardware switch for voltage selection, it is not recommended if you want to use the OSCR to flash ROMs to blank ROM chips using a ROM adapter. If you don't know what that means, don't worry, it just probably doesn't apply to you.
!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!
Under no circumstances should you install the physical voltage switch and Vselect at the same time. Doing so will cause irreparable damage to your LCD and other components.
!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!
Using Vselect
Once installed, using Vselect is very straightforward. Simply turn on the OSCR, insert a cartridge, and select the system as normal. The system will automatically switch voltages for you. When no system is selected the firmware will set the voltage to 3.3V to protect your cartridges.
Note: There was originally a warning here saying that you should not have a 3.3V cartridge in the reader when powering it on or resetting it. This was made unnecessary in firmware V13.2. See discussion #906.
SMT Components / Soldering Difficulty
Vselect uses SMT ("Surface Mounted Technology") components, including 0402 size components, and requires soldering skills significantly above what the rest of the assembly of an OSCR requires. Here is an example of an 0402 component:
While the rest of HW5 is suitable for someone new to soldering, Vselect is not. However, if you are new to soldering and want to learn SMT soldering, then Vselect is a good place to start because of how few components there are. Just use a multimeter with continuity mode to check for shorts/bridges between pins a few times before applying power to the device. Oh, and watch lots of youtube videos on hand-soldering 0402/SMT components.
The SMT pads have been lengthened to aid in hand-soldering, and it is possible to solder these components with a good soldering iron. However, installation using hot air or a hot plate is recommended if one is available. It's probably not worth buying one just for this, but if you want to get into SMT soldering, then it's highly recommended.
Preassembled Options
If you live in the USA, you can purchase a preassembled Vselect module here or a PCB kit with Vselect already installed here for ~$32 shipped. If you are only building one OSCR, then the PCB kit with assembly is ~$1 cheaper than buying everything yourself with the cheapest/slowest shipping options, as the PCBs are about $21 with shipping (10-16 days + production time) when ordered from JLCPCB plus about $12 with shipping (3-5 days) for the Vselect parts when ordered from DigiKey.
Variations / Installation Options
There are two installation options for Vselect available:
- If you have a main PCB prior to HW5 Rev4: You will need the Vselect Module PCB.
- If you have a main PCB that is HW5 Rev4 or newer: You do not need the Vselect Module PCB, however, you can still use the PCB on Rev4 and newer. Using the module PCB can be useful if you already have your OSCR or wish to purchase a module preassembled.
Components
You will need several components. The easiest way to get the right components is to view the myList on DigiKey and add them to your cart, the list even has alternatives for when one is out of stock (click the + to see alternatives). Otherwise, you can use the following list:
- 1x TPS2113(A)PW(R) (DigiKey|Mouser|DigiKey Filtered Search)
- The difference between the PW and PWR versions is the packaging the actual chips come in, with R being on a reel and non-R being in a tube. This is irrelevant for hobbyists as it only matters for machine assembly. Get whichever is the cheapest.
- The difference between the APW and PW versions is that the APW version switches faster than the PW version. For our purposes, this doesn't really matter, but it does mean the APW version is technically better. If it's cheaper, get the APW version, otherwise don't worry about it and just get the PW version. Note that the APW version also comes in another package/case; we need the 8-TSSOP version. The other package has a different model number, DRB(T/R), do not buy that version, as it will not work.
- You can substitute the TPS2112(A)PW(R) if the TPS2113 is out of stock. The difference is in the current handling capability, with the TPS2113 being able to handle 1.25A (1250mA) and the TPS2112 being able to handle 0.75A (750mA). This makes the TPS2113 technically better, and in small quantities, they usually cost the same. We limit the TPS2113 to 900mA anyway, so there isn't really much of a difference; just be aware the resistor value is different when using the TPS2112.
- 2x 0.1uF Ceramic Capacitor, 0402 package. (DigiKey|Mouser)
- 1x 10uF Ceramic Capacitor, 0402 package. (DigiKey|Mouser)
- 1x 560 Ohm Resistor, 0402 package. (DigiKey|Mouser)
Note: While you only need 1-2 of each of the 0402 package capacitors and resistors, it's recommended that you purchase at least 10 as you are likely to lose some.
Installation
!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!
Under no circumstances should you install the physical voltage switch and Vselect at the same time. Doing so will cause irreparable damage to your LCD and other components. If you are installing Vselect onto an existing OSCR, remove the voltage switch first!
!! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!
When using Vselect, you must not install the voltage selection switch or the status/power LED. Installing the voltage select switch will cause damage to your LCD. This is because when Vselect is used, the pin normally used for the status LED is instead used to toggle the voltage.
You should flash the firmware with Vselect enabled to your Arduino before actually installing Vselect. To enable Vselect, uncomment the option in the config file and upload the firmware to the Arduino.
Component Locations
Because the identifiers of the components vary depending on if you are using the module or installing it onto a Rev4 or newer main PCB, I'll also describe them by appearance. The group of 3 sets of 0402 pads is for the capacitors. The 10uF capacitor goes in the middle of them, and the 0.1uF capacitors go onto the other 2 spots. The resistor goes on the 0402 pads that are off to the side. For the TPS2113, that goes on the TSSOP-8 pad labeled U1.
- Main PCB
- U1: TPS2113
- C2, C3: 0.1uF Capacitor
- C4: 10uF Capacitor
- R2: 560 Ohm Resistor
- Vselect Module
- U1: TPS2113
- C1, C2: 0.1uF Capacitor
- C3: 10uF Capacitor
- R1: 560 Ohm Resistor
The capacitors and resistor do not have a polarity/orientation. For the TPS2113, there is a dot in the corner of the box outline. This dot aligns with pin 1 of the IC. There is a similar dot embossed onto the IC, you may have to hold it at an angle to see it. It's important you align the dots correctly.
Soldering
If you are installing the components on the main PCB, you should install the Vselect components before installing anything else on it. When you go to solder the other components around Vselect, you need to be mindful of how much heat you are putting into the board. Sometimes you can sink too much heat into the board when soldering on THT ("Through Hole Technology") components, and it may cause the SMT components to fall off. If you are concerned, you can place a piece of polyimide film tape (commonly referred to as "Kapton tape", [Kapton is a name-brand manufacturer of the tape]) over the components to help secure them in place.
For the module PCB, install the components onto the PCB and then install the module in place of the voltage selection switch. If your module does not say R2, then it should be installed on the back of the main PCB. If it does say R2, then it should be installed on the front of the main PCB. You can feed a wire between the boards to help hold them together. Instead of an actual wire, you can use spare wire from the capacitor, resistor, or pins pulled from one of the headers. After soldering the module to the main PCB, add solder to JP1 and JP2. Run a jumper wire from JP1 to D38 and another jumper wire from JP2 to ground.
Explaining how to solder SMT components is beyond the scope of this wiki. Here are some videos I recommend:
- SMT Hand-Soldering:
- How To Solder Surface Mount Components by EEVblog
- SMD Thermal Pad & Drag Soldering Tutorial by EEVblog
- Replacing SMD components without burning neighboring connectors without hot tweezers by Louis Rossmann
- SMT Hot Air Soldering
- SMD Stencil Reflow Soldering Tutorial by EEVblog
- How to solder components using hot air without them blowing away by Louis Rossmann
Note: Louis Rossmann tends to swear a lot in his videos.
Testing
Once the components are installed, it is very important that you test for shorts before giving power to the board. Use a multimeter set to continuity mode and ensure there is no continuity between the various pins of the TPS2113 (the IC). If you find continuity between the pins of the IC, then the pins have been shorted, and you must rectify that before proceeding.
After verifying there are no shorts between pins, test to ensure there is continuity between:
- Pin 2 and GND
- Pin 3 and D38
- Pin 4 and the side of the resistor closest to the IC (R2)
- Pin 5 and GND
- Pin 6 and 5V
- Pin 7 and VCC
- Pin 8 and 3.3V
Make sure you try to touch the pin of the IC and not the solder or pad when testing the IC side. When testing with the components installed to the main PCB, you can test 5V, VCC, and 3V against where the voltage select switch would go. When testing those on the module, you'll need to test 5V and 3.3V against the LCD header and VCC against the clockgen or slot headers.
Next, finish building the main PCB. After that, attach only the LCD, not the six-slot adapter, and power it on. Use your multimeter set to measure DC voltage and check the voltages between:
- Pin 6 and GND, should be 5V
- Pin 7 and GND, should be 3.3V
- Pin 8 and GND, should be 3.3V
On the OSCR, select "Mega Drive/Genesis" and use your multimeter again to check the voltages between:
- Pin 6 and GND, should be 5V
- Pin 7 and GND, should be 5V
- Pin 8 and GND, should be 3.3V
If these tests pass, congratulations! You've successfully installed Vselect! Make sure to ensure that you enable the option in the firmware every time you update. You may want to consider repeating the pin 6-7 tests after every update to ensure that Vselect is still working properly.