Show Posts
Pages: 1 ... 6 7 [8] 9 10 ... 22
106  Community / Gigs and Collaborations / Re: Time Lapse Project on: June 04, 2014, 11:18:21 am
Perhaps if you give us a bit more of a clue as to what it is you are seeking help with exactly. Hardware/firmware a combination of both related to the Keypad and LCD.

Have you already chosen your hardware as different LCD/Keyboards have different interfaces.

Have you also considered using a touch LCD interface so that the screen becomes you input devices instead of  a keyboard as well.

Cheers Pete.
107  Community / Gigs and Collaborations / Re: Help with a basic code on: June 04, 2014, 07:05:36 am
Sure whenever ... you know where to find me.
108  Community / Gigs and Collaborations / Re: Help with a basic code on: June 04, 2014, 03:40:39 am
HI Wayne ... is this now doing what you wanted it to ?

Cheers Pete
109  Community / Gigs and Collaborations / Re: Needed - Engineering/Programming for small paying projects on: June 04, 2014, 03:31:32 am
Hello Gary,

As requested I have sent you a PM.

Cheers Pete.
110  Community / Gigs and Collaborations / Re: Build us a cell-communication device that monitors a cabinet door on: June 04, 2014, 03:28:34 am
OK so I can design and build this system for you if you like.

BUT ! even though most of my clients are USA based I work and live in France. This is not proving to be a problem now or in the past.

  • You can see my portfolio of work on my website WWW.EmbeddedAT.com
  • I cannot give you a cost at this point as the design is not cast in stone.
  • I would suggest the use of a GSM modem card. This can be integrated with an Atmel  ATMEGA328 (Arduino uno) chip and built into a custom PCB.
  • As for cell service .. depending on what you are wanting to do a simple PAYG data plan will work for you. Also depending on the amount of data you want to send a few $ per month will suffice.
  • I cannot see a meeting taking place unless you want to fly me over and back. I am happy to have a Skype interview through if that helps you.
  • NDA is not a problem, I have a big pile of them from my other clients.

Please feel free to contact me for a chat about your requirement.

You say that this is for a small production run ... now many would that be ?

CHeers Pete.
111  Community / Gigs and Collaborations / Re: Help with a basic code on: June 03, 2014, 07:43:56 am
Hello Wayne,

Another version of the code with the last step in the sequence sweeping into and from the last step in 10 seconds attached and inline for you.

Code:
// ===================================================================================
// = library includes              =
// ===================================================================================
#include <avr/eeprom.h>
#include <Servo.h>
#include <Time.h> 

// ===================================================================================
// = Servo object instatiation              =
// ===================================================================================
Servo oServo; 

// ===================================================================================
// = Global variable to hold time and interval =
// ===================================================================================
time_t NextEvent;

#define Interval 1 //this is 600 seconds or 10 minutes

// ===================================================================================
// = Array to hold servo positions              =
// =   these are the servo PWM signals that you will need to tune to your servo      =
// ===================================================================================
int ServoPos[] = {1000,1080,1160,1240,1320};

// ===================================================================================
// = Structure to hold state              =
// ===================================================================================
struct ServoParams_t
{
int Position;
int Direction;
} ServoParams;


// ===================================================================================
// = Setup code              =
// ===================================================================================
void setup()
{

Serial.begin(9600);
oServo.attach(9); // Attach the oServo object to use pin 9
LoadSettings(); // Read from the EEPORM

if(ServoParams.Position > 4) ServoParams.Position = 4; // just a bit of safety in the case of the EEPROM value being out of range
if(ServoParams.Position < 0) ServoParams.Position = 0; // just a bit of safety in the case of the EEPROM value being out of range
if(ServoParams.Direction > 1) ServoParams.Direction = 1; // just a bit of safety in the case of the EEPROM value being out of range
if(ServoParams.Direction < -1) ServoParams.Direction = -1; // just a bit of safety in the case of the EEPROM value being out of range

NextEvent = now() + (Interval); // Set the first interval time

}
 
 
// ===================================================================================
// = Main Program loop              =
// ===================================================================================
void loop()
{
if(now() >= NextEvent)
{
SaveSettings();  // Store state in EEPROM
ServoParams.Position += ServoParams.Direction; // Increment or decrement the servo posistion array pointer
if (ServoParams.Position == 4 )
{
Serial.println(ServoPos[ServoParams.Position]);
int CurrentPos = ServoPos[3];
int DestPos = ServoPos[4];
int msSteps = 10000/ (DestPos - CurrentPos);
for(int SweepPos = CurrentPos;SweepPos < DestPos;SweepPos++ )
{
oServo.write(SweepPos);  // Write value to oServer Object
delay(msSteps/2);
}

for(int SweepPos = DestPos;SweepPos > CurrentPos;SweepPos-- )
{
oServo.write(SweepPos);  // Write value to oServer Object
delay(msSteps/2);
}
ServoParams.Direction = -ServoParams.Direction;
}
else
{
if (ServoParams.Position <= 0) ServoParams.Direction = -ServoParams.Direction; // check for range end and swap direction
oServo.write(ServoPos[ServoParams.Position]);  // Write value to oServer Object
Serial.println(ServoPos[ServoParams.Position]);
}
NextEvent = now() + (Interval);
}
}


