Pi Power Puissance

A project log for Wilcox Gay A46 Internet Radio

A 'basket case' antique set with working audio amp, shot RF stages (mice). Turn it into a Raspberry Pi-based internet radio!

tomcircuittomcircuit 11/27/2017 at 03:020 Comments

With the hardware ready (as far I as knew) the next step was to start on the PIC MCU code that interfaces to the Raspberry Pi.  In essence, there are really three tasks to be handled by the PIC:

  1. Pi Power controller - orderly power-down in particular!
  2. I2C slave to provide tuning, band, and volume potentiometer readings to the Pi
  3. RGB WS2811 pixel control

I was able to tackle the first item, and I'm quite satisfied with the result.  As I've mentioned previously, my power controller is heavily based upon the work of James Lewis, aka the Bald Engineer. I didn't use an Arduino, of course, and I ended up implementing a slightly different state machine - but for the most part it's the same idea. In short:

I've tested this quite a bit with various scenarios - I won't say it's bulletproof, but for the most part seems to be working well. Again, not my idea, so I'm more worried about my implementation than the whole concept itself!

I have implemented the second item, I2C slave, but yet to test it. I need to play with the Pi now to send some I2C messages and see if (how?) the PIC responds. In the meantime I've read a ton of stuff on the intrawebs about how the microchip I2C slave code is perhaps not-so-great, and/or how the I2C peripheral itself isn't so perfect when in slave mode.  Oh joy.

The third task, WS2811 pixel control, should have been easy - as I did this already in my Rubidium Timebase project. However, for some reason it's not working... Grrrrrrrr!

But for now, I'm happy that I have a Pi that powers up and down (safely) when I turn the "power switch" on the old tube set.