The circuit represented in the attached works with a 3.3V Pro Mini. It moves the servo while playing music from the SD Card.
Since I need 5V to drive the Servo (I use a second source for the Servo with the Pro MIni-3.3V is OK for the board), I need to reduce the the power to the SD board.
The only changes I plan in order to run this from an Adafruit 5V Pro Trinket are to get rid of the external power for the Servo and add a voltage regulator for the SD card board. The voltage regulator will put out 3.3V to power the board. but it still has the 4 SPI connections to the Trinket.
Do I need to do anything with the SPI connections, like run them through level shifter (e,g. 74AHCT125)?
Thanks for your help.
Can’t follow that layout, please draw a circuit diagram that’s clearly labelled and uses
horizontal and vertical lines only…
AFAICT you want to power the PWM board and Servo at 6V and set Vcc of the PWM board
to 3.3V, no translation needed?
[ On further inspection its not clear what the voltage limits are for V+, Vcc is certainly
going to be 3.3V to 5V for the chip itself, which has an abs. max. of 5.5V.
I suspect V+ just powers the loads, and can be higher than 5.5V, but I’m not sure. Couldn’t
find an obvious schematic for it to confirm this though ]
– rereading it seems the 3.3V Pro Mini is irrelevant, yet you have you provided a
ftizing diagram of it - why?
If the whole system is 5V then yes you need level shifting to the SD card - there are
SD breakouts that include level shifting on-board. Note that SD cards take a lot
of current at 3.3V, several 100mA is possible, depending on the card, you won’t
be able to use one from coin cells, which your diagram implies you are using.
I did some more reading, including on the programming forum here. It appears that I need a level shifter. I found this:
https://www.adafruit.com/products/757 adafruit’s “4-channel I2C-safe Bi-directional Logic Level Converter.”
If I understand how it works, I do not need the voltage regulator, but connect the HV on the Adafruit board to 5V, the 3.3V on the SD card reader to LV on the Adafruit board, the GNDs to GND, and the 4 SPI connections from the reader to A1-A4 on the adafruit board, and B1-B4 on that board to the corresponding SPI connections on the Trinket (pins 10-13).
Does this make sense?
See revised drawing attached. My question is on the stuff on the right,
Mark T thank you.
See my later post. My question has nothing to do with the servo and the PWM board, it’s a question of how to power the 3.3V sd card board, including the SPI connections, from a 5V Trinket. I could use a voltage regulator, but I am concerned that the SPI connections won’t work. In the revision, I inserted an adafruit logic-level converter and removed the voltage regulator. I think that’s the answer, but I’d like confirmation.
I hope you can follow the revised picture. Again, it’s just the stuff on the right–Trinket<==>logic-level-converter<==>SD Card board.
Draw the diagram including just the relevant bits clearly labelled - anyway you've
not said which SDcard breakout, which level shifter, nor explained the coin-cell holder.
The way you use fritzing obscures most of the pin labels so its impossible to read
what is what - don't use wires at angles, its impossible to read, its a ratsnest.
I say again draw a clearly labelled diagram and take a photo, that's a circuit diagram.
Fritzing produces a wiring diagram, which isn't the same thing.
I revised the drawing again for clarity. This is really a simple question: Have I correctly represented the connection of a 3.3V SPI device to a 5V trinket using the Adafruit logic-level shifter? The shifter is described at the link in my second post.
Also, I would like to verify that I do not need a voltage regulator in addition to the shifter.
SD Card Shifter Trinket
3.3V LV HV 5V
GND GND GND GND
CS A1 B1 D10
DO A2 B2 D11
DI A3 B3 D12
SCK A3 B3 D13
Is this correct?
The answer appears to be that LV on the board is an input, so I DO need a voltage regulator, which will have 5V from the Trinket as an input. The VR Output will go to both LV on the level shifter and 3.3V on the SD board. [This from the Adafruit Support forum, and the hook-up guide for a similar Sparkfun shifter.]
The other connections are as noted in my last post. When I get the products I will test and post here if I learn anything else useful.
Got it done with existing components. I got confused when I found out the the 5V Pro Mini I was sent was actually a 3.3V, and went on a tangent chasing 5V for the servo.
Actually, I’m powering the circuit from a 6V battery, so I just need to connect the RAW pin on the Mini and the V+ pin on the PWM board to 6V, then connect Vcc on the mini (at 3.3V) to the SD card module, the amplifier circuit, and Vcc on the PWM board.
So, I don’t need buy a Trinket or a level shifter. See attached: it works…