Electronics: Wheel Works

I will be at DMS in just a little bit to work on the famed ‘wheel’ that everyone has seen me toting about. The wheel is a 60V brushless and its motor inside is extremely strong/bidirectional/and reversible in that it can be used to generate charge.

The basic problem that I am trying to solve is this: I want control of the motor via Raspberry Pi 3. I have a unit running LabVIEW. I was planning on developing in LabVIEW as this is my environment of choice.

I have option to use DIO pins on RPi, and I also have a PWM board that is IIC available from adafruit. The wheel is interesting because it uses neodymium magnets, and therefore is very strong. It has three wires that feed the delta network of stators, and if you touch two of these wire leads together, it is hard to turn the wheel (thanks Ben for pointing this out).

One problem we are having getting this working is that the wheel is 60V while our microcontroller boards are 3.3 V and the like. We need a level shifting setup to feed the six 60V FET gates, 2 N type FETs per delta connect. Anyone have anything that can easily be modified to do this?

And what is the state of the DMS electronics board mill?

I also plan to bring my Lego Mindstorms EV3 kit up there to model the action of the single wheel autonomous robot. However, the motors for ev3 are too slow and weak. If anyone has a strong motor we can use to build a small rendition of the one-wheeled robot to work on turning strategies, I think we could find a way to patch it in.

If this project interests you, feel free to join me to try and figure it out. I will be in electronics lab soon… :slight_smile: Suggestions for this project are welcomed.

1 Like

Hey good to see the project is still alive, I thought it had faded out! Best of luck hope you will post a status sometime, I won’t be around Carrollton to participate.

What’s the FET’s part number? Need to know gate turn on specs.

4V max Vgs. Can be up to 65-66V positive rail. Both upper and lower FETs are N type. Rdson something like .01 Ohm.

Similar to:PJB75N75.

BTW, interest has picked up quite a bit in this project and also 3e8tech. In fact, I wanted to say thanks to Poz for helping me find a good way to get the wheel in controlled spin in one direction. I got so excited that I may have missed speaking to some folks who about the project last night that I needed to. So yes, I am interested in help from additional mad scientists who want to have some profitable fun with mobility style products, especially those with special skills who can bring new talent areas to 3e8tech. Bear in mind that there are new folks involved with the company now, and decisions get made amongst a group of people now, rather than just me. Alongside documented contributions, the other key factor in determining profit splits for the projects is seniority, so its good to get involved now, because as folks get enlightened about advantages of teamwork with 3e8 and want to take part in the festivities, those who took the risk of early involvement get rewarded the most…just like all the other tech giants that sprouted out of the enthusiasm of a few makers (before makers were a thing)…

But although Poz and I got a nice single direction system worked out, it is only 48 volts. And we really need bidirectional. And I also want to full control over the pulses driving the output FETs, and may also want to entertain battery regeneration…possibly even analog signaling. So I believe we are likely to need a board designed. @artg_dms, you have a RPi3 to 60 V (really the voltage is 65 when fully charged) level shift idea for all N-type outputs? And how is the board mill? What would it take to do a 2 sided power board? In other words, everything present to make this happen? Is there someone I should be talking to about this process, or docs I can educate myself with?

And here is the product of a long but fun Saturday night at DMS. Can you figure out where this one is headed?

If the batt pack can supply ~65v, you need a higher v part. Good design practice typically over rates parts 50-100% over what the part sees in the ckt. Sometimes more. Look for a part w/ Vds of 100 - 130v. The part you listed has a current rating of 75A. If you’re ok w/ the headroom for that rating, stay w/ that part of the spec. Did a quick search for a part that will turn full on at Vgs of 3.3v and didn’t find anything. Googled 3.3 power fet and found:

Got a schematic for this project?? Don’t even try going w/ verbal or written description of the ckt. Scrawl it out on paper and post it out here.

All great suggestions.