// ===================================================================================
// = EEPROM Storage Handlers              =
// ===================================================================================

void LoadSettings(void)
{
eeprom_read_block((void*)&ServoParams, (void*)(sizeof(ServoParams)), sizeof(ServoParams));
}

void SaveSettings(void)
{
eeprom_write_block((const void*)&ServoParams, (void*)(sizeof(ServoParams)), sizeof(ServoParams));
}


Cheers Pete.
112  Community / Gigs and Collaborations / Re: MIDI input to PWM output on: June 03, 2014, 02:46:15 am
OK ... there is some confusion on your part going on here.

A motor cannot be used to play tones, at least not the way you are planning to using a variable frequency drive. You could get it to spin at different speeds and that would create a series of tones.

Why a motor for the OP device (unless you really are hacking a vibrator in which case i understand and require no further information)

Also what is you end goal on this. I am not sure i understand what the application is (again unless it really is a vibrator)

Cheers Pete.
113  Community / Gigs and Collaborations / Re: Help with a basic code on: June 02, 2014, 10:53:57 am
Hi Wayne,

OK so here is the code again tested against my Futaba RC servo that I use in my camera gimbal on my quatcopter.

Attached and in the thread.

It is running a full 90 deg rotation.

If you only want 45 deg then divide the values in the array by 2

 I.E. int ServoPos[] = {1000,1080,1160,1240,1320};

It is currently moving every second using the timing variable that you have already worked out how to adjust.

Have Fun

Cheers Pete.

Code:
// ===================================================================================
// = library includes             =
// ===================================================================================
#include <avr/eeprom.h>
#include <Servo.h>
#include <Time.h>  

// ===================================================================================
// = Servo object instatiation             =
// ===================================================================================
Servo oServo;  

// ===================================================================================
// = Global variable to hold time and interval =
// ===================================================================================
time_t NextEvent;

#define Interval 1 //this is 600 seconds or 10 minutes

// ===================================================================================
// = Array to hold servo positions             =
// =   these are the servo PWM signals that you will need to tune to your servo      =
// ===================================================================================
int ServoPos[] = {1000,1160,1320,1480,1640};

// ===================================================================================
// = Structure to hold state             =
// ===================================================================================
struct ServoParams_t
{
int Position;
int Direction;
} ServoParams;


// ===================================================================================
// = Setup code             =
// ===================================================================================
void setup()
{

Serial.begin(9600);
oServo.attach(9); // Attach the oServo object to use pin 9
LoadSettings(); // Read from the EEPORM

if(ServoParams.Position > 4) ServoParams.Position = 4; // just a bit of safety in the case of the EEPROM value being out of range
if(ServoParams.Position < 0) ServoParams.Position = 0; // just a bit of safety in the case of the EEPROM value being out of range
if(ServoParams.Direction > 1) ServoParams.Direction = 1; // just a bit of safety in the case of the EEPROM value being out of range
if(ServoParams.Direction < -1) ServoParams.Direction = -1; // just a bit of safety in the case of the EEPROM value being out of range

NextEvent = now() + (Interval); // Set the first interval time

}
 
 
// ===================================================================================
// = Main Program loop             =
// ===================================================================================
void loop()
{
if(now() >= NextEvent)
{
SaveSettings();  // Store state in EEPROM
NextEvent = now() + (Interval); // Set the next interval time
ServoParams.Position += ServoParams.Direction; // Increment or decrement the servo posistion array pointer
if (ServoParams.Position >= 4 || ServoParams.Position <= 0) ServoParams.Direction = -ServoParams.Direction; // check for range end and swap direction
oServo.write(ServoPos[ServoParams.Position]);  // Write value to oServer Object
Serial.println(ServoPos[ServoParams.Position]);
}
}


