1 2 3
Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/4/20 5:56 p.m.

I ended up with an old radio and instead of restoring it, accidentally turned it into a streaming hub and backup server. Then I bought another, and turned it into an Airplay target so I could listen to something other than AM radio. And then things got further off-script as I got more and more interested in little tiny computers.

So, to save the vintage radio buffs, here are Keith's Adventures in Embedded Computing. I'm hoping others chime in with their adventures, because one of the best parts of this sort of creativity is seeing what people do with this hardware.

Brief recap of the two radios. One was a full cabinet that I gutted and put a Raspberry Pi 4 inside. It's set up to be a Plex media server with 2TB of RAID storage that is also shared over the network so I can easily load it up. It's also an Airplay target with a HiFiBerry Amp2 driving a 12" speaker, and the tuning dial lights come on when it's playing over Airplay. It's also a Time Machine server so I can back up the Macbooks to another 4 TB drive. Future plans include a bit more refinishing to the top as well as making the original volume knob functional.

The other radio is a GE F-63 desktop. It's running a Pi Zero W and a HiFiBerry Miniamp. The external power switch works on this one so it's easy to move around. I'm still working on this one, I have some odd network behavior that's causing the Zero to saturate the 2.4GHz channels and freeze. I was able to build this one in without molesting the original tube radio so it can be fully restored in the future if desired.

There's another Pi 4 in the house that's set up as a Pi Hole, filtering ad-related IP addresses at the network level. I'm using an over-specified 4 for this because my very paranoid router wants it to be connected via wired ethernet instead of through the wifi access point, and I had one. The Pi Hole, by the way, is a fantastic thing.

So there are the old projects. If anyone wants details or has ideas on cool extensions to these, pipe up! I'm going to continue with the newest build.

trumant
trumant GRM+ Memberand New Reader
2/4/20 6:02 p.m.

These are all cool as hell! I love vintage audio and I work in software so this is right up my alley.

 

We have one Pi in the House courtesy of a Kano DIY computer kit I bought my oldest son a few years ago. It's been unused since he built a NUC and I've wondered how I might be able to repurpose it. Now you are giving me some good ideas.

Stefan
Stefan GRM+ Memberand MegaDork
2/4/20 6:10 p.m.

In reply to trumant :

Pi-Hole for blocking ads on your home network.

AV Streaming solution (as evidenced here by Keith)

Custom gauge setup for your project car

A print server for your 3D printer, CNC Router, Laser Cutter, etc.

trumant
trumant GRM+ Memberand New Reader
2/4/20 6:12 p.m.

PiHole and is now on my to research list.

trumant
trumant GRM+ Memberand New Reader
2/4/20 6:14 p.m.

https://pi-hole.net/ is everything I ever wanted and more!

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/4/20 6:16 p.m.

Problem: I have a metal shop with a gas infrared heater on a thermostat. When the heater is running, it pumps moisture into the air. This moisture then condenses on the cold metal walls and makes it rain. Seriously, I have to put out buckets for where it comes through the seams in the insulation. I have stuff in this shop that I don't want to freeze (like race cars) so the heater has to run. There's an exhaust fan on one wall, and running that solves the problem. However, that means the fan is running 24/7 and it's going to fail at some point.

I don't like commercial Internet of Things devices due to reliance on an external Mother Server that can go away and brick your stuff (see Sonos, UnderArmor, Nest for very recent examples) and due to privacy concerns (see Alexa, Ring, etc). 

So the plan is to build a weather station. It will measure both temperature and humidity in the shop, and turn on the heater or the fan whenever one gets to an undesirable number. I want them to react separately as they will not be directly linked. I'd also like to add a web interface I can access on my local network so I can check on conditions in the shop, fire up the heater if I'm planning go down there and work and maybe send me an email if the temperature drops near freezing.

I started with another Pi Zero W, which is the size of a Hot Wheels and costs $10. I added a temperature/humidity sensor  (SHT31-D) and a cute little 135x240 display with two buttons. The display will let me check the conditions when I'm in the shop and adjust the temperature directly.

Here's the current status. The little computer fan is there so I can watch it spin for my own entertainment when the exhaust fan is triggered. The humidity sensor is sensitive enough that you can hold a finger near it and watch the numbers react instantly. I've been testing it by breathing on it.

