Raspberry Pi/Arduino/Electronics Discussion and Showoff |OT|

Beard of the Forest

The No. 1 cause of forest fires is trees.
Jan 16, 2018
145
469
330
Forest
I know that I can't be the only one on Neogaf that fiddles around with electronics projects as a hobby. I'd like this thread to serve as a resource for people interested in getting started as well as a place to discuss what projects you may be working on. So come on in everyone, share your passion and experience with the community!

Arduino

a000066_featured_4.jpg


If you're interested in a more detailed introduction as to what an Arduino board is, then I suggest you read this from their website. Simply put, an Arduino is a microcontroller board. That means that it has it's own processor and memory and can interact with peripherals. What makes the Arduino special is that it was the first general purpose microcontroller made available to the public that an average person could use for their own projects. You can flash your own script onto it's memory and determine how it interacts with devices connected to the I/O pins. If you have an Arduino and want to learn how to use it, I suggest checking out their guides page.

Raspberry Pi

810xXvVWWwL._SX466_.jpg


The Raspberry PI can probably best be described as a computer that fits into your pocket. They come installed with Raspbian linux and have ethernet, usb and HDMI ports. Pi also has wifi built in. Similarly to the Arduino, there are also I/O pins for your Pi to interact with non integrated devices. Being that this is a computer and not simply a microcontroller, it can run scripts from many different programming languages as well as run several at once. This has lead to people creating numerous libraries you can use to help get your project code up and running. Need help getting started with your Pi? I recommend following along with their getting started guide.
 
Last edited:

Beard of the Forest

The No. 1 cause of forest fires is trees.
Jan 16, 2018
145
469
330
Forest
Electronics

Electronics is a very wide and diverse subject and I'm far from the right person to go into very much detail about it. I will however go over some common components likely to be utilized in beginner projects and explain their functionality. I'll also be appending helpful resources as I find them.

Resistor: A resistor is a component designed to add resistance to a circuit. The amount of resistance it adds is measured in ohms. These will be used in pretty much every circuit you ever make, so get used to them. The colored bars painted on them indicate the ohms of resistance for that individual component. These are used to lower the current passing through a circuit.
resistors.jpg


Capacitor: Capacitors are used for storing and discharging energy. The amount of energy a capacitor can store is called it's capacitance and is measured in farads. Capacitors can be used simply as energy storage as wells as for pulsed power among many other things.
F3654650-01.jpg


Transistor: A transistor is quite simply a switch that can be turned on or off based on the electrical signal received. This makes them ideal for use in electronic logic gates.
ySOXJkg.jpg


LED: LED stands for Light Emitting Diode. Being a diode means that it will only allow a current to flow through it in a single direction. You'll almost certainly be using these in your first few projects for their light emitting properties.
5mm-transparent-yellow-led-package-10-2628-11-K.jpg


Inductor: An inductor is simply a wire that's been wrapped around a core. If the core is non conductive or there is no core, it's referred to as an air core inductor. Similarly to capacitors, inductors also store power and their inductance is measured in henrys. Generally speaking, the more loops, the more inductance an inductor will have. Pass a current through an inductor and you've made yourself an electromagnet. Pass a magnet through the core and it produces current.
IMG_6888b.jpg


Breadboard: (solderless) breadboards are a tool used for prototyping circuits. By plugging wires and components into the breadboard you can test a circuit's functionality before soldering connections together. They're pretty much a must have if you're creating electronic circuits.
BHvEZsd.jpg
 
Last edited:
Mar 26, 2011
1,470
671
620
I currently don’t have one but it was always interesting for me. Maybe I’m gonna buy one in the near future.

Subscribed 👍🏼 Can’t wait to see what you guys come up with
 

TrainedRage

Member
Feb 3, 2018
3,530
3,672
370
35
USA
Im teaching some of my students how to write simple code and program it to a microbit.
13988-04.jpg

They absolutely love it. I think im going to let them keep them. Coolest part is using the 'shake' feature. The gyro picks up when it shakes and then you can code that, I told them they could put it on a bike or on them when they walk to school and it will say or show something/ blink/animate... It blew their little minds. Great topic Beard of the Forest Beard of the Forest

I will see if its ok for me to post pictures in the future. Its great to see kids pick this up so damn fast, pretty amazing actually.