I for sure have a scrawling of the output circuit and buffering of signals from microprocessor to output FETs according to the chinese driver board. But I am finding out that they did it the hard, and likely expensive way. It seems that I may have better options. The device that Poz brought is an example of one way to gain control of the wheel for a unidirectional application.

But I need bidirectional, and regenerative. So I have been able to find off the shelf stuff that will drive 60V reversibly. But I have yet to find regenerative or sinusoidal. To get maximally economical setup I need analog regenerative, and for this I need analog expertise and complete redesign. I could perhaps rock with digital non regenerative as long as its reversible within milliseconds so I can achieve self balancing.

So what is the status of the ‘board mill’ in electronics I hear of? I could perhaps make use of this and do a digital one-way reversible driver custom design. Does this item exist, and is it far from being usable? A 2 layer board is all that is needed here as it will tap into RPi, use 8 pin SOIC level shifters, then have 6 output FETs similar to the one I detailed previously (although you point out issues worth considering, ite appears these FETs operate for driving the 350W wheel that I have).

Thought about this project and it reminded me of the pole balancing - inverted pendulum examples that appeared back when fuzzy logic was all the rage. Saw one of these at a booth at some convention some long, long while back. Fascinating to watch. Googled “neural network pole balancing”. Here’s some of the results:

http://anji.sourceforge.net/polebalance.htm


https://openann.github.io/OpenANN-apidoc/PB.html

Looks like some of this is open sourced.
Some of this may be of interest to the neural group in Science.
Replace pole w/ person on wheel and off you go…QED :wink:

So here’s an idea:
The Arduino 101 has a 128 node neural net.
Use Labview (or?) to program/teach the neural net.

Edit: also has Processor (DSP) sensor hub with 6-axis combo sensor with accelerometer and gyroscope.

Have no idea how the throughput of neural net compares to other logic.
Any ideas out there?

Still waiting on that schematic dealing w/ gate drivers for those pwr fets.

I don’t believe Labview can access the neural net components of the Curie chip on the Arduino 101. These are closed source, proprietary chips. I believe you have to use their free limited functionality software or their paid full functionality software.

1 Like

Now I promised a scrawling, not a schematic…lol…

And I have this scrawling, but it may be just as simple to explain as to try and digitize the scrawling: The output stage for each of 3 phase wires leading to motor has two large N FETS. One attaches to the +60V, the other to ground. There are 6 control wires going back to the uP. Each of these control lines in unidirectional, from uP to output FET. Obviously, the uP is not a 60V part, and so there is level shifting between.

The circuit it able to apply 60 to a single phase of the motor by activating a FET tied to 60V and a FET tied to ground on a different one of the three motor phase lines. This places 60V across a single set of windings within the motor.

The code for something like this would not be overwhelmingly complex, especially in LV. My plan is to use RPi3 and pololu carrier (i have altimu) to keep track of positioning and stimulate the wheel motor windings accordingly. Sounds hard but its not. I have code for something similar from an EV3 kit. There are two loops, a balance loop and a movement loop. They run in parallel.

If you want to add regenerative braking, you will probably want to completely replace your current driver circuitry.
Since this motor used as a generator will be basically a permanent magnet generator, its output will be directly proportional to wheel velocity. The wheel braking from near maximum speed going down an incline might exceed the Vds of the drive FETs.
Second issue to consider is that since permanent magnet dc generator output is wheel speed dependent, there will need to be a buck boost regulator in play between the rectifiers (or half bridge FETs used as rectifiers) and the battery pack charge output. Otherwise you can have a range of operating conditions where hitting the brakes discharges the battery pack instead of charging it, or charges it with excessive voltage drive resulting in internal heating and shorter battery life. It is not ridiculously complicated to do all this correctly, but it is non trivial and a bit more expensive.

