No, you should really power them from 5V. Otherwise they can be unreliable, and the blue led will be weak, the colours will be off.
The question is whether you can run the logic (DIN) from 3.3V, and here some people do, but I’m not sure it’s good. It depends on the LEDs, but if they have “HIGH” as VDD * 0.7, then that is already 3.5V… if the 5V is a little more like 5.5V, its 3.85V… that’s the kind of area where individual boards may or may not work, depending on temperature for example. I would not do it.
But really, I think it depends on which LEDs you’re using. I’m sure there are ones designed for 3.3V by now?
I did try out driving a 5V NeoPixel using open-drain mode on a 3.3V logic (but 5V tolerant) pin - that worked for me.
I suppose the correct way to drive them is with one of these. I will just tie OE to 3.3V. Non-inverting 3.3 to 5V line driver. I like the X2SON5 package, although it is tiny.
Edit: Since I already ordered the TXU0101 1bit dual-supply level shifter for the FAN PWM I will go ahead and use that. Maybe there is a advantage to dual supply as well, it looks like it could be isolated. Unfortunately, now that I have decided to do this properly, and I will, the datasheet recommends small 0.1uF caps on the VCCA and VCCB input’s.
I think I will break out the Data-Out pin on the NEOPIXEL, this way the user can potentially connect a string of these LEDs, controlled by that one level shifter/trigger.
I have seen multiple ESP32 projects where they add a neopixel/digital led to the board, feed it 5v power through a diode so it becomes 4.3V and then 3.3v logic seems to work. The neopixel will shift the signal higher for output so it’s a commonly used strategy if you want to control a string of neopixels/digital leds to add one on the board with the diode trick, route it’s output to a header with ‘normal’ 5v power and use it as a poor mans level shifter and diagnostic led.
I did see that hack/trick, Im ok using the Schmitt-Trigger even though it does ad a small cost.
Just finishing up the Panel. I thought it a good idea to use the “frame” to make a SWD POGO pin programmer adapter for the ST-Link 2x7pin 1.27mm pitch header/cabel. Yet another cost, but I had to order some stuff I forgot, and just as well get free shipping. I’m including the reset pin, since the SWCLK is in use as TIM8_CH2.
As I understand it, it is possible to set up the ST-Link to use the reset line, when connecting the target?
There’s another hackaday post somewhere on the same topic where they compare different solutions to the problem… the sacrificial neopixel + Diode is certainly one of them, but if you have 5V tolerant pins the open drain solution needs only a single resistor, I don’t think it can be beat for cost… using a simple level shifter would need the shifter + 2 caps for decoupling, I don’t think it will cost more than Neopixel + Diode, and is somehow cleaner…
I broke out the SWO pin om the header. Part of the SPI interface, I think that is sufficient.
I like pogo-pins there is no room for the 14 pin 1.27 pitch on the board itself. Maybe I should omit the reset, since the virgins IC will not use SWCLK as TIM8_Ch2, if then a re-flash is needed or it’s bricked then the Reset button can be used. Hmmm it’s not like I’m planning on flashing it w. Pogo pins all the time, just once.
@runger the reason for pogo pins is my experience from last where it was a pain, although possible, to flash without. Those small SMD pogo’s are not too expensive
Now the POGO´s are 4pin style, like its customary. 3.3V, DIO, CLK, GND in that order. SWO and NRST can be connected if needed for some reason, like debugging.
Ive included the RX/TX pins, although I am not entirely sure how to use them. Seeing they are on pins 13/14 on the 14pin 1.27mm pitch ST-link connector, it would be foolish not to integrate them I agree @runger
You’ve built almost exactly what my goal is to build as well, so I’ll have a lot of questions for you if that’s ok. Have you released a schematic? This way I won’t have to ask so many things
So I actually need Wi-Fi control so I’ll end up using an ESP32, which will then require me to use the DRV8412. But it’s for a 6A Nema 34 stepper motor and will use the same encoder and similar power stage components. So this board is more of a guide, but this is one of the few large stepper motor boards that I see in this forum so it’s very helpful
You do know the ESP32 has verry poor ADC right ? Take a look at the specs. With a ESP32 you should be able to use a HALL-type current amplifier. Happy making! Create a new thread.
@dfrenkel if you expect to use wireless while reading the ESP32 ADC I think you are in for a challenge. I think @Valentine has some insight into this ?
Talking wireless got me thinking. I have some nrf53 samples sitting on my desk. The question is if the SPIN32 buck can provide the needed current @runger. I’m tempted to make a small add on layer/stack. It’s a dual core M-33 just waiting to be unleashed. So one core for BLE another for user code. Combine that with the G4 and you have a tri-core setup ready for any e-bike
Ultra-low-power radio with great sensitivity
The nRF5340 SoC radio sets a new standard when it comes to combining advanced features and minimizing current. The 0 dBm TX current is 3.4 mA, while the RX current is only 2.7 mA, resulting in a reduction of 29% and 41% when comparing to the nRF52840 SoC. The RX sensitivity is -98 dBm, 3 dB better than nRF52840, meaning that the nRF5340 provides 3 dB better sensitivity, while using 41% less current.
@Juan-Antonio_Soren_E , Regarding the ESP32 ADC, I came across this post from @runger in the discord channel, which is why I decided to stay with the ESP32:
"Look, the ADC is not very good on the ESP32, but I think it is good enough… perhaps @DavidG can comment on this, he has used it quite a bit. The many advantages of the ESP32 can outweigh this disadvantage, I think.
If you design the analog circuit to give a “loud and clear” signal in the 0V-3V range, you can probably do a lot to fix non-linearity in software, if you want…
But its undeniable that the ADCs on an STM32 are much better - but the chips cost more, don’t do WiFi or ESP-Now, and also, simply aren’t available right now "
I think at worst I can add an external ADC to I2C module because I understand wireless control on the ESP32 (I like ESPUI) very well and having dual cores will be very very helpful for my Wi-Fi project without adding too much complexity