Pretty simple resource for beginners, you can mess around and try it on a digital microcontroller to test it. https://makecode.microbit.org/ *click get started for an easy fun little tutorial to get started.
 
Last edited:

oxrock

Gravity is a myth, the Earth SUCKS!
Nov 30, 2004
2,803
91
1,500
I recently made a ground drone with streaming video as well as an android app so people could control similar vehicles without having to write their own server/client scripts. I'll take some pictures and make up a project post tomorrow.
 
  • Like
Reactions: SecretOfEvermore
Mar 26, 2011
1,470
671
620
I recently made a ground drone with streaming video as well as an android app so people could control similar vehicles without having to write their own server/client scripts. I'll take some pictures and make up a project post tomorrow.

I would love to see that. Sounds really cool.
 

hariseldon

Member
Aug 22, 2018
2,304
3,178
275
Tbh my pi is just doing a job as a plex media server at the moment, I got it when Amazon killed their music locker - I realised I wasn't going to be able to stream music anymore as they keep losing tracks, as do all of those services. I wanted to retain ownership to all the random shit I've acquired over the years so plex media server it is. I've also got a little web server installed on it and will likely do something fun with an Angular front end and Spring Boot back end just for shits and giggles at some point.
 

llien

Member
Feb 1, 2017
4,166
1,484
475
Thank you for the fantastic thread Beard of the Forest Beard of the Forest !


My own success/fail stories with Arduino/Pi:

Failed to do PID (that would control my Gaggia Classic coffee machine). After buying all the needed parts, including PT100 sensor, I've chicked out with simply installing "conventional" thermo pair thermometer.

Failed to do Ambilight project (mimicking what Philips ambilight is doing using RGB LED stripes with individually addressable pixels), bought all the needed stuff, but before it arrived I've lost the steam. Might try it later on.

Successfully installed Raspberry Pi with RetroPi (amazing software package) in it into a home made arcade machine.

Success: my daughter liked fiddling with the Arduino set together with me. (I was surprised how polished a product it is)
 
Last edited:

hariseldon

