Full Version: Powering a 3v PADI and a 5v LED strip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So. I think I'm honestly a bit out of my depth here... confident with software, rank beginner at hardware! But I'm having fun, so pushing on.

My goal is an Xmas present for my partner (she likes lights): 

1. Have the PADI available on an IP address on our LAN, responding to requests over whatever protocol (CoAP looks pretty interesting, though if support isn't quite there I'm sure anything would be fine).
2. In response to a request, PADI talks to a DotStar LED strip via SPI. Hell, I'd settle for turning it on to begin with!
3. PADI can feed back information on its current settings. "What colour am I?" "How bright am I?"

DotStars are 5v devices. I have a couple of strips, to one of which I've wired a 6v battery pack (4 x AAA) with a diode using the technique described here to drop the voltage. So I can power the strip independently, and in the meantime I can just power the PADI using a breadboard PSU (eventually it'd be nice to make the whole thing portable with a second battery supply).

I'm working from our holiday location away from major sources of components, and I only realised the day before we left that I needed some sort of logic level shifter. Adafruit recommends 74AHCT125 but they're a bit hard to come by in New Zealand. I did manage to find some 74AHCT541's in through-hole format, and some of those are on the way... if they get here in time for me to finish before Xmas, I'll be able to wire all this up.

So my question is this: I know the PADI needs 3v3, and the DotStar strip needs 5v, and there needs to be a logic level conversion between the two. The Adafruit guide also says there needs to be a ground connection between the microcontroller and the strip (in addition to the data connections). Right now the battery is wired up like this:

[Image: gT87pXl.jpg]
It arrived with the two extra wires in addition to the four in the connector. I made use of those to hook up the battery. If I run the other positive wire (5v) to the voltage supply pin of the logic level shifter, and the ground to the ground pin, will that do the trick?

Or have I completely misunderstood and I should try to power the entire device using a single 5v power source, with some sort of step down to protect the PADI?
This is the kind of thing I was thinking of... replacing the 74AHCT125 with a 74AHCT541, the LED strip with a DotStar, and the batteries are AAA.

[Image: kGydSm7.png]

I rather expect this'll look very strange to anyone who actually knows what they're doing, but that's what the picture in my head looks like at the moment!
1/ Any logic level shifter will do the job, including a simple transistor, such as:

One directional is OK.

2/ What are these LEDs? ws2812b?
I recommend WS2812, they need only one signal write and they chain nicely.

But, I'm not sure if anybody has created RTL8710/PINE Stamp library driver for them (yet).
(01-01-2017, 04:15 PM)kissste Wrote: [ -> ]WS2812B driver for RTL-00

Thanks. :-)
Thanks! Shifter chips finally arrived, more complex than I needed but they were the easiest to come by. After talking to the Adafruit people on their forums here, I've hooked up everything like so:

[Image: wkYOJUk.png]

Which looks like this:

[Image: eMpegiH.jpg]

The LEDs are APA102's. I've just seen a response from Adafruit that says the resistor isn't necessary, so I'll leave it out.

[Image: Oq5Kqu8.jpg]