Author Topic: OpenServoCAN (...for hobby standard size Servos)  (Read 1285 times)

0 Members and 1 Guest are viewing this topic.

Offline TrickyNekro

  • Regular Contributor
  • *
  • Posts: 168
  • Country: gr
  • Drinking Frappé on the way to Isomnia!
    • Youtube channel, electronics and more ;-)
OpenServoCAN (...for hobby standard size Servos)
« on: January 11, 2019, 06:31:02 am »
Hi there ladies and gents!

I am well aware that the OpenServo is an old theme not a new one, but still it´s been a very long time since I wanted to make my approach on the matter.

And that´s exactly the case! Along with some wonderful holiday time the past weeks with family and friends, I spent part of my nights developing this project.

It is meant to replace the control board in standard size servos like the HS-311 (design of the board size was base actually on the HS-311) and turn them
into a engineer´s wet dream. Or at least come as close as I can :-) !

With the current design the board offers:
Can be operated from much wider voltage range. 5V (maybe lower) to 15V (and a maximum of 18V for the brave ones).
It can survive being connected to a upto 30V power source although it will not operate.
Theoretically it can provide 8A continuous and can limit the current / power with digital control. (there is a high side current monitor).
Control over CAN-Bus through the dedicated port.
Although not recommended as there are no protections in place, USART, time pulse control, analog signal, through the programming port.
Supports the use of either potentiometer or quadrature encoder. Although it could be used, no problem, with continues rotation servos.
Over the digital connection it can provide information about load %, location, speed, input voltage, current draw, board temperature, etc.
And maybe more that will come in time and development.

The whole thing is based on the PIC18F26K83. In fact it is made possible due to the PPS of the chip. Board real estate in servos is rather limited.
The design is being done in EAGLE CAD ver. 7.1.0.

I publish the whole thing under the Creative Commons Attribution Non Commercial Share-Alike ver. 4 International.
I know some people don´t like the Non Commercial, as it not "free culture" and stuff, but I am no hippy and right now I am counting beans to make things happen.

If there is a will, if you want to put it that way, I could, with the allowance of the master-senpai of course, set up an e-begging link to help further develop the project and fill my coffee pot.
As of now I only have the electronics schematic and board design ready. I have NOT even tested the fitting inside of a HS-311 so take all the information here as is.
Plus I get the "feeling" that some passive components can be better tuned. These are all based on values that have worked before but the specifics are different here,
so you´ll need some salt, not just a grain.

I think as it is, the hardware has some interesting features, like the soft-switch and reverse polarity protection so I will on the long run be making youtube videos explaining them.
Anyhow the aim of this project is to help people learn about more advanced things in electronics and those who play around with robotics and hobbyists.

I welcome all your comments and opinions about the design!

With Best Regards,
Lefteris, Greece
« Last Edit: January 11, 2019, 06:50:15 am by TrickyNekro »
If you are an engineer and you are not tired...
You are doing it wrong!
 

Offline TrickyNekro

  • Regular Contributor
  • *
  • Posts: 168
  • Country: gr
  • Drinking Frappé on the way to Isomnia!
    • Youtube channel, electronics and more ;-)
Re: OpenServoCAN (...for hobby standard size Servos)
« Reply #1 on: January 12, 2019, 02:23:36 am »
Minor Update:

- Changed some values of resistors to have fewer different components on the board.
- Added Resistors between the microcontroller and the MOSFET drivers, so that the microcontroller can NOT anymore
  power the H-bridge by mistake through the protection diodes of the driver.
- I am trying to panelize the boards to have them produced by JLCPCB, more updates on that later on.
If you are an engineer and you are not tired...
You are doing it wrong!
 

Offline mvs

  • Regular Contributor
  • *
  • Posts: 174
  • Country: de
Re: OpenServoCAN (...for hobby standard size Servos)
« Reply #2 on: January 12, 2019, 05:19:14 am »
Backwards parallel connected LEDs usually do not need extra reverse voltage protection, since forward voltage is typicaly lower then max allowed blocking/reverse voltage and they can protect each other. So you can remove D6 and D7 diodes.
 

Offline TrickyNekro

  • Regular Contributor
  • *
  • Posts: 168
  • Country: gr
  • Drinking Frappé on the way to Isomnia!
    • Youtube channel, electronics and more ;-)
Re: OpenServoCAN (...for hobby standard size Servos)
« Reply #3 on: January 12, 2019, 05:25:49 am »
Backwards parallel connected LEDs usually do not need extra reverse voltage protection, since forward voltage is typicaly lower then max allowed blocking/reverse voltage and they can protect each other. So you can remove D6 and D7 diodes.

I know but aren´t "ultra bright" LED (the common colored white LEDs) really bad handling reverse voltages? Cause it makes sense to have them as efficient as you could,
they are only there for debugging and of course for that reason you do not need them bright. Imagine that operational range is from 5V to 15V. 15V Reverse hmmm, If I remember right
most can´t handle more than 6V reverse.

Thanks for the input,
Cheers!
If you are an engineer and you are not tired...
You are doing it wrong!
 

Offline mvs

  • Regular Contributor
  • *
  • Posts: 174
  • Country: de