Member
Aug 22, 2018
2,304
3,178
275
Ah yes I forgot RetroPi, that's probably what I'll do with my 2nd Pi (a pi 1 - I had that but it didn't have the grunt to run plex so I got a 3 for that and will use the 1 for retropi).
 

Ecto311

Member
May 26, 2007
5,578
82
985
39
USA
We built the voice google aiy kit this weekend. The hardware part was easy but goddamn is the pi a sluggish turd when trying to get into the software and do the credentials thing through google to use their api for voice. It's kinda cool but I am really excited to see my kid use it in her science projects in school. That coupled with scratch programming and man she is lightyears ahead of anything I was aware of at her age. Plus if any of you have a microcenter close the kits are down from $30 to $5. Pi zero w are also $5 most of the time too.

26A1e13l.jpg


edit: anyone use a pi-hole? I was installing it but then I remembered sometimes those blockers can block out things you need on a site and that would be a colossal pain in the dick if it did that on everything hooked to my wifi and I can't get into things as needed. adblock and ublock will sometimes kick out links or buttons that you need and I wonder if pi-hole actually helps or just makes it adfree on everything but slower or a pain in the ass?
 
Last edited:

Ecto311

Member
May 26, 2007
5,578
82
985
39
USA
I have several Raspberry Pi 3's but I only use them for one thing..

3X1neHf.png
I had that setup for my maker select and it started failing prints on me so I went back to the SD card reader built in on the control box and had no more issues. Not sure what the issue was because it was nice to initiate the machine from my desktop pc.
 
Last edited:

Mr Nash

square pies = communism
Jun 8, 2004
4,283
322
1,505
I mostly want a Pi for putting together a RetroPie. Also wouldn't mind trying to set one up as a straight desktop computer. I know I'd be limited to an extent (last I checked stuff like YouTube didn't work well on it), but as a simple machine for going on the internet, word processing, and some retro games, it could be useful.
 

hariseldon

Member
Aug 22, 2018
2,304
3,178
275
I mostly want a Pi for putting together a RetroPie. Also wouldn't mind trying to set one up as a straight desktop computer. I know I'd be limited to an extent (last I checked stuff like YouTube didn't work well on it), but as a simple machine for going on the internet, word processing, and some retro games, it could be useful.

Mine are both a bit laggy for desktop use.
 
Last edited:

jep_uk

Member
Nov 5, 2014
256
12
270
Warrington, England
I built a music streamer (picoreplayer) with touch screen and the smarti pi case. Used a hifiberry dac + and added a power control from audiophonics. Works brilliantly with logitech media server on my nas. Cant belive how easy it was with all the tutorials and didnt have to do any coding (thankfully as I cant code). Will upload some pics when i get chance. Thinking of making a base unit to change location of power button and comnecions.
Edit: can you not insert pics direct from your phone? Does it have to be hosted?
 
Last edited:

oxrock

Gravity is a myth, the Earth SUCKS!
Nov 30, 2004
2,803
91
1,500
1M4ecYg.jpg

8eRkc2F.jpg





The media above shows the ground drone I completed recently. It's a simple 4 wheeled, tank steering, motorized ground drone with streaming video and working "headlights". This was never intended to be a permanent build but simply a prototype to fool around with before recycling it's parts and doing another project. As such, I will admit it's not as refined as it could be.

The onboard brain consists of a raspberry pi with an adafruit motor hat. The Pi is powered by a 5v rechargable battery a friend donated (accidentally left behind on his last visit), while the motorhat/4 dc motors are running off a 4xAA battery bank. The chassis is a DIY kit I bought off Amazon called 4WD Smart Robot Car Chassis. It's nothing special really, but it gave me enough space to throw everything on there, it functions fine and it was cheap. No complaints really. The webcam is an old one I've had laying around unused for years. The focus is quite wonky on it (as you will probably notice in the video), but it was recognized without a fuss on the pi and worked without any issues with opencv, so I'm quite happy about that. I tried using the Pi-cam but it seemed pretty awful. The "headlights" are just 2x LEDs on either side of the camera that can toggle on and off. I mounted them in makeshift tinfoil reflectors but I honestly don't know if the reflectors do much of anything. I was quite surprised by how much the LEDs aid with navigating in the dark though.

Even though I'm more comfortable coding than I am with electronics, it actually took far longer getting the server/client scripts up and running for the control functionality on top of dealing with camera stuff. It was such a hassle that I decided I would go out of my way to save other people from having to deal with it. So I decided to create my own smartphone app for people to use as a controller for their own creations with video streaming built into it. I also posted a sample server script on github for people to use in conjunction with the app. Sadly, I doubt the tiny niche group of people who would even get any use out of such an app will ever know about it, but at least I tried. Hopefully I save at least a few people a headache. (I am aware that there are other wifi controller apps, however I didn't see any with streaming video built in. Being able to see the video feed while controlling something from a thousand miles away is pretty important!)

Here's the link to my app for any who may be interested: Drone Controller with Video
github repo: Server Script

It's completed, functional, and I honestly learned a lot. So I'd say it was a pretty big success. Eventually I'd like to build a similar drone with more sensors, maybe some solar panels and try to integrate machine learning in there somewhere. Obviously it's not practical at all, I'm not really doing anything important with it, but who said a hobby needs to be practical? :)
 

EviLore

Expansive Ellipses
Staff member
May 30, 2004
20,749
6,720
1,965
Bump. Great thread, Beard of the Forest Beard of the Forest . Was getting quite into hobbyist electronics last year before life derailed that for a bit. Ended up with a lot of 18650 cells and other components for an electric longboard build, but tbh I have so many 18650 cells beyond what I need to complete that haha, gonna be looking for other projects to utilize them for. The 18650 li-ion cell is seriously one of the coolest pieces of technology. So versatile, stable, efficient, energy dense, rechargeable, easy to run in series/parallel at just about any scale (see: Tesla EVs). Swoon. Pretty easy to salvage them from laptop battery packs, can be significantly cheaper to get the good ones that way if you know what cells are in 'em (handle with care, don't die etc.)

Ahem. Anyway, poking around the interwebs for what folks have come up with for 18650 uses outside of the standard battery packs for EVs/e-bikes/e-boards, awesome flashlights, and vapes.

Some neat stuff here: https://hackaday.io/projects?tag=18650


Wearable electronics :D

https://hackaday.io/project/158018-i-shall-name-him-rave-face

 
  • Like
Reactions: Shifty. and llien

Fnord

Member
Jul 10, 2013
1,282
171
365
52
Mount Pleasant, SC
I've got one RasPi running Octoprint on my CR-10 and another set up running RetroPi. I also ended up having to get an Arduino to flash the firmware on my CR-10. It's an early model with no bootloader, so the Arduino was needed as a go-between to get a bootloader installed.
 

llien

Member
Feb 1, 2017
4,166
1,484
475
Recently I got interested in "home automation", with ZigBee wireless standard (very power efficient, to get ZB certified, if battery powered, device must be capable of working for at least 2 years with one battery set) looking promising. The idea behind it is to let devices (e.g. motion sensor, dimmable/color light bulb, surveilance camera, temperature sensor, jalousie etc) from different manufacturers work together.

That in theory. In practice, one could use IKEA's bulb's with Phillips, but that would mean losing certain features (e.g. setting color values, only on/off/dimming would work)

One needs a "hub" like device to coordinate such devices, in ZB world it's called "gateway". They used to be quite expensive, but can be had for about 30$ and below (in bundles with other stuff). So, Philips Hue gateway would have limited functionality with IKEA's stuff and vice versa.

It's notable that sticking with just one manufacturer doesn't quite work, on top of it, IKEA stuff costs a fraction of Phillip's (10 Euro vs 30 Euro per light bulb), so having a universal gateway would be a good idea, I thought.

Hey, I thought, I know where to look for universal stuff: Linux & Co.

Quick searching on the internet, and viola, ZigBee shields for PI are available.

But then... wait a sec, where is the software that can do things? It looks like it simply isn't there... =/
The OpenHAB project I've come across is focusing on coordinating work of multiple gateways, but I could not find a project that would be focusing on building "universal gateway". But then, why would anyone buy a ZigBee shield.

Any experience with this, comrades? Am I searching it wrong?
 

Shifty.

Member
Sep 25, 2015
5,401
2,701
340
Somewhere in space
Ooh, cool thread. I didn't know we had this, thanks for bumping EviLore EviLore .

Guess I'll post up the NeGcon USB adapter project I built a couple of years back:

5eKCbE7l.jpg


Everyone remembers the NeGcon, right? Namco's novelty twisty racing controller for the PS1. I got myself one of these while I was on a serious WipEout kick and wanted to get it hooked up to my PC for the purposes of stuff like emulation and forwarding its inputs to a PS3 via a XIM-like gadget. I got a couple of standard PS1 adapters off amazon, and was disappointed to find out that both of them totally butchered the NeGcon's input by adding large deadzones and mis-mapping the analog buttons to digital ones.

Long story short, I decided that I was too far in to give up now, and started researching how to build my own adapter. Enter the PJRC Teensy 3.1 USB development board:

1fU4nLTl.jpg


It's a tiny arduino-compatible board with USB HID functionality that can be configured to appear as a mouse, keyboard or gamepad, among various other things. You write an arduino program to process input from the various pins, then set the state of your output device via a simple API.

So, the idea is to wire this thing up to a PS1 controller port scavenged from another adapter, bit-bang the NeGcon's serial communication protocol, and convert its input into USB HID format that a PC or PS3 can understand. After a bit of research into how the PS1 pad actually communicates on a hardware level, I was able to draw up a basic pinout:

CN322dPl.jpg


Apologies for the biro and godawful handwriting- It's a bit spartan, but it gets the idea across.

With this design in hand, I took apart the rubbish adapter that started this whole thing off and got to soldering:

eZybJdil.jpg


Three intensely stressful days of soldering, testing, desoldering and testing later, it finally came together and worked! I was terrified of destroying the board through exposure to too much heat, but it ended up being durable enough to withstand babby's first proper electronics project. I'm a programmer by trade, so hardware isn't usually my area of expertise.

If you look carefully, you'll see that the CLK pin's position on the teensy actually differs from the pinout in the previous image. That's because the LED on that pin (which is built into the teensy) was interfering with the signal and causing the serial communication to fail, so I moved it and modified the firmware accordingly.

It turned out decently in the end considering that I was mostly working with whatever bits and bobs I had leftover from modchipping a sega saturn many years ago. I did end up accidentally soldering the controller port pins in reverse order on my first try though- how embarrasing :messenger_grinning_sweat:

And so, working prototype in hand, I booted up WipEout XL:

jry8p2Fl.jpg


And it was worth every minute. Without the enormous artificial deadzone, the analog twist on the NeGcon is super precise, and having analog control over your airbrakes and accelerator is quite frankly the only way to play classic WipEout.

I figured that I'd need to build a housing if I wanted to call the project done and keep my work safe. Not having access to a 3D printer, I decided to once again cobble something together from whatever I had to hand:

S6AnsQ0l.jpg


One cardboard incense box, some scissors and a whole bunch of electrical tape later, and we have a passable housing. The flap on the left lifts up and allows access to the teensy itself for debugging purposes.

As a finishing touch, I printed out a NeGcon + USB logo on paper and secured it with some more electrical tape. It's ghetto as all hell, but I think it turned out pretty well:

9z5ZWnRl.jpg


I've since added a bunch of firmware features like deadzone inversion (for counteracting existing deadzones built into games), analog offsetting (to account for minor hardware defects since the NeGcon itself is quite old), and per-game input profiles that are stored in binary form on the teensy's built-in NAND and loaded in response to button combinations. Everything I need for a solid NeGcon experience on any platform that supports USB HID gamepads :messenger_beaming:
 
Last edited:

hollowcupra

Member
Oct 26, 2017
119
67
170
Last edited:

oxrock

Gravity is a myth, the Earth SUCKS!
Nov 30, 2004
2,803
91
1,500
1M4ecYg.jpg

8eRkc2F.jpg





The media above shows the ground drone I completed recently. It's a simple 4 wheeled, tank steering, motorized ground drone with streaming video and working "headlights". This was never intended to be a permanent build but simply a prototype to fool around with before recycling it's parts and doing another project. As such, I will admit it's not as refined as it could be.

The onboard brain consists of a raspberry pi with an adafruit motor hat. The Pi is powered by a 5v rechargable battery a friend donated (accidentally left behind on his last visit), while the motorhat/4 dc motors are running off a 4xAA battery bank. The chassis is a DIY kit I bought off Amazon called 4WD Smart Robot Car Chassis. It's nothing special really, but it gave me enough space to throw everything on there, it functions fine and it was cheap. No complaints really. The webcam is an old one I've had laying around unused for years. The focus is quite wonky on it (as you will probably notice in the video), but it was recognized without a fuss on the pi and worked without any issues with opencv, so I'm quite happy about that. I tried using the Pi-cam but it seemed pretty awful. The "headlights" are just 2x LEDs on either side of the camera that can toggle on and off. I mounted them in makeshift tinfoil reflectors but I honestly don't know if the reflectors do much of anything. I was quite surprised by how much the LEDs aid with navigating in the dark though.

Even though I'm more comfortable coding than I am with electronics, it actually took far longer getting the server/client scripts up and running for the control functionality on top of dealing with camera stuff. It was such a hassle that I decided I would go out of my way to save other people from having to deal with it. So I decided to create my own smartphone app for people to use as a controller for their own creations with video streaming built into it. I also posted a sample server script on github for people to use in conjunction with the app. Sadly, I doubt the tiny niche group of people who would even get any use out of such an app will ever know about it, but at least I tried. Hopefully I save at least a few people a headache. (I am aware that there are other wifi controller apps, however I didn't see any with streaming video built in. Being able to see the video feed while controlling something from a thousand miles away is pretty important!)

