What's new

Worklog Retro Lite CM4 - A StonedEdge and Dmcke5 collaboration

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
Small step in the right direction last night with the CM4.
At long last, it boots! Finally we can see that beautiful splash screen B|

Turns out, a small bridge on the B2B connectors were stopping it from booting up, that was almost impossible to spot without a microscope. Soldering those connectors by hand was doable but a huge PITA. The $15 640x480p USB microscope saves the day - thanks to @BocuD for suggesting that one. @kent also was a massive help in scoping all of the lines to see if there was any issues with the power sequencing. Thank you both for your help.

Next steps include testing audio amp, writing firmware for the max17055 and safe shutdown scripts.

225667650_980936242689913_5898281402463877990_n.jpg
226007398_832449727403383_2596331550316765576_n.jpg
 
Last edited:
Joined
Jun 9, 2021
Messages
21
Likes
8
can't wait to see this thing finished with all the steps to get up to the finished result.
If by any means this could help you motivate yourself to make a commercial product out of this... I'm willing to help distribute this in Europe :p
 

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
can't wait to see this thing finished with all the steps to get up to the finished result.
If by any means this could help you motivate yourself to make a commercial product out of this... I'm willing to help distribute this in Europe :p
Right now we don’t really have short term plans to make this into a product for people to buy. Rasp Pi foundation have announced there will be limited availability for the CM4 until Q1-Q2 2022 because of the silicone shortages. It’s also probably why there aren’t any Chinese kits available out there either. But not to say we wouldn’t make this into a kit in the future once we’ve done thorough testing and part availability gets a little better.
 

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
MAX17055 fuel gauge is working and outputting all of the correct parameters over the I2C bus, which means the hardware side of stuff is mostly completed. TTE (time-to-empty) is probably accurate as we still haven't booted the Pi from battery so the load current is insignificant right now, hence why it shows 100+ hrs.

Thanks to @Aurelio for assisting with the initialization steps and @Dmcke5 of course for the python scripts and overlay work. Software has never been my thing so I'm grateful to learn from the both of them.

Next step we'd like to try and figure out is how to use the dispmanx video API to display a battery percentage text indicator from 1% - 100% next to the icon and also get PWM control with a button combination. But we're making some good progress at least!

Reading out some parameters from the registers of the gauge:
1630895631188.png


Look at that, a battery indicator :D
IMG_20210905_214018.jpg
 

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
Custom splash screen for the project. The Nintendo ninjas are onto me... :P

 

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
Sorry for the constant delays and slow progress on this project - things have been delayed numerous times because we're both busy and don't do this full time - plus the PCB hasn't gone as well as I'd hoped. We're already up to revision 1.3 now.

I just received the cases from Dmcke5 and can confirm they're incredibly well made - everything feels super high quality and the DPAD is probably the best homemade DPAD I've used - it's the perfect balance between clicky and squishy. I'm a bit bias but I'd go as far to say its better than a Switch Lite DPAD.

I think we're closing in on the home stretch now. I need to tackle the backlight issue and 5V regulator problem (we still haven't booted the board succesfully from a battery just yet), but audio, fuel gauge, screen, USB hub and charging all work. I think I know how to solve the issues, but I will confirm with the scope this weekend. I am hoping for a first completely assembled unit by end of October - that's the goal but like all things... it will eventually be done. Just need to continue the grind.

243939750_272625587924608_6675978868847884202_n.jpg
243702702_3036849766563269_1861649783963497875_n.jpg
244201757_1036159633808352_6842770965521723415_n.jpg
243142419_2979598775647872_8487283645333731726_n.jpg


EDIT: Now booting from Switch Lite battery and have fixed switching instability on the backlight boost.

4B152AAB-C1F7-4B19-A491-C355F3F57EDB.jpeg


Added some metal fly mesh for the intake vents that I painted.

7C6C206F-BFD5-41AC-B64D-BD17498FCA6F.jpeg
 
Last edited:

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
Real emulation no hardware.

1C648024-112B-407F-992A-F5A4A0AC3596.jpeg