The sensor end. The relays are sitting on a little bracket that I printed out. I'll come up with an overall case design for this thing later once its proven it works. The relays are rated for 15A at 120v.

The current "interface". Time, target temperature and current status. I've programed in a bit of hysteresis ( I think that's the term) to allow for the fact that heaters and fans are physical things. The humidity target is currently hardcoded for 50%, and has a 15% margin. This means the fan comes on at 65% and turns off at 35%. I shall adjust these numbers. The temp is adjustable and has a 2C margin because I don't want to cycle the heater too quickly.

The web interface hasn't been coded yet, but shouldn't be too difficult. More to come as I test...

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/4/20 6:19 p.m.
trumant said:

https://pi-hole.net/ is everything I ever wanted and more!

Even better, here's a straight-up cookbook with a gratuitous display.

https://learn.adafruit.com/pi-hole-ad-blocker-with-pi-zero-w/overview-adafruit2

I access mine with a web browser, it has a very pretty display built in that lets you add domains to the white and black lists. It also gives web traffic analysis. Mine shows that the ad traffic on my network is around 15-23% of all queries. You would not believe the difference in load speeds because the ads just cease to exist. I've got my router set up to use the Pi Hole as a default DNS, so anything that's connected to the network uses it by default.

T.J.
T.J. MegaDork
2/4/20 6:50 p.m.

The only Pi I have runs Octoprint and is how I interface with my 3D printer that itself runs on an Arduino.

I think I really should build a Pi hole though.

dculberson
dculberson MegaDork
2/4/20 7:56 p.m.

Hmm.. heating the shop then immediately blowing the heat back out with the vent fan seems counter productive. Is there a way you could upgrade to a vented heater? Seems like the savings in propane would make it worth it.

trumant
trumant GRM+ Memberand New Reader
2/4/20 8:30 p.m.

In reply to dculberson :

Agreed that the venting the hot air via the fan seems like a curious route. Maybe instead of the exhaust fan consider adding a dehumidifier that kicks on based on the humidity.

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/4/20 9:05 p.m.
dculberson said:

Hmm.. heating the shop then immediately blowing the heat back out with the vent fan seems counter productive. Is there a way you could upgrade to a vented heater? Seems like the savings in propane would make it worth it.

I agree that it seems counterproductive. The heater is natural gas, and it doesn't cost all that much to deal with our climate. Pulling it out and installing something different would have a really, really long ROI. A humidifier is another option for sure but it would have to be one that self-empties and I'd have to find floor space for it.

I have a heater. I have a fan. All I don't have is a way to control it. I'm comfortable with this solution, my goal is to stop water from falling from the ceiling, not to decrease my relatively small energy costs. I've had the fan running 24/7 all winter so this setup will only improve things. With this doodad, I can actually log duty cycles and then I'll have better data on if I should do anything different.

hedg12
hedg12 New Reader
2/4/20 9:08 p.m.

I've been playing with some DIY home automation stuff with a pi 4. I feel the same way about off the shelf IOT - I don't want to be tied to someone else's servers just to turn on a light.
I'm using node-red and MQTT to control Shelly relay modules locally. (Well, OK, I only have 1 installed so far...) I also have networked cameras connected to Motioneye NVR software running on the pi, and 6TB of storage for recording camera video as well as backing up our computers and serving files. I've also been playing with a Pandora player called Pianobar, hopefully to distribute through the house one of these days...

codrus
codrus GRM+ Memberand UberDork
2/5/20 1:46 a.m.

A few years ago, a friend and I built an Arduino-based dash display for my Miata, using CAN bus and a nextion display.  I might have posted about this on GRM before, but if so I cant find it, so I'll post a bit about it here.

I've been tinkering with the Miata for a long time and it's got several pieces of aftermarket electronics in it -- A megasquirt 3 ECU, a RaceLogic Traction Control System and a Race Technologies DL1 datalogger.  The Arduino here talks to all of these, in some cases for useful stuff but in other cases just because it can.  This is mostly a toy. :)

Let's start with a picture:

The panel itself is a piece of acrylic (I think) that we laser cut and etched using a laser cutter at the (sadly, now defunct) TechShop.  My friend did most of that part, so I'm not really familiar with the details.

The Nextion display is in the center.  It's a roughly 400x200 pixel touchscreen with its own microprocessor on it and a serial port.  You use the Nextion software under Windows to create the screens, text boxes, pictures, etc that you want, compile it, and load the generated data onto the display.  After that you can send it commands over the serial port from the Arduino and it will reply back to indicate when buttons have been pressed, etc.