Here's the link to my app for any who may be interested: Drone Controller with Video
github repo: Server Script

It's completed, functional, and I honestly learned a lot. So I'd say it was a pretty big success. Eventually I'd like to build a similar drone with more sensors, maybe some solar panels and try to integrate machine learning in there somewhere. Obviously it's not practical at all, I'm not really doing anything important with it, but who said a hobby needs to be practical? :)


I just updated the app on the play store this evening. Drone Controller With Video now supports MJPEG video streaming. This should hopefully go a long way towards making this app easier to implement while also improving performance over long distances. I'm pretty happy with the performance increase and how the app has turned out overall. So maybe it's a good time for some drone upgrades. Right now my drone is only utilizing 1 of the 4 action buttons. "Action 1" is being used to toggle the lights on and off currently. I think it's a shame not to add some more functionality to it. What do you guys think would be some fun improvements to add? The only thing I've thought of so far was a horn. That just doesn't seem overly exciting to me though.
 
Last edited:
  • Like
Reactions: llien and EviLore

EviLore

Expansive Ellipses
Staff member
May 30, 2004
20,749
6,720
1,965
I just updated the app on the play store this evening. Drone Controller With Video now supports MJPEG video streaming. This should hopefully go a long way towards making this app easier to implement while also improving performance over long distances. I'm pretty happy with the performance increase and how the app has turned out overall. So maybe it's a good time for some drone upgrades. Right now my drone is only utilizing 1 of the 4 action buttons. "Action 1" is being used to toggle the lights on and off currently. I think it's a shame not to add some more functionality to it. What do you guys think would be some fun improvements to add? The only thing I've thought of so far was a horn. That just doesn't seem overly exciting to me though.

