Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: Help to read RC 2channel input and fulfill dream. Pics inside! on: August 03, 2012, 03:01:22 pm
SOLVED IT! smiley

Thank you all for input!
Duane; as i explained in the first post, this is a Kyosho Mini-z "motherboard", it does not seem to have standard RC-signals. It is an integrated RX, servo driver, motor driver etc. It has 6 wires running to the steering servo motor (+- / -+ and position sensors) and also just the connectors to the motor, no ESC in between.
I have not been able to detect any standard RC TTL signals on this board, just this low level signal.
Because its not TTL, pulseIn() would not work for me.
I think my oscilloscope is off showing me 4volts, I get the feeling this signal has a high of 1 volt or so. Digital voltmeter says 0,3 or 1, can't remember right now.

ANYHOW, my problem was the speed of the readAnalog()-function. It turned out I was not able to read fast enough, I got values around every 0.7 milliseconds or so, not at all enough to measure the difference between one and two millis with any resolution. I though this was due to the AD or AVR or Arduino not beeing fast enough.

Solution: I was able to find code for Arduino to modify the AD prescaler to the value of 16, giving be LOTS more reads in the same period of time, and perfect resolution!
So, if you need a higher AD-frequency, lookie here, its just copy and paste!

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11

KR
Magnus
2  Using Arduino / Sensors / Re: Help to read RC 2channel input and fulfill dream. Pics inside! on: July 23, 2012, 11:30:52 am
You are probably both right and wrong.
Apparently I was able to generate some kind of noise that it could trigger on. But that is all beside the point.

The question is how I should proceed to get the Arduino to give me the length of the low periods.

I was not able to get a stable reading using the AD, perhaps the AD-function is not fast enough? I read somewhere that you could only get about 10 readings per second using Arduino?

3  Using Arduino / Sensors / Re: Help to read RC 2channel input and fulfill dream. Pics inside! on: July 23, 2012, 07:58:49 am
I did not know about pulseIn()! Beautyful command! But I have now tried it and I'm not getting any values at all. Or rather, the methid returns "0". I get some values when I scrape the wire from the car onto pin2 (mechanically creating pulses), so I know that it is the right pin and the method ought to work, but it does not.
I tried using both pin 2 and three, and changing from low to high.
I think the problem with PulseIn is that it requires TTL level signals. I believe that the signal I have to work with is not TTL compliant, ie HIGH is 3.5 volt or so.

Further input much appreciated.

KR
/Magnus
4  Using Arduino / Sensors / Help to read RC 2channel input and fulfill dream. Pics inside! on: July 22, 2012, 12:29:29 pm
Hi!
For the last 15 years, Iv'e been wanting to build an RC-car with all the fancy lights, braking, reverse, blinker etc.
Iv'e taken a small Kyosho Mini-Z Overland truck and installed a plethora of LED's, this was done 10 years ago.
Not until now that Iv'e discovered Arduino, is it getting close to realization.
I've managed to read the TTL input from a standard RC reciever, with the 1-2 ms pulses signifying turning left or rigth etc.
This small model however, does not have those. It has a all-in-one 27Mhz AM reciever with motor driver and steering servo driver in it. The only signal Iv'e found is from somewhere within the radio reciever. It comes as a 3-4 volt PWM signal (See pic). It seems to come with 3 pulses after another and its the low period that means something. When I turn the knobs of the RC control, the low periods increase or decrease, but the high periods remain constant and is moved right or left. First channel one, then channel two, then another long period of low.



How can I read this and get measurements of the pulses' lenght, in microseconds?

I figured I'd use the AD1 input on my Arduino Uno and did something like this: (This is in Pseudocode, I know)

while (input > 10){} //wait here until low pulse starts
start = micros();
while (input < 10){} //wait for pulse to finish
timeA = start - micros(); //get reading for low period A.

while (input > 10){} //wait here until low pulse starts
start = micros();
while (input < 10){} //wait for pulse to finish
timeB = start - micros(); //get reading for low period B.

while (input > 10){} //wait here until low pulse starts
start = micros();
while (input < 10){} //wait for pulse to finish
timeC = start - micros(); //get reading for low period C.