// ===================================================================================
// = EEPROM Storage Handlers             =
// ===================================================================================

void LoadSettings(void)
{
eeprom_read_block((void*)&ServoParams, (void*)(sizeof(ServoParams)), sizeof(ServoParams));
}

void SaveSettings(void)
{
eeprom_write_block((const void*)&ServoParams, (void*)(sizeof(ServoParams)), sizeof(ServoParams));
}
114  Community / Gigs and Collaborations / Re: Help with a basic code on: June 02, 2014, 10:08:24 am
Hi Wayne,

Sure sorry i got caught up with the family on the weekend . I will get to it today for you.

Cheers Pete.
115  Community / Gigs and Collaborations / Re: MIDI input to PWM output on: June 01, 2014, 07:56:56 am
this sounds a little confusing...

MIDI to PWM ..

OK PWM is Pulse WIDTH modulation not Frequency modulation. The frequency of the square wave remains the same it is only the mark/space ratio that changes. where does "tone/frequency" come into this.

When you say drive a motor , what kind ? if it is a standard RC Servo that takes PWM 1-2 ms with a 20ms duty cycle then you are adjusting the mark/space ratio and not the frequency. If you are intending that it should approximate an analogue output to drive a motor a different speeds (also PWM not Frequency) then you really should be looking at an external motor driver or ESC like those found on RC  gear.

Cheers Pete.
116  Community / Gigs and Collaborations / Re: Help with a basic code on: June 01, 2014, 03:02:57 am
OK I tell you what i will set this up on my UNO with a servo and video it for you. I am not about today daytime but i will get to it this evening for you.

Cheers Pete.
117  Community / Gigs and Collaborations / Re: Help with a basic code on: May 31, 2014, 07:42:27 am
OK so here it is for a "dumb ass" smiley

in the code you need to look for the line that looks like this

byte ServoPos[] = {0,51,102,204,255};

Now in simple terms this is a list of the location that the servos will move to and then back through.

Since I dont have your servo I CANNOT give you the ACTUAL numbers you need to put in here.

However it is a simple process to replace each number (by trial and error) with one that moves the servo to the position that you  want it to be for that stage of the pattern.

Now looking at the values that are in the array by default (the ones i used) you have (assuming a 10 second step time)
@ 0  Seconds 0
@ 10 Seconds 51
@ 20 Seconds 102
@ 30 Seconds 204
@ 40 Seconds 255

What you need to be doing is changing the value that the servo gets for each of the time slots

The easy way to do this is to use the sweep program and work out the limits of the servo.

as a guess i would try using the following values

byte ServoPos[] = {0,10,20,30,45};

These values should move it according to your ORIGINAL requirement of 0-45 deg and back in 5 steps


Cheers Pete.
118  Community / Gigs and Collaborations / Re: Help with a basic code on: May 31, 2014, 01:30:16 am
Hi Wayne,


Like I explained in the message i sent to you with the code  you have to adjust the values in the array to match the positions that you want to see

byte ServoPos[] = {0,51,102,204,255};  each of thes represents 5,10,15,20,25 min intervals and then it moved back down again.

Cheers Pete.
119  Community / Gigs and Collaborations / Re: Help with a basic code on: May 30, 2014, 03:37:41 pm
no worries it is my bedtime now I'll catch up in the morning

Cheers Pete.
120  Community / Gigs and Collaborations / Re: Help with a basic code on: May 30, 2014, 03:26:37 pm
Hi Wayne

I sent you a personal message with the links to the full instructions here it is again in case you have missed it somehow

Here follow this link and install the "Time" library

http://arduino.cc/en/Guide/Libraries

you can find the time library here
http://playground.arduino.cc/uploads/Code/Time.zip

Cheers Pete.
Pages: 1 ... 6 7 [8] 9 10 ... 22