Laser
Flamethrower
Grappling hook
 

LoadMaster

Neo Member
Jan 28, 2019
1
0
60
Is there a newer more powerful raspberry pi coming out that can handle multi player n64 emulators?
It was the only thing holding me back from the build.
I heard it can run N64 but not well.
 

llien

Member
Feb 1, 2017
4,166
1,484
475
There have been curious development on ambilight front.

Sync My Lights app approach:

They "pre-render" the ambilight profile of the movies, then you are manually starting/pausing it.
Works with Phillips Hue.
 
  • Like
Reactions: Makariel

oxrock

Gravity is a myth, the Earth SUCKS!
Nov 30, 2004
2,803
91
1,500
Laser
Flamethrower
Grappling hook
Laser sounds interesting, but I think I'd prefer not to burn out my retinas for now
Flamethrower is similarly awesome however I like having a home to live in and my pets like their fur.
Grappling hook is an intriguing idea and I feel less prone to horribly backfiring and damaging components. I don't think it would be too hard to 3d print a solution. I'll update with pics when I get around to tackling this.
 

oxrock

Gravity is a myth, the Earth SUCKS!
Nov 30, 2004
2,803
91
1,500
Is there a newer more powerful raspberry pi coming out that can handle multi player n64 emulators?
It was the only thing holding me back from the build.
I heard it can run N64 but not well.
My understanding is that N64 emulators simply don't interact well with the pi. Even if they'll run error free, they'll do so at a sluggish pace. I'm admittedly not well informed on the matter as to go into details why however. Here's a reddit post going into it a bit:
As for there being a new pi out, I assume you're referring to this? That's not setup as a hobby board and is intended for for industry applications. It may very well be better suited for running N64 emulators with the proper components and software, but I would know even less about that.
 