lcd.out(timeA);
lcd.out("+");
lcd.out(timeB);
lcd.out("+");
lcd.out(timeC);
timeA, timeB, TimeC=0;
delay(1000);

loop...

This gives me printouts on my LCD-shield like this:


I'm getting wierd results.
Reasonable numbers? Maybe, bit not really. Also they seem constans. Sometimes "10200" changes to "10176" or so, but nothing seems to be changing by me changing the controls. I should be getting variations when I turn the knobs on the RC control.

Any ideas? Am I thinking correctly? Is this feasible?
5  Using Arduino / Project Guidance / Re: Driving an 800W 36v brushed motor? on: July 01, 2012, 09:42:42 am
Also, I just want you to know that I read everything you write, several times, learning a lot! Thank you for the effort and time you put in! It may look like I skip along to my own next suggestion, but that is really just an iteration of you respones. As you write "this is good, this is bad", I try to focus on finding a new solution that fits in with what you say is good. smiley

/Magnus

That solution uses P-channel mosfets for the high side switches. Unfortunately, P-channel mosfets generally have higher Rds(on) than N-channel mosfets. That's why mosfet h-bridge driver chips are always designed to work with N-channel mosfets throughout. The particular P-channel mosfets used in that design are specified as Rds(on) max = 0.026 ohms @ 23.5A. That's around 5 times the Rds(on) of the N-channel mosfets I suggested. With 3 of them sharing 50A, they will dissipate 7.2W each on average. So be sure to use good heatsinks.

The schematic image on that instructables page is so poor that I can't read the resistor values. However, it does not appear to provide any switching delay to avoid shoot-through, nor does it provide active pullup for the P-channel mosfet gate drive. From the parts list, I think the gate driver resistors are all 4K7. This is way too high to turn the P-channel mosfets off quickly. So you must expect the switching losses to be high when using PWM - another reason to use good heatsinks.

As you are using 36v instead of 24v, you should consider adjusting the resistor values to avoid exceeding the Vgs rating of the P-channel mosfets.
6  Using Arduino / Project Guidance / Re: Driving an 800W 36v brushed motor? on: July 01, 2012, 09:39:22 am
Hm! I see!

Ok! Well, the book is ordered. I will read up when it gets here in a week, If I can wait... Should have bought the e-version, dammit.

I do like the idea of designing something perfect, not just that works, meaning a design by your suggestion using a driver and only N-channels. My problem is ignorance, I understand the concepts but I could never select all the components around, I just don't know enough. I think I need a finished design if I'm ever going to get this done and working. Call it self awareness...

Question1: I note that all other setups have large capacitors. What do those do? Buffer or noise cancellation or what?

Q2: Now I just found this while googling: http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv52.pdf
Another H-bridge design that looks to be more along your lines and good for for a microcontroller. Up to 900Watts, my motor is 800W, so perfect?
From the text:"Component selection for the HIP4081A is relatively simple. I selected the Harris HRF3205 MOSFET which has an Rdson of about eight milli-ohms (0.008 ohms) for the four H-bridge switches".
Question 2B: Would this be a better design? I would happily double up on mosfets to add margin.
Question 2C; The design states 15-30v, would this work with 36v (up to 44v when fully charged batteries?) Can it be easily adapted? Which are the components limiting the top voltage? The 78L12?

Still, why can't anyone post a complete design with part numbers, for noobs like me? That will be my legacy to the world if I ever get this working! smiley

Again, thanks.
7  Using Arduino / Project Guidance / Re: Driving an 800W 36v brushed motor? on: July 01, 2012, 04:41:52 am
Hi DC_42 and all,

I was about to order a driver and MOSfets, when I stumbled upon this:

http://www.instructables.com/id/Arduino-RC-Lawnmower/step2/The-Motor-Driver/

What do you think? It's all done already... designed for 24 v but seems to be capable of up to 60, so should be perfect for my 36v-need.

In any case, I just used a bunch of Amazon Vouchers I got from work and his book with the complete schematics and guide to building this ESC is not on it's way.

I think I just saved all of you a lot of work. smiley And myself some time. Thanks all!

/Magnus
8  Using Arduino / Project Guidance / Re: Driving an 800W 36v brushed motor? on: June 30, 2012, 10:18:42 am
OK, Wow, now we are really making progress! So glad this project is moving again!