How about we just rip all of those FETs out of there and now lets do this the right way once for that wheel that I have. I will have control of the digital uP generating the driving pulses for the three phases, and reading the 3 halls back from the wheel. And I will do my initial work in LabVIEW, and I can port that code straight down into Pi3 so I guess I am using $30 uP control board (Microcenter for that nice price).

So yeah, I’m thinking custom board that maybe stacks onto Pi in touchpanel config setup, this way my designs can have nice operation guis and a browser too for customers to use as a bonus (or anything else a computer can do).

So I get the level shift to FET drivers output X3 for the drive case, and have noticed with disappointment the fact that digital control seems to be standard (just think of all the waste in those spurs). But I am thinking that a switch to analog drive methodology is something to consider and maybe do to get the truly best efficiency and best regeneration. Is this something that you know about?

I would love to get something like this operational using LabVIEW so I can leverage the graphing capabilities, and whip out all the analog curves. I would love even more to show the efficiency advantages between digital/analog, regenerative/nonR, battery life/use. Etc. Would be a great class, but seating controlled for sure to keep things on point.

Any chance you could point a finger to a great write up on a digital regenerative system setup? And now you could point that same finger at an anaolg system write up (regenerative of course). Do you think its worth the trouble to do the analog for these robotics/single human monition devices?

Any other thoughts?

***i have never used labview, but if you are proficient with using it, and willing to get me up to speed with this tool, then collecting the data needed to make a custom controller would be a straightforward task. (although likely somewhat time and effort consuming)

***I do not share your enthusiasm for analog control circuitry. And would be disinclined to lend a hand with it.
I won’t use an axe when a chainsaw is readily available. Analog has its place but (my opinion) this ain’t it.

It is quite feasible to make a 3 phase driver that has excellent efficiency. This is one of the many reasons that they are so widely used. Improve efficiency by .1% on a 1000hp motor and you can replace it immediately and pay for the upgrade in three years or less with electricity savings. Try and find an analog controller in that power range made in the last five years.
*** The only papers I am aware of on regen braking are IEEE. I am not an IEEE member, so you will need to find someone who is and has a current subscription to IEEE explore to get access.
There are a couple of UTD profs working on switched reluctance motor drive circuits. You may be able to get some of their papers for the asking.

I spoke with Art the other day and he plans to get a decent LC meter for electronics.
A good measurement of winding inductance is an important first step.

It is a pretty cool project, and I would be willing to help, other than the analog part.

Cheers
Steve

Just bought one at MicroCenter. Ask a sales clerk and they can get you the discount of $29. They are $35 on the shelf.

Well now I am going to have to ask what you mean by analog? You see, the circuitry I have in my hand thus far all operates via digital pulses, even the signals applied to the windings. Yet when one uses the motor as a generator, the signals returned are sinusoids, right? So then, does it make sense that sinusoid is the preferred signalling strategy?

I don’t know, I am asking. I would think that yeah digital is easy and cheap, but I saw some articles online concerning motors and generators and noted the sinusoids coming from a large generator. I studied such in some senior level power class at A&M and it was for sure an area of EE all to its own. But I think that once you are no longer talking about a small motor like we are, but instead considering a huge generator like Hoover Dam or something, the power delivered is extracted from those sinusoids. And the spurs of the digital switching would represent significant losses in a use case as large as hoover.

But stick with what you know, as I know not how exactly to signal such a thing either. But somewhere out there is that one who does know…

But for now I am happy to forget regen and just get really good control over bidirectional motor control. And digital is fine for my little projects right now anyways. The analog is just a target way off in the distance when I am trying to get that extra long battery life… I would like to have the algorithm running in pi and have full control over it, rather than use prepackaged black box control systems. This way balancing is not so hard to do. I will be adding Axes of motion and attempting simultaneous balancing, might even add a twist…lol

By the way, a few other items came in: Here are two translational stages, one for moving basket side to side, another 225 lbs actuator for dropping four legs for perm stability. I call the thing botfoot.com, not sure why.