Pumpkin Seeds

Member
Jul 13, 2018
412
395
215
I have found that PSP emus work better than the n64 or Dreamcast ones on Pi.

My next project is going to be either a media/streaming device or a tablet/laptop. I'd prefer to do the tablet idea, but the fabrication of the case is the main drawback. A lot of people use wood, but I do not like that idea at all. Found some chunky DIY tablet cases on Amazon. I might go for one of those and attach a stand so you can plug in a Kb/mouse and do laptop work. Not using a Pi on that though. Mos tlikely a rockchip or Asus tinker board.
 

Kazza

Member
Oct 6, 2018
574
647
255
Is there a newer more powerful raspberry pi coming out that can handle multi player n64 emulators?
It was the only thing holding me back from the build.
I heard it can run N64 but not well.

Tom's Hardware recently conducted an interview with the creator and CEO of the Raspberry Pi. They asked him about a possible Raspberry Pi 4. With the inevitable improvement in specs, hopefully it will be able to emulate N64, Dreamcast, and Gamecube games smoothly (which isn't possible with the current one). Although he was a little vague with his info, this is what they got out of him:
1. Not coming until 2020 at the earliest
2. Going to 28nm feasible, but won't go as low as 7nm
3. Will cost $35 (as the others all have)
4. Will likely be keep the same size/dimensions as the 3 (good news for those who already have a nice case that they want to reuse)

Speaking of cases, Retroflag recently released this work of art:

617ktltD9RL._SL1500_.jpg


71nXq5M1o5L._SL1500_.jpg
 
Last edited:
  • Like
Reactions: hariseldon