I want to develop simple FOC on renesas RH850 MCU

Dear Team ,

I want to implement simple FOC in Renesas MCU [ R7F701692 ] .
I have 1kw of SENSORED BLDC hub motor also I have hardware that have all kind support.

Please let me know guys, how to start with simple foc library!

Dipak Gurjar

Is the mcu supported by arduino? I dont see that mcu on the list of supported microcontrollers.

I don’t get why people are always trying to make their own motor drivers, at least in this power range when there are already lots of options.

There are some Renesas mcu with Arduino cores already, this does not seem to be one of them. Are you picking this mcu for cost reasons? Why not use any other available micro?

some people just like to make things? or the same reason you are intersted in a lepton 3- cost and performance of available products does not meet needs

1 Like

The 850 seems the high performance line, may be that’s why?

Yeah OP needs to pick one from the available line. The 850 is not there though.

Their IDE is a lot like Arduino

And it seems recently they are switching out of their in-house and moving everything to Arduino. May be because people didn’t like the electric pink color of their IDE?

It never hurts to have alternative MCUs, the more the better.


Well I’m not complaining, I just would prefer if people would pitch in to existing projects instead, because we would all get further faster. But of course if people want to just hack away whatever. I guess the OP is not interested in the lepton 3.0 type class anyway which is fine. Just a bit of a mystery. I only resorted to making my own driver after a thorough survey of options and finding nothing suitable. I guess in a way I’m trying to warn the OP it may be more work than they think. Just have a look at the amount of effort that went into the VESC project.

This kind of make-thy-own seems to be propelled in some cases by the desire to appear to customers etc as somehow more competent. I have heard expressed by someone that was considering making a driver based on SimpleFOC that the reason they didn’t want to contribute to the Lepton 3.0 and then use that was that they believed it would look less “professional” if their customers thought they just “took something off the internet for free”… and unfortunate anti-collaborative sentiment :(.

1 Like

The MCU is not compatible with Arduino but I have good knowledge in Renesas RH850 MCU.

Yes, cost is also matters in my case and If I go to other micro then I have to manage my inventory.

So I would like to go with RH850 micro.

The simplefoc library relies on the arduino framework. Unless you port the 850 to arduino first, if you are so familiar with it, my guess would be otherwise you need to choose another supported mcu. Also, the stm32 mcus are cheaper than renesas with same or similar performance so you will not have any problems picking a well supported and tested and widely available one. the R7F701692 costs about $10 to $15 per chip, you can find a lot better mcus from stm for that price. RH850 are expensive. stm g431 is literally 1/10 of that price at the same or better performance. you need to rethink your strategy.


I have BLDC hub motor with hall sensor I don’t want use encoder because encoder is quite costly.

So, If I go with STM32 blue pill then simple FOC can run without encoder?

also motor soft start is possible with load ?

application: e bike
maximum load : 250kg
Hub motor : 1kw

If above parameters are fulfill then without problem I will go with simple FOC and stm32.


Please define soft start.



SimpleFOC requires some kind of feedback, hall sensors or an encoder. Are you sure your motor doesn’t have hall sensors? SimpleFOC currently has no sub-system for sensorless drive. VESC does. However the boards are quite expensive.

Soft starts means when two wheeler initially starts then motor must be run without any jerk.

Sometimes, motors initially starts with jerk then after it runs its very smoothly.

Let me tell you my story,

Few months back I have developed sinusoidal commutation to control sensored BLDC motor and at that time I was facing this issue.

also In sinusoidal commutation there is only one problem and that problem is we have to found advance angle to achieve best performance

If we found advance angle then it will mange 90 degree phase difference between rotor and stator flux
and we get maximum torque and efficiency of the motor and that is find by,

θ = (I * w *L) / VDC

here is the pdf where this thing is explain,

Advance Angle Calculation for Improvement of the Torque-to-Current Ratio of Brushless DC Motor Drives - ScienceDirect

but I didn’t get any success to find advnce angle if you have any idea how to calculate please let me know.

  • Dipak

I have hub motor with hall sensor.

  • Dipak

That’s possible, yes. It’s called s-curve ramp-up.


1 Like

Actually I have FOC supported hardware but there is on board renesas MCU So i am going to order new setup for simple foc.

Please let me know below parts are enough for simple FOC.

1)JY01 circuit board [ remove the jy01 and I will connect the pwm pin to the stm32 ]

2)STM32 blue pill with programmer

and I have 1 kw of BLDC motor

Please let me know am i missing something?

  • Dipak

I don’t think that board will do as you wish. What you want is a separate power stage. I was never able to find any, however you can use l298n boards for low power testing just to get the code working. The closest I have been able to find for a development board that is ready to roll for SimpleFOC is the B-G431b-ESC1. I don’t know if it can handle the power you are talking about esp without cooling. We are trying to advance the QUADVRANS/Lepton 3.0 type stuff to produce a good flagship board for this type of situation however it’s not done yet.

Actually I also have 250W of bldc hub Motor if I ordered B-G431b-ESC1 then without encoder simple foc will run on it using hall sensor?

Motor detail ;



Just to be clear, SimpleFOC is mainly intended for field oriented control in closed loop using a position sensor for the rotor.
In such a setup, the control loop will react to the load, and you can limit current, velocity and/or acceleration to get a slower start.

Sensorless, we only support open loop, and there is no special code for smooth startup under load. You’d have to add this yourself.

1 Like

Using a 250 W bldc hub motor for a bicycle yes you should be able to run that using hall sensors using the b-g431b-esc1 board, yes. It’s still not trivial. That motor you linked to is not a hub motor, I don’t know what’s going on there. It is a fairly interesting motor, it looks like a stepper motor but it says it is 8 poles (presumably pole pairs), which is fine. It looks like quite a nice motor, I could have used a smaller one of that nature several times.