Arduino set parameters

ericgibbs

Joined Jan 29, 2010
18,872
hi JP.
Looks good, I would add a fuse inline with the SLA battery+, also do you plan to always power the Arduino from the USB connector.?
E
 

Thread Starter

JulesP

Joined Dec 7, 2018
383
hi JP.
Looks good, I would add a fuse inline with the SLA battery+, also do you plan to always power the Arduino from the USB connector.?
E
I plan to supply about 8V, via a buck converter, to the Arduino power socket and let its regulator set that to 5V. The USB will just be used for sketch uploads. What might cause the current to surge requiring a fuse for the power supply?
 

ericgibbs

Joined Jan 29, 2010
18,872
hi,
Its just a personal preference when using a SLA or wet Lead Acid battery.
Most of my products were for mobile vehicle or ship use powered by SLA batteries, I have seen a number of cases where the unexpected has happened on a unit.
Without a limiting fuse the battery can pass a great deal of current which can melt/burn tracking and components.
Inline fuses [ in series with say the positive battery terminal wiring] are easy and cheap to fit
 

Thread Starter

JulesP

Joined Dec 7, 2018
383
hi,
Its just a personal preference when using a SLA or wet Lead Acid battery.
Most of my products were for mobile vehicle or ship use powered by SLA batteries, I have seen a number of cases where the unexpected has happened on a unit.
Without a limiting fuse the battery can pass a great deal of current which can melt/burn tracking and components.
Inline fuses [ in series with say the positive battery terminal wiring] are easy and cheap to fit
Hi E,

I have attached the circuit that I have built based on a published sensorless design for a BLDC. I have added the pots for analogue pins A0 and A1 and hope that is the way they are to be connected. Using pins A0 and A1 to adjust PWM attributes will surely require some extra lines or replace some code?

Correct me if I am wrong but the PWM frequency from the Arduino is 31kHz and is delivered to the bottom MOSFET in each pair for each of the motor windings, as in the second attachment? (In fact I think that it’s the upper FET that carries the 31kHz so that pic should be flipped) If so you are proposing that one of the pots will modify the duty cycle, will the other pot modify the 31kHz frequency? I was led to believe that the frequency was only adjustable in large jumps like halving.

This is a good time for me to add some adjustable features due to the current state of my build.

I have wanted to add an external PWM module to finely adjust the frequency and duty cycle in ways that may not be possible with inbuilt adjustments but was told that the modifications to the circuit involved adding AND gates (see drawing) and would btoo much of a modification at this time and only worth incorporating when switching to a sensored system. That’s a build I might do in the future.

Julian

Controller with pots.jpegHS & LS waveforms.jpegExternal PWM.jpeg
 

Thread Starter

JulesP

Joined Dec 7, 2018
383
hi,
I was suggesting using A2/3 with pots to vary the two Delay periods in the 'void loop'.
You were querying the back emf and and the maximum initial speed settings.?

There are a couple of good video's on this link, the 1st and the 3rd give details for calibration/frequencies with an Ardunio, includes sketches.

https://www.google.com/search?client=firefox-b-d&q=ardunio+with+BLDC+motor
Thanks I’ll look at that. I see the two delays in the code but is the first one to set how long the max duty cycle for startup operates (5ms) and the second when it kicks in at 0.1ms after switch on?
 
Top