Down the left are 4 LEDs, the bottommost is tied into the RaceLogic TCS (flashes when active), the other three are driven from digital outs on the Arduino.

Two buttons at the top, one of them is a momentary switch to turn on/off datalogging on the DL1 datalogger.  The other is currently unassigned.

Two knobs on the bottom, the one on the left controls three boost settings.  Low boost cuts power to the boost control solenoid so that it's just running off the spring -- roughly 10 psi.  Medium boost enables power so it gets whatever the Megasquirt default boost target is (varies with throttle position, 15 psi at WOT).  High boost is wired to the "tableswitch" input on the MS3, and flips it over to around 20 psi.

The other knob controls the RaceLogic TCS, and is a 6-position knob that's wired the same way as the one that is supplied with that unit.  It's basically just got a bunch of resistors wired across the back so that the RL can tell what position it's in with 2 wires.  The red LED there turns on when the TC is disabled.

Wiring up the back of the faceplate:

The control for all of this is an Arduino 2560 Mega, it lives in a small box.

The actual arduino isn't visible (it's the bluish board on the bottom), the red board is a prototyping breadboard.  Soldered onto that are a real-time clock (round blue board on the left), a 12v -> 5v power supply (small square green board), the CAN bus interface (rectangular blue board top right), and three thermocouple reader boards (blue square boards bottom right, two of them are stacked).  The wires and pins coming off of it go to a molex 36-pin connector so I can unplug the whole thing.

The software that we wrote for the Arduino receives CAN bus data from the MS3 for things like RPM, MAP, VSS, etc and reads analog inputs connected to the thermocouple drivers for EGT and additional sensors (fuel pressure, oil temperature, etc).  It stashes these values in memory, pushing them out to the Nextion display over a serial port as needed.  If particular data values go outside of particular ranges then it turns on some of the warning LEDs -- high coolant temps, for example.

The software also periodically transmits the RTC time on the CAN bus over to the MS3 for SD card data logging purposes (the RTC in the MS3 is busted, but the MS software supports a CAN RTC as well).  Finally there's another serial port hooked up to the DL1 that receives the NMEA data stream coming off the GPS chip.

Like I said, this is mostly a toy rather than being genuinely useful.  The biggest problem with it is that the display is washed out in bright sunlight -- the nextions are designed to be inexpensive and unfortunately they don't offer an anti-glare screen option.  It's also small and inconveniently placed for reading while driving on the track.  The warning LEDs are the most useful bits, but even they are not well-placed.  If I were still using the Miata as my primary track car, I would think about mounting them closer to my line of sight while driving.

Demo video (not all of the data fields were working at this point):

 

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/5/20 7:40 a.m.

That's a nice implementation. It's only a matter of time before I do something mobile, but I need to develop my skill set further. I do enjoy the fact that there's all that tech on top of a bone stock radio :)

I got the first steps of the web interface for the shop controller working last night. We have communication one way, now I just need to make it two-way. Which, I realized in the shower this morning, is actually opening up a bunch of new things I need to learn. That's why I'm doing this!

bluej
bluej UberDork
2/5/20 10:33 a.m.

In reply to codrus :

That's nicely done, thanks for sharing! I call BS on the "unassigned" switch. You just left a big red button hooked up to nothing? Riiiight wink

 

Had you considered, or come across anyone using e-ink displays for better contrast? There are at least tir-color versions as well. Ada fruit linky

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/5/20 10:37 a.m.

I picked up an e-ink display to play with. Not sure what I'll use it for yet, I'll probably hang on until I work on something really power-sensitive.

Stefan
Stefan GRM+ Memberand MegaDork
2/5/20 10:56 a.m.
bluej said:

In reply to codrus :

That's nicely done, thanks for sharing! I call BS on the "unassigned" switch. You just left a big red button hooked up to nothing? Riiiight wink

 

Had you considered, or come across anyone using e-ink displays for better contrast? There are at least tir-color versions as well. Ada fruit linky

The biggest issue with e-ink is refresh rate, so its great for data that doesn't change too often.  For items where live data is more important, they don't seem to work very well.

bluej
bluej UberDork
2/5/20 11:31 a.m.
Stefan said:
bluej said:

In reply to codrus :

