-
Some videos
06/29/2020 at 15:55 • 0 comments -
3D printing and assembly
06/29/2020 at 15:47 • 0 commentsOnce the PCB has been modeled in Fusion 360, the other elements have to be made of in order to be able to make a box with the right dimensions. For that, I search as much as I can on the Internet for the 3D files of my components and modules and when I can't find them, I measure the size and make myself a basic model allowing me to report the main dimensions on which to rely.
Of course, I don't need all the elements of the device. The most important elements are : the screen, the battery, the USB port, the switches and the HP.
Here what it looks like :
This is not the most recent rendering and I have already made some new modifications such as the rear vent allowing a better dissipation of the heat produced by the processor.
3D modeling should always be done with the print in mind. Indeed, not every model is printable and keeping in mind the way a 3D printer works when one is designing the 3D model gives better results.
Concerning the soldering of the components, it is clear that a heat gun is more than recommended. I also used a stencil to deposit the soldering paste for the DDR2-SODIMM socket that will host the CM3. There are still 200 pins and after facing some difficulties to solder it on the first prototype, I preferred to make my life easier for this time and get a much better rendering.
In the end, the different elements are ready for assembly :
I use a drop of hot glue under the buttons to get a good contact with the switches. -
PCB
06/29/2020 at 15:35 • 0 commentsFor my final PCB, I went on ALPS SKRRABE010 switches which I'm really fan of the feeling. For the D-Pad, I wanted to use an ALPS SKRHAAE010 multi-directional switch also for the feeling it provides. It reminds me of the NeoGeo Pocket Color which is a console that I particularly liked for this point.
Here is the rendering of the PCB after routing:
Once this part was completed, it was therefore necessary to wait for the PCB to be received. However, the modeling of the case could begin. The first thing to do was to make the PCB in Fusion 360 from the images above.
-
Power supply
06/29/2020 at 15:31 • 0 commentsConcerning the power supply, I chose an integrated circuit used in the power bank: IP5306.
The purpose of the IC is to manage the charge, discharge and protection of the LiPo battery but also to boost the voltage to 5V. The voltage supplied by the battery varies from 4.2V to ~2.8V depending on its charge. Moreover, this IC allows to drive up to 4 LEDs to indicate the battery charge level.
The CM3+ requires 3 different voltages to operate correctly : 5V, 3.3V and 1.8V. The documentation also mentions a 2.5V voltage but this one is only mandatory for the composite video output which I don't use.
So I start from the 5V voltage and use voltage regulators to obtain the 2 others.To power the backlight of the screen, I need to power 6 LEDs in series. So I need a higher voltage for this module: ~19V. For that, I use a boost-converter based on the IC PT4103.
For the power supply part, I followed the IP5306 datasheet recommendations and made a first PCB to test the chosen options.
From there came out:
- you have to be careful with the implementation of the screen connector. Yes, on this version, I reversed it... :smile:
- I need a pulldown resistor so that the IP5306 will shut down once the system is off.
- the 4 LEDs to know the battery charge status are not useful. 2 LEDs are enough to know the state of charge or discharge.
- other little things that are not worth mentioning here.I have also added jumpers to this PCB in order to be able to isolate certain parts of the circuit and thus more easily track down problems.
This prototype was also the occasion for me to refine the ATtiny code and to test in real conditions boot and power-off sequences of the system.
Finally, I was able to start the work on the final PCB.
-
Boot sequence
06/29/2020 at 07:31 • 0 commentsTo be able to control the start and shutdown of the future device, I decided to use an ATtiny85.
The microcontroller is connected to the battery via the PWR button. When the PWR button is pressed, the ATtiny85 is powered and it starts.
The code of the ATtiny is very simple. Once started, it waits for about 2 seconds and then turns the PWR_CTRL pin HIGH which activates the voltage converter U2 and powers the ATtiny. The loop is closed, the PWR button can be released, the ATtiny remains on.
Then, the code sets the PWR_SYS pin HIGH, which will turn on the whole system and thus the Raspberry.
Once the boot sequence is over, the code scans the use of the same PWR button, using the BTN_OFF pin, and the state of the POWEROFF pin. When BTN_OFF goes LOW for about 1.5 sec, the SHUTDOWN pin is switched to HIGH which orders the Raspberry to poweroff (overlay shutdown).
Once the Rasbpberry shutdown sequence is completed, the Raspberry switches the POWEROFF pin to the high state and the ATtiny shuts down the whole system by cutting the PWR_SYS and PWR_CTRL pins (the latter has the effect of shutting down the ATtiny itself).
-
Configuring Raspberry pi
06/28/2020 at 15:34 • 0 commentsThe first 22 pins of the RPI are used for the 18-bit DPI interface of the screen (6 per color plus 4 for clock, signal and position).
4 are defined for the I2S interface for sound (I only need 3)
12 are used for controls (4 direction buttons, 4 action buttons, 2 triggers and start/select)
2 will be used for power management
Beyond the created dt-blob.bin file, I call in my config.txt file different overlays to complete my config :
- i2s-gpio28-31 and hifiberry-dac: to send the sound in PCM format to the DAC.
- gpio-shutdown: so the raspberry can warn that it's done shutting down.
- gpio-poweroff: to order the raspberry to shut down...
- gamepad: this one is an overlay I created so that the use of the GPIOs dedicated to the controls simulate the keys of a keyboard. -
Audio
06/28/2020 at 15:32 • 0 commentsFor the sound, as indicated in the "details" section, I use the Adafruit "MAX98357 I2S Amp Breakout board" and a Gameboy SP speaker. It's a digital to analog decoder and also an amplifier and allows to directly connect a mini speaker.
The amplifier can deliver up to 3W depending on the impedance of the loudspeaker, the power supply used and the tolerated distortion. It can be supplied with a voltage between 2.7 and 5.5V.
-
First experimentation
06/28/2020 at 15:22 • 0 commentsI started my experiments with the WaveShare compute module IO board. It gives me access to all the board's ports in a quick and easy way. I was then able to validate the different modules I wanted to use (except for power supply).
The most important of them is the screen. It was clearly not easy to find the display that suited me. I had to spend a lot of time on Aliexpress to ask for information from the sellers in order to get reliable features. It was also necessary to study the documentation of these displays in order to fully understand how they work and adapt the configuration of the Raspberry accordingly.
Indeed, I use on this project the DPI interface of the Raspberry which is a simple parallel interface that sends the color data of each pixel at the same time on all the ports. The more ports we use, the more accurate the color will be.The Raspberry can go up to 24 bits but I preferred to settle for 18 bits to keep enough GPIO available for the other features. The interface is controlled by the GPU and we use the config.txt file to adapt the output to the screen characteristics.
I tried several displays and ended up choosing a 3.5" 4/3 format which is easily found on the Internet : LQ035NC111.I also made myself a small game controller to be able to carry out the first tests.