Jump to content

Anyone Arduino...?


Recommended Posts

I've got a couple of the A-Star micro's (mini UNO clone with more I/Os than UNO) for £10 each from Cool components. Both work fine, and appear to me to be made well enuf. Also got a Teensy 3.1 from the same place..

Only got them cuz the small Arduino's are expensive and have fewer I/O's. If I need a full size UNO / Mega, I'll buy Arduino..

Luv Chrisie.. xx

Link to comment
Share on other sites

  • 2 weeks later...

Buy an Arduino UNO from maplin (or similar) for £25.

Plug into PC or even a tablet ( all works on my android tablet too )

Get the book mentioned above (£10) and cracked on....

If you get a handful of leds and resistors while you're there, bobs a good un

Get more components, as and when. Individually they're not too expensive..

Re code... Check out examples online to see if you reckon you could understand

Won't know till you try..

Luv Chrisie.. xx

Link to comment
Share on other sites

Posted by Cyclicscooby on 02/07/2014 13:30:45:

I was suprised at the readings I got from the Rx.. Not quite the 1000 to 2000 ms range i was expecting

It could be, probably is, due to small timing errors within the Arduino/code, but the PWM values were not as accurate as I thougt they would be on a modern 2.4G radio, altho they were consistant, time after time..

I got the following values on a Dx6i with Ar600. Fresh new model memory n bind. Default settings - trims centre, 100% travel, no D/R or expo

Channel Low Centre High

Throttle 1065 1410 1910

Rudder 1135 1470 1905

Elevator 1087 1505 1910

Aileron 1085 1485 1885

Not too far off expected, but any code using it, needs to be 'fine tuned'.

Those are the Raw input values, but i'm remapping them to 255 and averaging the last 3 reads within the code..

Are these similar to your timings..?

Luv Chrisie.. xx

I have a 7-in-one meter (frSky/Hobbyking) which has a servo tester and it displays the timing. I normally set servos to mid point 1500, low to 1100 and high to 1900. This matches exactly the Spektrum normal range. This is very close to your readings.

I was thinking of using my Arduino and a 4 line display as a lipo tester, and with a few precision high current resistors to also be able to measure internal resistance of each cell simultaneously. A winter project methinks. Would be very useful if I could then save the data and print it out as a record.

Link to comment
Share on other sites

Wow! 600 is good.

I had seen that one before, I just fancy getting stuck into a knocking up a circuit board and playing around with some programming with a purpose. Maybe doing a bit of experimenting:

I'd be quite interested to see how the lipo characteristics change with temperature for instance.

I use telemetry in most of my models, and one thing I have noticed with some new batteries with a very low IR is how suddenly the voltage drops off. The telemetry warning settings therefore need to be very carefully thought out to provide adequate warning.

Another thought for the Arduino  would be a servo tester to check the full range of the servo, and perhaps even operating and stall currents.

So many things to play with.....

Edited By Andy48 on 02/09/2014 18:03:07

Link to comment
Share on other sites

  • 2 months later...

Hi Arduinos smiley

I'm thinking of getting involved with the Arduino, having hit the limit of the picaxe many times, notably with its unreliable servo control.

So, which one?

Some stuff I may be doing.....

  • Interface to a couple of servos
  • Interface to an OLED display (somehow, possible Serial)
  • Some RC application to be decided

I've programmed the Picaxe, with its basic code, and I've programmed VBA in Excel, so hopefully the language won't be too much of a problem.

Advice? What's it like on servo control... can I make calculations between pulses etc?

Link to comment
Share on other sites

First of all, dont worry about which one. They're all pretty much the same! For experimenting I'd suggest a cheap Nano clone from China, say 3 quid, unless its for flying, in which case I'd recommend using a real one.

With a typical servo pwm frame and polled code you've 1 to 2ms of pulse followed by 18-19ms of the program twiddling it thumbs, so if what you do between pulses is quick or of known duration, you can continue using simple polled code. Some variation of the pause section of the frame is fine, its not critical, 15-30ms is ok.

A much neater way however is to set up one of the timers for a 20ms interrupt. The ISR just sends the pulse or pulses from whatever values are stored, then returns. This way your main program can do what it likes, as long as the pulse values are stored sometime before the next interrupt, and the frame rate will always be exactly 20ms.

What you have to bear in mind is that everything arduino has already been done - servos/oleds/RC/whatever!!!

The arduino IDE language is a subset of c++ and is a piece of cake.

Cheers
Phil

Link to comment
Share on other sites

Thanks for that Phil. I like the 20ms interrupt idea.

You may have seen my engine test rig on here, based on a picaxe. The long term aim is to do that on an Arduino of course. First off is a decent tacho, that goes up to 15,000 rpm. So,looking at pulsein (low) that times each revolution, calculates and outputs to a 5 digit 7 segment display.

If you have any thoughts, please let me know!

Is there a debugger, i.e. so I can single step through a program?

Link to comment
Share on other sites

Am I being an old woman? I do see your point. When I was programming VBA, I single stepped to debug, as I was working with large data arrays in Excel, and one gets used to it!

I've got a couple of S/H ones off ebay to experiment with, I've found examples of tachometers with cct diagrams and code.

There's one thing I found which was that "YES!" moment .... My data from the ADC is read in as 0-255, and outputs to a servo for its 1 - 2ms pulse. However,when I set endpoints, it would for example, output 1.1 - 1.6ms. I spent ages working on a formula... finally got there and to make matters worse, there is no float data type in Picaxe, just 8 bit or 16bit words, so that had to manipulated.

With Arduino, it's the map(value, fromLow, fromHigh, toLow, toHigh)... all done for you. It was that calculation that really screwed up my 20ms between pulses on the picaxe.

This really does see the way to go... hopefully an enjoyable learning curve ahead!

Thanks for your help.

Link to comment
Share on other sites

Posted by Stevo on 15/11/2014 21:27:23:

.... My data from the ADC is read in as 0-255,

If the ADFM bit is set in ADCON0 you should get a 10 bit conversion Steve, 0-1023 in ADRESL and ADRESH<1:2>.  I've no idea how that translates to picaxe, never used one.

With Arduino, it's the map(value, fromLow, fromHigh, toLow, toHigh)... all done for you. It was that calculation that really screwed up my 20ms between pulses on the picaxe.

Yes but just be aware that map is quite slow, you need to account for that in any time-critical code smiley

Cheers
Phil

Edited By Phil Green on 15/11/2014 21:50:25

Link to comment
Share on other sites

I maybe ahead here.... I would use (and have used this) to write data to RAM, which is simply a look up table, so that the joystick value is then looked up in RAM, and the result is the pulse width to the servo... Not sure of Arduino equivalent but OKA peek & poke...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...