Re: OpenServoCAN (...for hobby standard size Servos)
« Reply #4 on: January 12, 2019, 06:34:31 am »
In backwards parallel connection one LED will limit reverse voltage applied to another led to its forward voltage and vice versa. For blue and white LEDs it will be around 3.0-3.2V at nominal current, well below typicaly allowed 5V maximum.
 
I have made a simulation in LTspice for better understanding. Blue line is output voltage of V1 (+/- 15V), green line is resulting voltage across LEDs (+/- 3.085V).
 

Offline TrickyNekro

  • Regular Contributor
  • *
  • Posts: 168
  • Country: gr
  • Drinking Frappé on the way to Isomnia!
    • Youtube channel, electronics and more ;-)
Re: OpenServoCAN (...for hobby standard size Servos)
« Reply #5 on: January 12, 2019, 08:35:06 am »
In backwards parallel connection one LED will limit reverse voltage applied to another led to its forward voltage and vice versa. For blue and white LEDs it will be around 3.0-3.2V at nominal current, well below typicaly allowed 5V maximum.
I have made a simulation in LTspice for better understanding. Blue line is output voltage of V1 (+/- 15V), green line is resulting voltage across LEDs (+/- 3.085V).
Hey, thanks for the effort but really my brain had some f@rting problems, it needed some extra time to open itself to the world again.
Of course, of course, you are absolutely right.

But, I will ridiculously double down a little bit and say that actually they can protect against open faults, or wrong placement faults.
And there is always the option to just short them out.

So I will leave them in place for the moment and note in the schematic that they can be either placed or shorted. Gives you more options.
Never the less, thank you for your contribution mate!

Cheers!
If you are an engineer and you are not tired...
You are doing it wrong!
 

Offline Poe

  • Regular Contributor
  • *
  • Posts: 201
Re: OpenServoCAN (...for hobby standard size Servos)
« Reply #6 on: January 18, 2019, 02:35:39 am »
PWR_EN appears to control T3.  Dis/Connecting PWR_V+ to V+. 
D5 appears to limit T3's Vgs.
When PWR_EN is high, T5 is off, T3 and T4 are on.
When PWR_EN goes low, T5 turns on just long enough to short C1, then stays off.  Once C1 discharges T3 and T4 are off. 
PWR_VIN is still supplied to PWR_V+ through T4's body diode.

Is this correct?
What is the purpose of T6?
 

Offline TrickyNekro

  • Regular Contributor
  • *
  • Posts: 168
  • Country: gr
  • Drinking Frappé on the way to Isomnia!
    • Youtube channel, electronics and more ;-)
Re: OpenServoCAN (...for hobby standard size Servos)
« Reply #7 on: January 18, 2019, 11:45:29 pm »
PWR_EN appears to control T3.  Dis/Connecting PWR_V+ to V+. 
D5 appears to limit T3's Vgs.
When PWR_EN is high, T5 is off, T3 and T4 are on.
When PWR_EN goes low, T5 turns on just long enough to short C1, then stays off.  Once C1 discharges T3 and T4 are off. 
PWR_VIN is still supplied to PWR_V+ through T4's body diode.

Is this correct?
What is the purpose of T6?

The whole T5, T6 and T7 along with R12, R13 and R14 circuit is a sightly modified version of the twin-NPN totem pole circuit with the inclusion of R13 both for soft-start and current limiting for the D5.

T5 acts always, when it´s in its ON state, as a voltage follower. When T7 is enabled by the microcontroller it pulls the base of T5 low so it deactivates it and pulls the "load" low through T6.
T6 is there to "isolate" (not galvanically by any means) the output from the base drive of the T5. Because in this circuit R13 is present, it might have been possible to omit T6, but I kept it there for reasons
of convention. T6 can also be any kind of diode, but I have found that generally using the same kind of BJT works better and easier (as you don´t have to calculate capacitances to limit shoot-through).
The same circuit you can use also with Darlington transistors, or a "reverse" circuit you could also use with PNP transistors.

It´s really often that you use said circuit as a MOSFET driver, did it myself many times in fact. Of course not with R13 in place.
It is always inverting and its high-z state is always high. You can limit the output voltage of a normal totem pole circuit with just a Zener from the base of the high side NPN to ground.

I have attached a picture of the normal version of the circuit below for comparison. Resistor values are not painted or measured to spec.
« Last Edit: January 19, 2019, 12:19:04 am by TrickyNekro »
If you are an engineer and you are not tired...
You are doing it wrong!
 

Offline TrickyNekro

  • Regular Contributor
  • *
  • Posts: 168
  • Country: gr
  • Drinking Frappé on the way to Isomnia!
    • Youtube channel, electronics and more ;-)
Re: OpenServoCAN (...for hobby standard size Servos)
« Reply #8 on: January 31, 2019, 05:44:32 am »
I set up everything so far in GitHub : https://github.com/TrickyNekro/OpenServoCAN for anyone interested.

I am also thinking of starting a gofundme campaign for buying the first materials that I need.
Already for 10 boards it will cost me around 135€ with some extra parts and without some others, probably will have to go out fishing in Microchip Direct.

But If I ever wanted to produce this thing, it would most probably cost less than 20€ per piece to the end buyer, so that´s something!
If you are an engineer and you are not tired...
You are doing it wrong!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf