Recevied a few weeks ago the FEZ Mini Robot Kit. Awesome!
Question; I have an existing electric running remote-controlled car.
I have managed to get the servo working on the FEZ mini without any problems.
But, instead of the dc motors in the kit i want to use the motor of the remote-controlled car, cause they are powerfull.
But, they don’t have the correct connectors to connect with the FEZ Mini.
Does anyone have any experience with other motors for the FEZ Mini?
Do I need another component or shield to control the motor?
Forgive me if i am wrong, but i think the motor i’ve got from the existing car is something like this:
Second question. I want to add a GPS. I want the car to drive itself Sound awesome. Want to build an autonomous car.
Which GPS should i use and do i need a shield of some kind of connector for this too?
So you want to use the RC car and leave the motors in it?
I would think the simpliest approach is replace the receiver with the Fez. A servo shield (or board) should be all you need I would think. Keep your ESC and connect to a servo port on the shield. Then your not changing much and swap back to RC if needed. Other people here should have more to offer. I would get your fez-car running and programming tweaked. Then look to add GPS.
That is what i was thinking, i’ve tried connecting ESC to FEZ, but without any succes. Where do i connect ESC on my FEZ to?
On the ESC are several component and connectors, like, Battery pack, on/off switch and cables to connector motor.
Do i still have to connect the battery pack?
And the FST connector, on what port should i connect it on my FEZ?
You should look for information on how your rc car operates. They all has a common scheme:
motor → motor controller → receiver
What a motor does I hope You undrstand
Motor controller. This part controls how much “energy” goes form a batery to motor. If there is more energy - motor spins faster. So to answer to your questions:
ESC needs to conect to batery (probably with a switch You mentioned), and it must conect to the motor.
The conection left is for conection to receiver.
Since You trying to replace the receiver this must go to Your FEZ.
How to connect:
there is diferent color codes, but all connections use the same scheme - signal, “+”, “-”. You need only signal and “-”. [url]http://fatlion.com/sailplanes/servos.html[/url]
Do not connect “+” anywhere for now. Later it is possible to power FEZ from it, but You need to messure how much V you get from it (it can be 5-6V).
“-” goes to Your FEZ GND pin.
And signal to any digital pin.
Now, to drive your motor You need to generate signal (servo pulse) on pin You puted signal on. There is couple of libraries writen on http://code.tinyclr.com type “servo” in search.
Hope it helps You.
And like William said, first try to run a car, then we will help You with GPS.
Managed to get the motor running via PWM.Di6 and Digital.Di9.
But, the motor only running forward (e.g. byte 50) but always the same speed, even i change the byte to 1 or 100.
And also when i change the byte to negative, e.g. -1 or -50, the motor will do nothing.
I have connected the ESC component to Motor B on the RBX Controller board beneath the FEZ Mini (i’ve got the FEZ Mini Robot Kit)…
Anyone any ideas?
Ps; At the moment, GPS is step 2, get the car running well is step number 1.
MotorB is highV out to power a motor not electronics. Luckly it is probably only 5Vout or you could have fried your ESC. Much depends on your ESC type (fubata, etc). Here is something that may help. http://www.mcmanis.com/chuck/Robotics/projects/ServoGizmo/esc.html
You control the esc ~like a servo. From what I read, esc has a center position you need to find and maybe a start marker like low speed for some period. But need to find specific info or use logic probe to know for sure. Others here have more experience in this area that should be able to help more.
I have used the code you supplied. I have added the class to my project and add the following code in the Main function:
FEZ_Components.SpeedController ESC = new FEZ_Components.SpeedController(PWM.Pin.PWM6);
ESC.Speed = 25;
Thread.Sleep(1000);
ESC.Stop();
Didn’t try this code yet, i have a question first.
In this code, and other code snippets i have to select a PWM pin. But how do i know which PWM pin is the connector on the board?
Attached to this post, a picture i just made of the board i’ve got.
Can someone tell me where to connect the ESC controller to?
The mini has hardware PWM on di3, 5, 6, 9, 10. Servo ports are di7-di8. You have to use software (i.e. OutputCompare or manually) pwm I think. You can use sw pwm, but code will change. If you want to solder, you can solder a header onto mini to get access to di3 pwm pin. You can also pull the mini off the robot board. You then have access to pin on underside. I think at this point, the other stuff is getting in the way. Then use jumper wire to connect servo wire to di3 or di5. Other two servo wires to 5v and gnd.
Coolness. Glad it is working!
Could you write up what you discovered on your esc. What was timings to make your esc work (i.e. direction, forward, reverse, stop). A video and code at Code (fezzer) section is good for all.
BTW - I really like your blog engine. Which is it? What client editor are you using to format code blocks and text? nice.
Hey William, i will look in to the fezzer code thing when i am done programming with the ESC.
I just have to found out the right timings/signal to stop the motor, cause it’s still little buggy
Will let you know asap.
Blog engine Just what you said, “Blog Engine.NET” is the engine. You can download (or create by yourself) a lot of Extentions and stuff, Syntax Highlighter is one of it.