@electron_pusher, I was also reading previously about your thoughts on coasting down inclines and I find them interesting.

Well, I have not been able, thus far, to look physically at this particular generator/motor I am using (I tried with automotive pullers one day, but never a good enough fit). But I have a good idea what it looks like inside. It is a bunch of neodymium magnets on the wheel and the expected fixed stators in a circular pattern. But what is interesting to me is the strength of these magnet and coil combinations. They are so strong (really generate such significant currents) that when spinning the wheel, if you touch two of the three contacts together, there is a significant and noticeable braking.

So I realize that the way to motivate the wheel in a given direction will be to pulse a single phase of the delta with a current then move to the next, in succession. I also realize that I can do some breaking similarly. Would the breaking be a reduction in time that each pulse is applied, or perhaps instead the application of a counter-pulse (timed to apply force to the winding oriented in opposite direction of spin)? And lets keep in mind that there is a distinction between less application of force in a given spin direction and a breaking by application of force in the opposite direction. This will be a fun learning experience for me, as I have not been down this path before.

Also, I just had this little guy came in. Three up to 72V drivers with reversible control (however they implemented it):

We have a LCR meter already at DMS. And if we do not, I can measure L or C easily with VirtualBench. Being a mixed signal guy I can get the readings and infer from pulse degradation knowing all other items specifically. When do you plan to be spacewardly next?

I read your post and responded accordingly.

In most cases where it is desirable or necessary to deliver a sine wave output, one of about five popular approaches is used.
A) use a DSP processor to generate half bridge or full bridge driver input, so the DC rail gets switched to deliver the sinusoid.
B) A Johnson Counter or Walking ring generator gives an n-bit digital word where each bit drives weighting resistors to form an n-bit D/A
C) A high speed counter steps through a rom/flash table of values fed to a D/A
Here is an article for an example of B

Analog circuitry responds linearly from the full spectrum of negative to positives supply rails.
Digital deals only with 0 and 1, so devices are turned on and off.
Where a real world output is needed that cannot be represented by on or off, a designer studies the problem to decide what level of precision is needed and uses a digital n bit word where n-bits satisfies the precision requirement. In driving an inductive load the, inductance of the motor winding acts as a filter so a “rougher” approximation of a signwave generated by digital synthesis is close enough for government work.
That is what i am more familiar with and offered to help with.
It sounds like you are committed enough to this project, that we should get together and discuss it, so we are not just adding to traffic on the makerspace talk.
I live about 10-15 min from the space, so it is easy for me to get over there.

@electron_pusher

I like it. I like it a lot. Ask an answer, get the question… nice… makes sense too.

I suppose if we know L, as you suggested ascertaining, we can do a quick sim with our given edge rate and figure out what our drop across the coil looks like wrt time. And I must say, with the pullski thing I am working on, I didn’t bother to charge the thing for a week, and I could feel no loss of power… although my skateboarder buddy said: charge it! lol

With the waveform shape at L properly modeled, first and maybe 2nd order effects, we should be able, in fact, to compute the inefficiencies presented by imperfection. < 10% may not be worth the trouble, as the digital boards are so very plentiful and cheap.

I’ll try to make it spacewise tomorrow for some time. I’ll hit you up… thx…

I have a job interview tomorrow afternoon, so I cannot at the moment say precisely when I will be at the space.
But I imagine I can get down there by 6:30 or 7.
I am waiting on approval for the starving hacker rate to rejoin as a member, (I quit a few months after the move to this location) so if I arrive before tours begin, you may need to let me in as I have no RFID key. PM me with a cell no and I’ll text you when I arrive.

Sounds good, but I have yet to make it to DMS yet myself, lol…

I’ll still PM you contact details. I just got some big items handled in my world personally, so I now have time to get serious about wheel works, whereaz I have been preoccupied extensively otherwise prior to just now. So I’d say lets make it happen, mate.