We’re almost done!
 

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
A small update in regards to the project - we're mostly done now, except for ironing out a few small software bugs. Dmcke5 and I are excited to share the final product in the Cutting Edge soon!

I've ordered 5 x assembled PCBs from Makerfabs for prototypes, which cost me a fair sum... however, I think it is worth it now as I was getting frustrated and annoyed at soldering this board by hand so many times. I think this is a wise decision that the hand assembled PCB is confirmed to work, I definitely wouldn't take the risk with it otherwise. Part availability still is pretty damn awful due to the shortages (I'll have to solder two components by hand from a random supplier) but this will free up some of my time to start to work on other projects now and finish off the commissions I have sitting around on my desk (long overdue).

Dmcke5 is currently finishing off the HUD options for brightness and volume adjust, as well as low voltage shutdown warning pop-ups and other random setting configs that we want to add in for QoL benefits. Brightness is currently controlled by holding select whilst simultaneously using up and down on the DPAD to step through the brightness levels. This was done via the internal ATMEGA USB controller, which now both acts a usb serial device and usb controller to send messages onto the pi that could be read. We adjust the PWM signal duty cycle of a GPIO pin on the Pi to the TPS61160A chip.

HDMI out also is confirmed working.

image0 (3).jpg


It's a little bit of a pain in the backside to get HDMI out working at the moment with the fkms 3d graphical drivers. These drivers don't allow it to be "hot pluggable" in the traditional sense like the Switch dock (i.e the Pi doesn't recognize a hot plug unless the HDMI cable is plugged in before a bootup). We will need to ensure that the system is powered off and docked before we are able to use the HDMI out function. When docked, the hot plug detect pin is driven high by the sink side and this will force a reboot to the system, reloading the configuration settings to be used for HDMI out. When unplugged, the system will automatically reboot back to the internal screen configuration settings. It's a bit of a shame but I haven't been able to figure out a work around for this yet - maybe someone else could chime in/test with a Pi 4 and see if they see similar issues on both HDMI ports with RetroPie.

Low battery safe shutdown is controlled via a combo of the Pi & ATtiny. The Pi sends a GPIO high signal to the ATtiny input when voltage drops below 3.0V, which turns off the regulators safely with a slight delay to allow for the software side of things to safely shutdown to prevent corruption of the SD card.

Here's a look at the images Dmcke5 has put together, which I think add a really nice touch to the OSD and give it that really professional touch.

Battery icons:
battery_0_white_18dp.png
- 0% SOC
battery_10_white_18dp.png
- 10% SOC
battery_20_white_18dp.png
- 20% SOC
battery_30_white_18dp.png
- 30% SOC
battery_40_white_18dp.png
- 40% SOC
battery_50_white_18dp.png
- 50% SOC
battery_60_white_18dp.png
- 60% SOC
battery_70_white_18dp.png
- 70% SOC
battery_80_white_18dp.png
- 80% SOC
battery_90_white_18dp.png
- 90% SOC
battery_full_white_18dp.png
- 100% SOC
battery_charge_0_18dp.png
-Charging icon 1
battery_charge_1_18dp.png
- Charging icon 2
battery_charge_2_18dp.png
- Charging icon 3
battery_charge_3_18dp.png
- Charging icon 4
battery_charge_4_18dp.png
- Charging icon 5
battery_error_18d.png
- Battery error, no battery detected

Volume icons:
volume_bar_0.png

volume_bar_10.png

volume_bar_20.png

volume_bar_30.png

volume_bar_40.png

volume_bar_50.png

volume_bar_60.png

volume_bar_70.png

volume_bar_80.png

volume_bar_90.png

volume_bar_100.png


Brightness icons:
brightness_0.png

brightness_10.png

brightness_20.png

brightness_30.png

brightness_40.png

brightness_50.png

brightness_60.png

brightness_70.png

brightness_80.png

brightness_90.png

brightness_100.png


Stick calibration/low voltage icons. The sticks can be calibrated by clicking start and the right trigger "R3" button, which will bring prompt the user to rotate the sticks to calibrate the ranges.

calibration1.png

calibration2.png

lowbatterywarning.png


That's all for now - I think this hopefully (fingers crossed) will be the last update before the project is completed.

I'll add this in here for anyone who was interested, but I did get a resin "3D printed" case from PCBway to see how it would turn out for those who want to build their own if we do open source the case files. As you can see, it's not perfect at all (not that we expected it to be, the case isn't designed for printing) but it is possible to get something usable with a bit of work. I used a hair dryer to flatten out the warped areas of the case, which included the bezel region and near the fan vent exhaust. I think it looks not too bad for a $40 price point - obviously not ideal but usable if you're on a budget.

IMG_0881.jpg

IMG_0879.jpg

41F21224-8987-41C1-9902-8417B9870A80.jpg
 
Last edited:
Joined
Nov 13, 2021
Messages
1
Likes
1
A small update in regards to the project - we're mostly done now, except for ironing out a few small software bugs. Dmcke5 and I are excited to share the final product in the Cutting Edge soon!

I've ordered 5 x assembled PCBs from Makerfabs for prototypes, which cost me a fair sum... however, I think it is worth it now as I was getting frustrated and annoyed at soldering this board by hand so many times. I think this is a wise decision that the hand assembled PCB is confirmed to work, I definitely wouldn't take the risk with it otherwise. Part availability still is pretty damn awful due to the shortages (I'll have to solder two components by hand from a random supplier) but this will free up some of my time to start to work on other projects now and finish off the commissions I have sitting around on my desk (long overdue).

Dmcke5 is currently finishing off the HUD options for brightness and volume adjust, as well as low voltage shutdown warning pop-ups and other random setting configs that we want to add in for QoL benefits. Brightness is currently controlled by holding select whilst simultaneously using up and down on the DPAD to step through the brightness levels. This was done via the internal ATMEGA USB controller, which now both acts a usb serial device and usb controller to send messages onto the pi that could be read. We adjust the PWM signal duty cycle of a GPIO pin on the Pi to the TPS61160A chip.

HDMI out also is confirmed working.

View attachment 19953

It's a little bit of a pain in the backside to get HDMI out working at the moment with the fkms 3d graphical drivers. These drivers don't allow it to be "hot pluggable" in the traditional sense like the Switch dock (i.e the Pi doesn't recognize a hot plug unless the HDMI cable is plugged in before a bootup). We will need to ensure that the system is powered off and docked before we are able to use the HDMI out function. When docked, the hot plug detect pin is driven high by the sink side and this will force a reboot to the system, reloading the configuration settings to be used for HDMI out. When unplugged, the system will automatically reboot back to the internal screen configuration settings. It's a bit of a shame but I haven't been able to figure out a work around for this yet - maybe someone else could chime in/test with a Pi 4 and see if they see similar issues on both HDMI ports with RetroPie.

Low battery safe shutdown is controlled via a combo of the Pi & ATtiny. The Pi sends a GPIO high signal to the ATtiny input when voltage drops below 3.0V, which turns off the regulators safely with a slight delay to allow for the software side of things to safely shutdown to prevent corruption of the SD card.

Here's a look at the images Dmcke5 has put together, which I think add a really nice touch to the OSD and give it that really professional touch.

Battery icons:
View attachment 19907 - 0% SOC
View attachment 19908 - 10% SOC
View attachment 19909 - 20% SOC
View attachment 19910 - 30% SOC
View attachment 19911 - 40% SOC
View attachment 19912 - 50% SOC
View attachment 19913 - 60% SOC
View attachment 19914 - 70% SOC
View attachment 19915 - 80% SOC
View attachment 19916 - 90% SOC
View attachment 19917 - 100% SOC
View attachment 19931 -Charging icon 1
View attachment 19932 - Charging icon 2
View attachment 19933 - Charging icon 3
View attachment 19934 - Charging icon 4
View attachment 19935 - Charging icon 5
View attachment 19936 - Battery error, no battery detected

Volume icons:
View attachment 19918
View attachment 19954
View attachment 19921
View attachment 19922
View attachment 19923
View attachment 19924
View attachment 19925
View attachment 19927
View attachment 19928
View attachment 19929
View attachment 19930

Brightness icons:
View attachment 19941
View attachment 19943
View attachment 19944
View attachment 19945
View attachment 19946
View attachment 19947
View attachment 19948
View attachment 19949
View attachment 19950
View attachment 19951
View attachment 19952

Stick calibration/low voltage icons. The sticks can be calibrated by clicking start and the right trigger "R3" button, which will bring prompt the user to rotate the sticks to calibrate the ranges.

View attachment 19937
View attachment 19938
View attachment 19940

That's all for now - I think this hopefully (fingers crossed) will be the last update before the project is completed.

I'll add this in here for anyone who was interested, but I did get a resin "3D printed" case from PCBway to see how it would turn out for those who want to build their own if we do open source the case files. As you can see, it's not perfect at all (not that we expected it to be, the case isn't designed for printing) but it is possible to get something usable with a bit of work. I used a hair dryer to flatten out the warped areas of the case, which included the bezel region and near the fan vent exhaust. I think it looks not too bad for a $40 price point - obviously not ideal but usable if you're on a budget.

View attachment 19955
View attachment 19956
View attachment 19957
Hi StonedEdge.

Fantastic work on your portable console. I was scanning through and saw the icons UI that you showed. I thought I could spice things up a little?

Let me know if you like them, this is just a few in case you didn't want me to continue. I was trying to think outside the box in terms of simple UI indicators.
The 3rd screenshot is not fully fleshed out but It's what I started out with.
I can do better and some refinement is needed. Flat shading might be preferable too but I've done enough for tonight lol.

Hope you like, hi from Australia!

UI 1.png

UI 2.png

UI 3.png

-Last
 

fdp

.
Joined
Nov 30, 2021
Messages
1
Likes
0
Awesome. Can i ask you which is the lcd display used in the project ? :)
 

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
Last edited:

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
IMG_1066.jpg
IMG_1065.jpg


Today I received the custom battery samples for the Retro Lite. It's essentially 2 flat packs sandwiched together in 1s2p configuration, with some custom battery art to finish it off. It's heavily inspired by the original Switch Lite battery (i.e the HDH-003 model).

The dimensions of the cell when assembled is 8.9 x 50 x 74mm, and you can solder wires to the left and right pads on top to the connector we've chosen to use. Not 100% necessary to have this done, but the cells are very cheap when ordered in bulk and the samples were a great price too and makes it easier if we ever decide to make a kit. I think it adds a nice professional look to it all!
 
Last edited:

StonedEdge

a.k.a. ClonedEdge
.
.
Joined
Nov 16, 2018
Messages
385
Likes
1,551
Location
Japan, Tokyo
Portables
2
Internal PCBs are finally complete, after too many revisions to the hardware and far too much money spent…

4CB07422-FBE4-47BC-925D-F5400CE88165.jpeg


Finally found a use for all those Wii antennas I’ve salvaged over the years. It fits in a really nice spot, too. Definitely helps with the bluetooth range for things like wireless controllers.

D83A578F-EDE6-4AB3-A59C-3EAE4B49D992.jpeg


Dmcke5 working hard on a custom menu. You can calibrate the sticks, read battery information like time to empty, current draw, battery voltage and CPU temps. There’s an onscreen keyboard planned, as well as being able to adjust other settings like CPU temp thresholds for the DC fan and PWM settings on the fly. Brightness can be toggled in 10 steps by holding select and DPAD up/down. The menu is opened by holding R3 + select.

9B563404-BDEA-46F6-964F-5E7CFC2F8670.png

1CD26E9F-70B2-440F-A45F-2D50BF15DA2A.jpeg

CE8F40BF-AA8F-409A-BF4C-77ABC4E9C51A.jpeg


HDMI out works and automatically switches the config.txt file to the external screen settings upon detecting a HDMI hotplug. It will reboot to the internal screen once disconnected too. I wrote a simple bash script to do that.

BF27994A-D375-4F64-A5B7-4B820B5268FE.jpeg
 
Last edited:
Top