The Hack Like Heck Competition Help us get to know the Contestants Ask a question in the comments below | About Hack Like Heck | |
Content Partner Program | ||
The Prizes |
Audition Video |
---|
Declaration of Intent | Chris intends to Hack Like Heck |
YouTube Channel | Inappropriate Tools |
Hack Like Heck Project Progress | COMING SOON! |
Name: ifish
Element14 Community member since: February 12, 2018
More about the contestant:
How did you first get into electronics?
Work, they didn't need another full time software developer so they invested the time and energy for me learn about circuit design, PCB layout, troubleshooting, etc. Its been quite a lot of fun along the way!
Why are you interested in hacking like Heck?
I guess there are a number of reasons, first of which is I can do that.... probably..... maybe..... we'll see.
2. I think its going to be a fun project, so far its been a roller coaster of emotions. Just working on the display I've been worrying about using varying length pieces of wire between the breakout board and the Pi. Spending most of my Sundayafternoon wiring it up just to realize I followed the wrong mode wiring diagram, don't worry i got it on video. Followed by sweet success, this is why electronics are so much fun.
3. I've wanted to take part in a builder type competition for awhile and thought this should be in skill set
4. I've put off building a portable gaming system for to long
5. Having a deadline, its to easy to put something off when there's no pressure to get it done
6. I have this unused Pi zero W that's been collecting dust
7. Chance to meet Ben and the gang
What are your favorite projects or projects you are most proud of?
My favorite project and even though it still not done yet is a side project I've been working on for work involving a Pi compute module to create a carrier board to replace a system board we used in a past product. My other favorite project wasn't actually ever planned, but was inspired by a purchase that was semi forced onto me. I wanted to do a portable handheld gaming system last year based around the Pi zero w, but the cheapest way to get one was to buy it with adafruits 3 watt stereo amp hat. I was so pleased with how this project turned out I built a second one to record how I made it and stuck it on YouTube (https://www.youtube.com/channel/UCjPW_yfzXDuSf9mg...).
Want to know more? Ask in the comments below and tag ifish!
The Journey So Far!
I'm getting really close to the end of my build and thought I'd take the time to share with you all and my fellow builders some of the hurdles and mistakes I've made along the way.
The Display
In my project I wanted to use the 40-pin display like Ben used as to me that seemed to be a significant part of the challenge and I had never touched a dt-blob file before this project. I ended up running into to a total of three problems/mistakes/road blocks, what ever you'd like to call them, they are as follows
- I used a Pi Zero with WiFi, the dts examples didn't have a Pi Zero Wifi section so i made the mistake of assuming I should just use the Pi Zero entry. This resulted in my dt-blob.bin file being ignored because it didn't have the correct section, but I would eventually come across this page linked below and this documentation would be instrumental or should be instrumental for one of the last pieces of i have yet to complete (power switch).
https://www.raspberrypi.org/documentation/configuration/pin-configuration.md - The seconds mistake with the display was simply wiring it up incorrectly, i followed group 2 (i think im using the correct term here) when i should have been following group 3 (which is what my blob file is setup for. Because I'm using a Pi Zero W i need to either get my audio from GPIO pins off the camera (which i have never done nor wanted to attempt) or use GPIO's 18 and 19 which are occupied by group 2 but not group 3. You can see the result of this in my pseudo trailer and my final video i'll be sure to point this out, I like to highlight my mistakes/failings not for people to learn from but because they intend to be humorous. Anyways this was a simple matter of rewiring the display correctly to follow the group mode i originally intended.
- Noise of some kind, I'm reasonably certain this is some sort of EMI issue related to grounding and something i should have tested with my intended mode of powering this thing once i realized it was related to how I have been powering it (micro usb port) to see if it is an issue when using it with the Adafruit PowerBoost 1000c. The issue is a transparent pink/red horizontal band going across the display, originally I thought it might be a timing issue (my horizontal or vertical sync signals where to long or short. This doesn't appear to be they case, simply squeezing, yes squeezing, the micro usb port resolves it, so this points me at some sort of grounding or grounding/EMI type issue. It seems to be resolved for the moment and we will see if it comes back when i switch to the power boost module
Controls
For controls I chose to use a couple of i2c io expander chips, a microchip mcp23017 and TI ADS1015. Both chips are supported by Adafruits Python library and are stocked by Adafruit, you can get a 28 pin DIP version of the MCP23017 and a ADS1015 on break out board from them. I went this route has my original vision from last year was to use as few pins as possible to keep as many free as possible for like integrating a high res DAC. Between the Adafruit Python library, code posted by a Chris Swan (linked below) and some modification on my part I had everything needed. I've also attached a slightly outdated version of my python program, its fully functional and simply written for a breadboard setup I created last fall.
http://blog.thestateofme.com/2012/08/10/raspberry-pi-gpio-joystick/
The one problem I did run into and kept running into was space, i'm not use to dealing with through hole components on this scale and using pre-made modules. In my day job I would just design a single PCB that would contain the circuits for all this stuff, like everything
- 5v and 20v boost for the back light
- the 40 pin connector
- connect for the pi zero
- charge circuit
- mcp23017 & ADS1015
- 328p micro controller
- All the passives needed
To make everything fit I would go down to using 0402 size components, I would use SOP packages over SOIC whatever it took to fit everything is the PCB size I had to work with. One of the goals i had for this is to make the parts that make up this project as accessible to everyone as possible, so using my normal design technique wouldn't be friendly. To make a PCB board you first need the funds to order the PCB board and you need to know how to use PCB design software. Using through hole components and perf PCB board eliminates both these requirements... or mostly anyways. I made my module for the MCP23017, but found it was way to fat to fit within my constraints. For my project i did make a custom PCB containing a SOIC version of the MCP23017, SOP version of the ADS1015 and a low pass audio filter using 0805 components. This part of the project I feel is a bit of a compromise in the sense that I didn't use purchasable breakout modules or through hole components, but equivalents of both do exist. I've also attached the kiCAD project files as well.
Another reason for using both Pi Zero and the I2C IO expanders was to keep the OTG USB port free so that I could use USB Gadgets and a partition on the Micro SD card to act as a USB thumb drive. The idea is that the user plugs the GamerMan Ultra Classic into there computer, copy over the ROMs, unplugs the cable and then software copies the new roms to there designated rom folders. I've gotten USB gadgets mass storage to work and played around with it a bit, but the final goal hasn't been realized, I plan to complete all the software bits once the unit is together. Having the ADC chip also allows me to monitor a pot to control volume, although i got all the pieces for the case cut, glued together and stained last night and realized I had forgotten to cut a hole for not just the pot but also the power button. Finally I'll use the fourth ADC pin for monitoring the voltage of the battery, some calibration will be needed but at the very least I should be able to safely power down the Pi when the battery gets to low. Ideally i'd like to get it to save my game (i'll have to detect the emulator being used and then issuing the correct keyboard command using the uinput python module).
The Case
I've been using plywood and pine to create the outer portion of the case and using my shiny new flashforge finder printer to create 3d parts to hold thing together on the inside. So far my biggest mistakes have been not designing the whole thing at once and two spilling glue all over the build plate of my printer. The bottle did say to squeeze slightly, unfortunately i didn't read the slightly part.
It might actually fit together!
I got far enough last night that I'm reasonably confident I have enough space inside the case to hold everything. I may need to route out some of the material that makes up the back piece (190mils thick plywood) for the battery, but if i do only to a depth of about 50mils at the most for the 2000mAh battery which should give me about 3 to 3.5 hours of game play. I have a 2500mAh battery I could also use but its a bit thicker, so I'm not sure how far I was to push my luck as I've already had a few close calls with the wood working and my power button solution is working exactly as expected.
Current Issues/Problems
- Forcing GPIO 25 (or 9, 10 and 11) on at startup and keeping it on while the Linux system continues to boot
Whats Left?
- Case: Mount the power button, I've rigged up by dt-blob file so i should just need a momentary tactile switch to turn it on
- I'm reasonably I tested this in advance, but i get my high output, followed by a low as soon as the Linux system starts loading. In the meantime i have added a few extra lines to my startup script (service) as a work around but it makes the power on feature less slick then i'd like. Powering off works perfectly as planned, so at least that's something, but now I'm wondering if i just imagined the whole thing during testing, have i lost my mind? I hadn't i just put a mistake in my dt-blob file.... whoops!
- Case: Mount a pot for controlling volume, i kind of forgot to order something for the project so i'll need use something i have
- Case: Secure the back of the case to the rest of the unit, either with wood screws or possible magnets (easily get at and show off the insides)
- Case: Create a "toner" screen to show legend (start, select, A, B, C, X, Y, Z, etc...)
- Final assembly and wiring circuit board together
- Its done minus some minor optional stuff. ITS DONE
- Software
- Create startup script
- Launch custom GamerMan Ultra Classic splash
- load i2c-dev module (can also be done in module conf file)
- load uinput module (can also be done in module conf file)
- launch joystick2.py (forgot to check if this was running)
- Create shutdown script (not needed, pi turns off all gpio at shutdown anyways)
- Tweak joystick2.py
- orient joystick
- monitor battery voltage to issue shutdown command
- monitor thumb pot to control volume
- figure out way to detect emulator (libarch, etc)
- to pause, take screenshot and save session
- rewind
- monitor OTG_ID state, to detect when plugged into computer
- copy romsCouldn't go off otg id, using rsync with the filesystem in read only state on the pi itself
- Create startup script
- Enjoy!
- Once the video editing is complete and catch up on some much needed sleep!
I was up till 3:30am EST, but I got my video uploaded and submitted!
Top Comments