Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: 3.2" TFT LCD Shield + Display w SD Socket for Arduino Mega 2560, SD Problem on: February 08, 2013, 06:54:26 pm
The problem more than likely is that it is a 1.0 sainsmart variant ~ equivalent  shield. The wiring to the cs meso and mosi pins is wrong on the shield. The good news is that if you can solder it is fixable by removing 4 resistors and "flying" four wires on the shield to make the correct connections. instructions that are pretty good are here,
Then set the cs pin to 53. and it will work with the sd library just fine. the other pins are called by spi internally and are always the same depending on which duino you have.
2  Products / Arduino Due / Re: Due Inputs 5V tolerant? on: January 14, 2013, 09:58:54 pm
Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Providing higher voltages, like 5V to an I/O pin could damage the board.

However some pins may be 5v tolerant, I make no claim to be true, However some of the pins on the sam3 are, The uart and the  i2c may be, according to the  data sheet from atmel. (depending on exactly which chip you have) However bear in mind using i2c that the pull up resistors must have a min value of 10k ohm. This is to respect the maximum sink to ground current of the sam3. The older duino's could sink 40 ma or so but the sam really starts to sweat around 10 ma.

Serch ebay for "   IIC I2C Level Conversion Module 5V-3V System For Arduino". to get the hardware to convert. use 10k pull up on the 3.3v side and 5k on the 5v side.

As far as a 5 v device reading the 3.3 out of the due on an input ther are two fixes,

One... just hook up the 3.3 out to the 5 input 3.3 is more than 2.5 and will in most cases produce a digital read of HIGH.

Two connect the aref pin of the 5v duino to the 3.3 v out pin (check for jumper and aref code requirements) and the 5v atmel will now gauge it's input 0 to 3.3 v.


Serial, tx due to rx on 5v device usually so far at 9600 works,,,

tx on 5v device through 5 k resistor to rx on due with 3.3 k resistor rx due to gnd, seems to be working for me.

Digital and analog read works the same way 5v dev to 5kresistor to pin and pin to3.3k resistor to gnd.


5v on 3.3 Device is playing with fire. I an in no way Qualified to say otherwise!
Playing with this is not in any way my responsibility. What I get away with you may not!
3  Products / Arduino Due / Re: PWM Resolution on: January 14, 2013, 09:22:50 pm
Hay All,

I went round and round a while ago with this, Haven't messed with it lately, It would seem that the docks and the ide for due are still somewhat green and have not ripened yet. If pwm is your thing and speed is a must, put the due in the drawer for later and get a leaf maple. No a leaf maple is not the  fix all i2c on maple will make you crazy.  But pwm is a cinch, when the new ide comes out that really supports the due I am sure that it will be bad to the bone and then some.

The analogWriteResolution will adjust the resolution per pin, however if a value is given bigger than the capability it will just count by 2s 4s 8s instead of 1s.

In maple you can adjust the timer overflow and clock divisor and set it to just about any frequency and resolution you could want.
4  Products / Arduino Due / Re: TFT library compatible with Due? on: January 14, 2013, 09:03:25 pm
If any one has a nice library that would work on a 240 by 320 with touch screen i sure would like it .

I have been poking around with it and sort of have the one from seedstudio working, The library would like to just write the data to the register but the due registers are all in different places in due so i made it digital read and digital write. Lots of overhead and poor performance. Was quite shocked it sort of worked at all. The touch screen was not at all hard to make work, but the tft is a nightmare.
5  Using Arduino / Project Guidance / Re: 2WD robot code on: December 09, 2012, 10:17:37 pm
wow, very cool !!

No my motor shield is very different. My beta 2 version can be viewed under construction at If you care to sort back through time you can see some of the development of beta 1 and some clips of his short one month life. My robot is pretty big and disguised as a ford truck. Also requires piloting that is the fun part.
6  Using Arduino / Project Guidance / Re: New but searching for help on: December 09, 2012, 10:08:22 pm
Mack user info. Take the mack place in commode and pull chain, well no just instal wm ware install linux of choice preferably debian, ubuntu, or fedoracore, enjoy free software for life, put the pc-mac argument far far behind you. Nothing to buy ever not from Steve (bless him) or Wild Bill.

free your mind,

7  Using Arduino / Project Guidance / Re: powering large robot on: December 09, 2012, 09:58:33 pm
I would use sla33-12fp 12v 35 ah about 25 pounds each, a pair will push a wheel chair all day long with a 300 pound druler at the stick or motivate a battle bot that crushes the competition. Avalable at ebco battery co columbus ga. It is on there web site.
8  Using Arduino / Project Guidance / Re: 2WD robot code on: December 09, 2012, 09:47:43 pm
The magic in this code occurs in the analogWrite lines. There are small inconsistencies in all electric motors. Even if they are "IDENTICAL". but the faster motor will need a slightyly smaller value than 255 "the max". so take a few tries and slow the faster motor by 5 or so each time until you get them running as close to the same as possible. Let us say for example that motor a is the sluggish one and the robot wanders in a circle to the a motor side when going forward. Also when we give motor b an analog write command of only 200 the robot goes very nearly straight. Then we know that motor b must be skewed by 55 at full throttle forward. This can be easily done with the map function described in the docs. map motor a 0 to 255 forward and motor b 0 to 200 and it works relatively well. However not perfect. Now the flip side is that it is likely that in reverse the faster motor may be the other one or not. To make a robot go straight really you will need an input device of some sort that monitors actual position and changes the values to correct on the fly. There is a lipoly bord available at cute digi wit a gps chip that can tell a robot where it is with in 15 feet or so this robot would need a large out door playing field but they are a hoot to watch run around finding there targets.
9  Using Arduino / Project Guidance / Re: New but searching for help on: December 09, 2012, 09:19:44 pm
I was scrounging around at my local radioshack looking for some capacitors.
They had on the shelf a paralax shield to play audio with a sd slot on it. It looks to be pin compatible to uno. best of all it only uses a couple of digital pins, The jist of it is you put the sound on the sd and call the sound with i2c or serial, the device plays the sound called while the duino goes on to do other things. My partner in tinkering is working on geocash gadgets that use a similar device. Bought off of ebay.