I'll look through the datasheets as soon as possible and make a scetch, hoping you can verify it for me.

Thanks again!

/M
9  Using Arduino / Project Guidance / Re: Driving an 800W 36v brushed motor? on: June 30, 2012, 04:24:59 am
DC42: THANK YOU!

Iv'e been really hitting the webs in the last 24 hrs, learning and understanding about H-bridge and Mosfets.
It seems a controller is a very good idea after all. The one you suggested looks fantastic, the datasheet even comes with a nearly complete design, perfect for me!

I was planning to use a computer CPU heatsink, possibly with a fan, to do the cooling.

Questions though:
1. Will the Mosfets I have work with this controller, or should I get new ones? Can you recommend a particular kind? The Ones I have are Logic level, will the driver work with logic levels to the mosfets?

2. I need 30Amps cont, peak 50A I guess. Should I get twice as many mosfets and just put in parallell? I read that the stated Amps in the specs should generally be considered a lie and that you should always double-up. smiley

3. How is e-braking achieved when using a driver IC?

Thanks again,
Magnus
10  Using Arduino / Project Guidance / Re: Driving an 800W 36v brushed motor? on: June 29, 2012, 03:09:07 pm
Thanks Spruce,

the problem as mentioned is the voltage. I need 36 volts, not 12.
And 1.4 Amps is nothing. I'm probably doing 40-50 at peak and at least 20 sustained. At 36 volts.

KR
Magnus
11  Using Arduino / Project Guidance / Re: Driving an 800W 36v brushed motor? on: June 26, 2012, 12:11:44 am
Hi Spruce!

You are right, that would be easier!
But please find me an affordable 36 volt 40Amp BRUSHED RC ESC! smiley

KR
Magnus
12  Using Arduino / Project Guidance / Re: Driving an 800W 36v brushed motor? on: June 25, 2012, 02:45:34 pm
Hi Dr_Ugi,

sorry to stress you, but the components have arrived. smiley

I have the 
(2x) 60 Amp FRED diodes http://www.ebay.com/itm/110836454846?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649#ht_2162wt_1163 and the
(4x) 55 Amp Mosfets http://www.ebay.com/itm/120898449700?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649#ht_1701wt_905

and a kid who is anxious to drive. smiley
1. Now all I need is basic info on how to hook it up.
2. Also, I would appreciate a pointer on how to get e-braking on this baby. I have a really big ceramic resistor from an RC-car, which worked really well in my old "wires and relays" design.. Should I put that and a 30Amp relay over the motor? Can the Arduino pull a standard car Relay? I was thinking I should put the braking pedal on one of the inputs to the arduino, and both cut motor power and activate the brake relay when the brake is pushed. Or can I accomplish braking in a more civilised manner using the Arduino and above components?

Thanks in advance,
Magnus

P.s. I'd be happy to buy you a beer over Paypal if this works out... D.s.
13  Development / Other Software Development / Re: LCD4BIT problems on Arduino 1.0 on: June 06, 2012, 10:44:55 am
Found a solution!

This works with Arduino 1.0.1 and the 2x16 LCD/keypad.

http://www.dfrobot.com/wiki/index.php?title=Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)

Look at the second example, using LiquidCrystal.h

I just pasted the code, and added 
#include <LiquidCrystal.h>

at the top, and "tadaaaa"!

KR
Magnus
14  Using Arduino / Motors, Mechanics, and Power / Re: E-Chopper (ex. Expectations & Torque) on: May 25, 2012, 07:56:19 am
Thank you very much!

I will be using dual 600v 50Amp mosfets, only expecting to need a total of 30Amps.

KR
Magnus
15  Using Arduino / Motors, Mechanics, and Power / Re: E-Chopper (ex. Expectations & Torque) on: May 24, 2012, 11:40:57 pm
Dear Mr Pancake!

I am doing almost the same project, but with a 36v 800W motor, for my sons gocart. If you could draw up a diagram of how you wired it and what components you used, I'd be very grateful!
I already ordered some suitable mosfets and diodes that were recommended in another thread, just not sure how to wire them up...

Thanks in advance,

Magnus, Sweden
Pages: [1] 2