Popeye Pi - Foldable RPi Zero in a car monitor
-
Introduction
This is my first attempt in building a portable Raspberry zero.
In this forum there are lots of cool projects and some constructions inspired me to make also a portable device.
I will try to give you as much infomation as I can but I can't provide 100% right instructions.Quick Description
The display is a 4.3" LCD with 480(W)x272(H) resolution. Suitable for PAL and NTSC signals and is provided for car parking cams. Here it is via amazon.com This display needs 12V (up to 30V) power by 250mA current. The display itself provides two video inputs. Video 2 (yellow) is standard input (used for RPi0), Video 1 (white) offers priority.
The housing under the display offers more then enough space for a full grown RPi0. You have free space of 8mm, the Pi0 is 5mm in height.
So the best way in fitting is to rotate the Pi 180°.
The Power Source and how to get 5 Volts
The power source is a switching power device. It delivers 12V, 1.8A that are 21W... really oversized! The 12V are needed for driving the display. So the oddest method is to use a power regulator to convert from 12V to 5V. Sadly the cheap regulator is a bit to much in height and so I have to cut the cover of the monitor foot :(
I haven't checked the dimensions of the regulator and that's the bill. So I used mat of foamed plastic (3mm in height) and cutted it in right shape. I used a piece of silicon sheet to cover the cavites... btw the silicon avoids slipping.
The device therefore isn't 100% even with the ground but it gives a nice looking.Audio via PWM (Pi0 issue!)
Update to digital I2S audio - No need for PAM module and low/high pass filter
Build the Frequenzy filters
Audio (mono) is delivered from the Pi via PWM signal to a small PAM8403 amplifier. The amp runs from 2.5V-5.0V and delivers 3W max stereo (whatever that means for sound quality). The audio signal from the RPi must be restored by changing the GPIO functions. Don't get afraid it's very easy. Sadly during manufacutring the high and low pass filter were removed, so you have to restore them on your own.
You need for each channel:- 150R resistor
- 270R resistor
- 33µF capacitor (I used ceramic)
- 10nF capacitor (I used an elko, foil cap would be better)
Connection shema
Therefore connect some wires to a fitting GPIO pin (I used GPIO 18, ALT5 for PWM0). You can use wiringPi (https://projects.drogon.net/) to set and alternate GPIO funtions or directly configure viaboot/config.txt
. I give you my config.txt in the next posting
Then next build a high and low pass filter and connect this to the audio amplifier. I used a small speaker (30mm in diameter, 4mm in height) for sound output. Luckylie the housing space was enough and the speaker was placed within.
Size matters?
It's your choice to use SMD (surface mount device) or THT (through hole technology) elements. THT is much easier to solder and the construction is more resistant to stress, maybe if you push and pull some wires during the build. But live with the fact that THT buidlings need ten times more space. My soldering equipment is a cheap 25W soldering iron and I can also mount SMD elements. I highly recommend using shrinking tubes for isolation.About audio quality
Well the sound isn't as bad but there is some noise (crakling, pop sounds) if the Raspberry is acting. So to get really chrystal clear sound use a HDMI splitter or buy a cheap USB audio stick. The ingame sound quality is good but don't expect wonders. For this small build it is okay and more then I admired.Time for build
The whole build took me about 2 days. At first I tried RecalBox as operating systems because of my hope in a quick result but you have to mess around with editing the config.txt to get monitor support and NOOBS drives me crazy. So I was fed up with RecalBox and switched back to RetroPie. (Comm.: There are lots of rumours that RecalBox is much easier to handle, that may be true... up to the point you have to dive into the inner system). As I said above... The working config.txt is given in my second post.
Conclusion
All in all this is a very basic build. There is no battery build inside, no controllers, no power switch. But it was a nive project anyway and if you are not blessed with two left hands a build like this isn't so hard.
The Pros and Cons are:
Cons
no battery build inside
no controllers build inside
no power switchPros
Foldable Device
Connect to car cigarette power source :)
very mobile
Use any controller you want :)Costs - cheap thing
What do I need and how much are the costs? (I calculate in euros, 1.00EU is 1.15USD)
1x 4.3" LCD Display__________________20.00€
1x Raspberry Zero___________________6€+6€ shipping
1x Power converter 12V 5V____________2.50€
1x Power source 12V_________________5.00€
1x PAM8403 audio amp _______________2.00€
2x USB mini male____________________2.00€
1x few elements (res, caps..)___________2.00€
1x passive USB HUB__________________5.00€
1x nano WLAN USB Stick Edimax________7.00€
1x CSL corded controller_______________12.00€
1x Speaker (8R,0.3W,4mm height)_______1.00€
++++++++++++++++++++++++++++++++++++++++++
Total:_____________________________70.50€Why Popeye Pi??
Well my first USB connected to this gots the shape of a whale. So Popeye is a sailor ...
No I names it because you can open the folded display (it got a spring) "POP" and can see something with your eyes... :)
But the whale hub is real and I posses two of them :D
Comments and suggestions are welcome :D
Knowledge is Power! -
Setted
boot/config.txt
Make use of it
#### VIDEO PART #### # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border overscan_scale=1 overscan_left=0 overscan_right=-20 overscan_top=0 overscan_bottom=-10 framebuffer_width=480 framebuffer_height=272 # uncomment for composite PAL sdtv_mode=2 sdtv_aspect=1 #### TWEAK PART #### #uncomment to overclock the arm. Default values: #arm_freq=1000 #core_freq=400 #gpu_freq=300 #sdram_freq=450 arm_freq=1000 core_freq=500 gpu_freq=500 sdram_freq=500 #### AUDIO PART #### # Enable audio (loads snd_bcm2835) dtparam=audio=on #Audio Layout GPIO18 ALT5 (left sound) dtoverlay=pwm,pin=18,func=2 #Audio Layout GPIO13 ALT2 (right sound) #dtoverlay=pwm,pin=13,func=4 #Audio Layout GPIO18 ALT5 (left sound) + Audio Layout GPIO13 ALT0 (right sound) #dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4 #White noise fix disable_audio_dither=1 # Additional overlays and parameters are documented /boot/overlays/README
-
What to make better (next time?)
- Use HDMI display (7")
- The display should drive with 5V
- Use a full grown Raspberry instead the zero. It was (as always) horror to get internet connection via WLan :) Even if this is a cross posting :) Please, read the full story
- Desolder power regulator from LCD to get it work with 5V
- Use a cooler case (the foldup is neat but it's ugly black ABS plastics)
- Make use of more shrinking tubes
- Buy a smaller power regulator (3A or oversized)
- Use SMD elements for self made circuits
- Buy annother Audio Module Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A
- Buy a better solder iron (ersa pico soldering irons seems to be the best quality)
-
HELP NEEDED
Last (reserved) posting in this thread of me :)
I have only mono audio connected. So some games (MAME!) sounds awful because half of the sound is missing. How it is possible (by software) to mix left and right audio channel together. If there is no solution we have to do soldering again :(What are your experience in analog audio? I always hear clicks and pops, this doesn't disturb gaming experience, but sound bad in idle mode :(- My Pi is going to reboot if I connect my passive USB Hub. Is this a special RPi0 issue? Can this be solved?
#1 and #2 solved by myself, description and how to in the next posting!
-
UPDATED Audio >> I2S DEVICE
I highly recommend to use digital sound output for all your projects. As I wrote in my latest post. Use HDMI or split the signal via device (if you have money and/or space in your housing) or use a external USB card (costs about 1 to 100$).
The last resort is to use a I2S Device. Usually you need two devices, a I2S changer and an amplifier to power your speaker. The small device from adafruit (Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A) is a I2S+Amp in one device. The only disadvantage is, that is delivers only ONE SPEAKER output . Left and right audio channel are mixed internal the MAX98357A and you will get STEREO sound mixed with one speaker. I think that fits most usecases for portable projects.
Enough talked! Pants off!
You see it's the same case but the green AMP has gone and the wiring is a bit better. The small blue PCB is the sound generator. I highly recommend to use a 100kOhm resistor to connect between ground and gain. You will receive 15db of sound! With this baby I get clear sound at 25% volume output!
The whole thing is a bit smaller and you don't need the hughe filter devices with caps and resistors. I can't say it enough - get this small device for 6$ and you're happy with.Is the PWM sound really so bad?
Well it depends what you want and I am a honest person. The sound is really amazing during ingame. But it is so ANNOYING in idle mode. So I would take the analog signal for status sounds or maybe a internet radio and run it 24h a day. But if you need a bit of silence the noising in the background is motherfucking bad. And once the PWM is enabled is keeps enabled. It doesn't matter if you take down the volume to 0% the white (snow) noise is there.
As always said:You get what you pay for and if you buy cheap you pay twice!
The circumstances of the nosing do not rely to the amplifier you use - in fact it's the Pi zero itself... but- You pay 1.50$ for a PAM audio module that works but got some disadvantages.
- You pay 6.00$ for a I2S device - the sound is digital - no noise - no angriness.
- You decide ...
So I'm finished with the electrics of my Popeye Pi - I hope you enjoyed the few lines I wrote. I hope you benefit from my experience. Next turn is the case itself. Read you!
May the farce be with you :) Enjoy your projects
Here are more links to go with I2S :)
Volume Control in Emulation Station with I2S
Product Video by Adafruit and some comments by me -
Wow, no comments on this? Well done and thanks for a good write-up!
I'm getting ready to fit out a van for summer road-trips with a couple big 12v batteries for power and something like this would be perfect. I have two screens I'm testing/experimenting with at the moment; the official 7", and the Waveshare 7". I think I'll use the Waveshare.
Did you just pull the 12v straight from the cigarette socket?
-
@Hiroshi Thank you for positive response.
Yes I can power straight from battery. The screen itself and the power regulator to the Pi can be powered from 9V up to 22V.I just saw that some pictures vanished :(
I used kind of that one
https://www.amazon.com/Magnolian-Display-Supply-Converter-Module/dp/B00CBCGAL8 -
Popeye Pie Nr °2
Advanced Design
Dual view (HDMI, SDTV)
I2S Soundmodul
Integrated 4 port USB Hub
Powersaving by switchable videosignal via software
Operates with 5V
Wifi and BT with dongel
Raspberry Pi Zero (not a W) build
--- is finished ;)
.... more to come ;)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.