cancel
Showing results for 
Search instead for 
Did you mean: 

Powering Stm32f407vet6 from metal detector power supply

cristianosar
Associate III

I have some Pulse induction metal detector analog designs that I want to "digitalize" using a Stm32f407vet6 board. Unfortunately, these designs use the battery positive as ground. My intention is to power the Stm32 from the +5v rail of the detector power supply and then use logic in the Stm32 to generate the pulse timings and to read the preamp output with the ADC to check for metal detecting and eventually add some kind of discrimination logic.

My problem is the detector design that uses VB+ as ground so how can I power the stm32 properly and also give the ADC correct vref ?

I attached the pulse induction detector schematic I want to use as base and also the stm32f407vet6 schematic.

Thanks for the help.

1 ACCEPTED SOLUTION

Accepted Solutions

The LT1054, which implements the charge pump, can certainly be synchronised with an external frequency, as is already done in your schematics by the 555 via Q4.

Currently, the 555 is working with a fixed frequency, whereby the duty cycle can be adjusted via R5 and R14. You would therefore need to disconnect the output of the 555 from Q4 and Q2 and feed in the new frequency from the STM32 at this point. However, from the STM32's point of view, the 555 is below GND, which requires a level shifter. In addition, the frequency from the STM32 must not fail (e.g. during debugging) because it generates the VCC of the STM32 – unless you develop a fallback solution so that the 555 takes over as soon as the frequency from the STM32 fails.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

Don't let yourself get confused.

You should look at the system from the perspective of the STM32:

  • There is -5V, which is generated directly from the negative battery voltage.
  • There is GND.
  • There is +5V, which is generated from the negative battery voltage by means of a charge pump (U9, LT1054) working as a voltage doubler.

For the STM32, only GND and the positive voltage are relevant, which of course still has to be regulated to the typical 3.3V of the STM32.

Do not be confused by the positive battery terminal at GND. If you draw a simplified schematics (only the battery and the black box with GND, -5V and +5V), you will quickly see that the battery has simply been shifted downwards by its voltage and is therefore located ‘below’ GND. The +5V is then simply generated ‘upwards’ from the -5V.

So, everything's fine, right?

Regards
/Peter

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
cristianosar
Associate III

Thank you, but what about the ADC readings, Will I dont have wrong voltage readings because the Stm32 is not referenced to the same ground as the detector circuit?

 

Thanks.

Peter BENSCH
ST Employee

Well, I've only skimmed through your schematics - you cannot connect the ADC directly to the STM32 with the available schematics anyway, but it can of course be connected directly to GND (provided that you generate the 3.3V of the STM32 from the +5V and then connect the STM32 to 3.3V and GND). It seems to me that you plan to connect the ADC of the STM32 to TP4, i.e. the output of U3b, correct? 

If that's the case, you obviously need to consider the voltage range of this output. Since the opamp can drive in both directions, but depending on its load has a voltage drop of about 3...4V per side, it results in a voltage swing of about ±2...±4V with its ±5V supply.

The ADC of the STM32 cannot process negative input voltages, so you have to scale this voltage swing (with high-impedance load even almost ±5V) to the maximum range of the ADC (0...Vref).

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
cristianosar
Associate III

Thank you, I will do that, add a new (3.3v) regulator from the +5v and then power the Stm32 from there. A doubt I have, is there any chance of driving the charge pump frequency from the Stm32 (start driving it from the 555 and once Stm32 starts up, it takes the control)? I would like to do that because I want to control the detector frequency from the Stm32 logic and it is a good practice to sync the charge pump to the detector TX frequency.

Thanks.

The LT1054, which implements the charge pump, can certainly be synchronised with an external frequency, as is already done in your schematics by the 555 via Q4.

Currently, the 555 is working with a fixed frequency, whereby the duty cycle can be adjusted via R5 and R14. You would therefore need to disconnect the output of the 555 from Q4 and Q2 and feed in the new frequency from the STM32 at this point. However, from the STM32's point of view, the 555 is below GND, which requires a level shifter. In addition, the frequency from the STM32 must not fail (e.g. during debugging) because it generates the VCC of the STM32 – unless you develop a fallback solution so that the 555 takes over as soon as the frequency from the STM32 fails.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
cristianosar
Associate III

thank you