The arduino due is capable of the whole process with no added devices just confined by the limit of flash ram for program and data, however due is not a good platform for a beginner as the software and libraries are not in place. Support is also limited and not much in the way of books.

The uno has been the defacto standard for some time documentation is fabulous there really is not much that uno can not do or more like has not done.  But to play sounds other than basic beeps and buzzes requires a shield. I also have seen at a make fair someone had a uno making a digital pin high supplying power to a hallmark card sound device that had been re purposed. by simply supplying power to the tiny chip with one digital pin wrote high and a ground.

Have fun this is not supposed to be work,

10  Products / Arduino Due / Re: DUE PWM Frequency on: December 07, 2012, 07:56:14 pm

Yes all those things are true. The scetch is only going to work on the maple with that exact chip.

My original code would only run on the 2560, However it was reasonably well documented how to do it.  I would expect that the same would be true of due. That in calling a timer one would have to know the pin map in relation to the timer and how the modification will affect the timer. I am also reasonably sure that it is possible to time up the due in a similar way. Basically the original code I used on the 2560 did the same thing prescaling the timer. Just did not have the ability to set the number of counts. That is provably also possible I just have not discovered it.

All is well, the maple is doing my bidding The due is communicating with the maple i2c or serial, much testing to do. Getting the due to run the interface the lcd touchscreen monitoring the battery, running the 12 v charging system many things for due to do. I am sure that as due matures pwm modification will mainstream in one form or an other. My pcb is ready for maple my first beta code for maple is meeting my expectation. My project is moving forward and soon I will drive down the road under ~duino control hopefully before Christmas.
11  Products / Arduino Due / Re: DUE PWM Frequency on: December 02, 2012, 03:10:17 pm
I am finalizing my code for the maple, wow the documentation on maple is wonderful.

In the maple world they have a library timer.h which allows the easy modification of the timer properties. I am not sure how it all works as I am not the sharpest guy in the world, but I assure you it works quite well.

This is the first code I was playing with the pwm freq with on maple

#include <timer.h>

//HardwareTimerb timer(1);
int d = 100;
int b = 177;
int pin2 = 5;
int pin3 = 6;
HardwareTimer timer1(1);
HardwareTimer timer4(4);

void setup() {
    // Set up the built-in LED pin as an output:
    pinMode(24, OUTPUT);
    digitalWrite(24, HIGH);

   // pinMode(23, OUTPUT);
    //digitalWrite(23, HIGH);
    pinMode(20, INPUT);
    pinMode(19, INPUT);
    pinMode(pin2, PWM);
    pinMode(pin3, PWM);


void loop() {
d = (analogRead(20) + 1);//  pot on20
b = (analogRead(19)); //read other  pot on19
if(b > 4000) { b = 4000; }
analogWrite (pin2, 0);
analogWrite (pin3, b);
    delay(100);          // Wait for d milis
    analogWrite (pin3, 0);
    analogWrite(pin2, b);
    delay (100);

It alternately blinks two leds back to back in parallel across pins 5 and 6.
Renders 6000 Hz pwm exactly the way I want it to.

It would be really nice to do this the same way with due
12  Products / Arduino Due / Re: Current limits for the 3v3 and 5V power header pins? on: November 18, 2012, 09:54:13 am
I personally would make sure to not ask more than half of the 800 ma of either, I prefer to use a separate voltage reg lm78xxx or 79xx for mu devices unless it is a low watt device.
My associate has successfully ran small servos with the 5v but I am not ready to try as smoking the board is pricey. The 3.3v digital pins have a very low limit and the total current of all output pins is accumulative be very careful to respect this. I prefer to use opto isolators and run my devices with isolated power supplies. This keeps the smoke out of my shop for the most part.
13  Products / Arduino Due / Re: Arduino Mega or DUE? on: November 18, 2012, 09:38:47 am
There are some boards with Pick processors they are very nice not completely open source but faster than the atmega . DUE for me has been a disappointment although the processor is blindingly fast the software and libraries  are not ready , in six or eight months to a year ti will be better. I am redesigning my project to use a Leaf labs maple, a compromise, more pins than UNO, nearly the same speed as DUE, still has a arm processor. The big down fall is all of these Some what zippier  devices are 3.3v at low current. This requires more attention to detail when designing a circuit. Careful not to smoke the cpu.
14  Products / Arduino Due / Re: DUE PWM Frequency on: November 18, 2012, 09:23:07 am
That Would be really really cool to have that added, I would call it pwmWrite as the leaf labs bunch dose. In fact the leaf labs pwmWrite already has this functionality.
This week I have been modifying my pcb and sketches to run with a maple. Would have preferred to use DUE, as I it is my belief that it will eventually become the standard but right now  it is shall we say green and not ready. Once the DUE grows up and matures it will provably overwhelm the little maple and press it out of existence.
15  Products / Arduino Due / swapping ide on: November 10, 2012, 11:45:05 am
Is it possible some way to program a due with Leaf Labs IDE as they have better commands. Or at   least give due the pwm write command from the leaf ide?

I really have to get my project moving in one direction or an other soon.
Pages: [1] 2