That's nicely done, thanks for sharing! I call BS on the "unassigned" switch. You just left a big red button hooked up to nothing? Riiiight wink

 

Had you considered, or come across anyone using e-ink displays for better contrast? There are at least tir-color versions as well. Ada fruit linky

The biggest issue with e-ink is refresh rate, so its great for data that doesn't change too often.  For items where live data is more important, they don't seem to work very well.

ah, I didn't know that. interesting. thanks for sharing.

Ransom
Ransom GRM+ Memberand UltimaDork
2/5/20 11:56 a.m.

This is awesome.

I wonder about e-ink for radio display in an old car... Would it look cool, or just incorrect? 

Dehumidifier possible two-birds solution: a lot of them self-empty, but don't pump. Wall-mount anywhere above and in the vicinity of a utility sink? I need to do the same thing in the basement, as the dehumidifier currently just drains into a floor drain, which is untidy.

I've got Sonos stuff, am thinking about a couple more, and am basically still torn about whether the work involved in this other stuff basically offsets the fact of an every-few-years "sunsetting..." 

I luuuuurve the GE...

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/5/20 12:02 p.m.

The shop doesn't have plumbing, so no drain is available. I'd have to dump through the wall into a gravel bed or something. This solution will be an improvement over my existing situation with minimal effort and expense.

e-ink would be interesting in an old car. Do it right, it might look pretty close to a printed gauge. Refresh looks a little odd - they'll often flash blank before refreshing - but it would be a good radio or exterior temp gauge. Something that's fairly stable. They're very legible in bright light and only use power when they're changing. They're perfect for e-readers because of this. I've also seen them used as price displays in supermarkets.

bluej
bluej UberDork
2/5/20 1:33 p.m.
Keith Tanner said:

The shop doesn't have plumbing, so no drain is available. I'd have to dump through the wall into a gravel bed or something. This solution will be an improvement over my existing situation with minimal effort and expense.

e-ink would be interesting in an old car. Do it right, it might look pretty close to a printed gauge. Refresh looks a little odd - they'll often flash blank before refreshing - but it would be a good radio or exterior temp gauge. Something that's fairly stable. They're very legible in bright light and only use power when they're changing. They're perfect for e-readers because of this. I've also seen them used as price displays in supermarkets.

I was starting to think through some sort of combo where the E-ink is the gauge background with a physical needle in front if you're able to have a hole through it. make it a stepper controlled by the same rpi/duino and you've got a universal gauge to play with. That could work well with the black/white/red ones.

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/5/20 2:44 p.m.

I like the thinking. 

bluej
bluej UberDork
2/5/20 3:18 p.m.

seems like new holes in E-ink is a no go. not surprising. Some gearing may still work to swing a needle if you can package it thin enough. Sounds like a good 3d printing project to me.

 

codrus
codrus GRM+ Memberand UberDork
2/5/20 3:40 p.m.

Yeah, I think the update rate would be a deal-breaker for using e-ink to do the kind of thing I was using the Nextion for in my Miata.

The two big advantages to the Nextion are the price ($25 for the one I used) and the integrated processor.  The AVR in the Arduino is an 8-bit microcontroller processor with between 4 and 8 kilobytes of ram (yes, kilobytes).  It's tiny, there's no way it can possible drive the frame buffer on a display by itself.  The integrated display processor does that, turning the text strings coming in over the serial port into pixels.

One might ask why not use a Raspberry Pi instead of an Arduino?  There's two reasons for that -- one is that the Pi really only has digital IO built into it, I'd have needed to add an A-to-D converter to read the thermocouples or pressure sensors.  The second reason is that the lack of power means the Arduino is very simple.  A Pi can take upwards of 30 seconds to boot which is fine for many applications but not so great if it's a display in a car.  The Arduino doesn't have to check filesystems, mount daemons, initialize network stacks, or anything like that -- you power it up and it's running your code faster than you can perceive.

I did hack a line input into the Miata's stereo, but it's closer to stock than almost any other part of the car! :)

NermalSnert
NermalSnert Reader
2/5/20 6:14 p.m.

Keith, Is the NG heater vented to the outside?

1 2 3

You'll need to log in to post.

Our Preferred Partners
3UrWJwffHh5H8xQDwyx5sWq7OnMH4As71hJ9jmPaAxh26ESk0BQgdIaOxWOZOCQL