Hi guys, I have the SimpleFOCShield v3.2 but I think I found a problem… at least in the schematic. I am connecting my shield to an ESP32 and so I soldered the jumper for 3.3v logic. This connects 3.3v to VDD:
Unfortunately the power for the ACS712 current measurers is connected to VDD so they will not work unless powered at 5v. I used a voltmeter to double check that 3.3v was really connected to the ACS712 power rail and it is.
But if I connect VDD to 5v I get 5v logic for my ESP32 which is bad.
So how do I power my ACS712 chips with 5v but use 3.3v logic?
I believe the shield is designed to work with Arduino which is 5V compatible/tolerant (you stick the shield on top of an Arduino Uno).
Using it with ESP32 which is not 5V tolerant is outside the shield specs as an edge case and you need voltage dividers to get 3.3V to not burn your MCU. I assume you used the shield with jumper wires so you need to make 5V to 3.3V dividers with resistors and a soldering iron before the ESP32.
In other words yes, we are relying on the MCU being 5V tolerant. Perhaps Antun @Antun_Skuric could add dividers with solder jumpers later if he has the time as a further improvement?
In my experience reagardless of supplying 3.3V or 5V to these sensors, they are centered around 2.5V (even if using 3.3v).
So you still lose some current measuring capacity, but not much really.
At 3.3V you can measure ± 4.32Amps and on 5V ±5Amps
Thanks for the reply. Great to know that it works okay at 3.3v however the pedant in me would be happy if the next version of the SimpleFOCShield had a 5v regulator, perhaps running off the 8v regulator already present.
IMHO that significantly complicates things, as then the output would be ratiometric around 5V/2… this would not be in the middle of the 3.3V MCUs ADC range, so then you’d have to down-shift the current sense signals, but only for the 3.3V MCUs…
Also you’d lose the reference voltage, which at the moment is the native voltage of the MCU. But with the additional regulator it would be based whatever that one outputs, which won’t be exactly 5V. So to do a clean job you’d also have to connect this signal (appropriately divided down for the 3.3V MCUs) to the AREF or another ADC channel to have a reference…
This is a good point and using 5v with a 3.3v MCU means losing 1 pin to ADC (no problem on the ESP32 with 20 ADC pins but Arduino Uno just has 6). While I am glad to have the SimpleFOCShield to test with, ultimately with my professional electronics engineer background I do not like to be running components outside of their specification.
In my book, if the datasheet gives the minimum supply voltage as 4.5v then that is what I should adhere to unless I want to risk odd behaviour. Each to their own!