Show Posts
Pages: [1] 2 3
1  Using Arduino / General Electronics / Re: Bike light circuit on: September 14, 2012, 06:05:43 am
Gents,

Many thanks for your help! I think I will go with your ideas much simpler  smiley-roll

Apologies for the lateness in my reply, but I was geeting married and enjoying my honeymoon  smiley-lol

Thanks again,

Mark
2  Using Arduino / General Electronics / Bike light circuit on: August 21, 2012, 11:47:03 am
Afternoon all,

Trying to come up with a transistor based circuit for my bicycle lights.
The idea is illustrated in the attached drawing.
If the wheels are spinning and hence generating a voltage on the dynamo (far left), the first set of transistor (from the left) would receive a positive signal at their base and would isolate the battery from the main circuit, when the dynamo stops spinning a low voltage is present at the base and the batteries come on line.
The other side of the circuit would control if the charge from the dynamo goes to the led's or battery for charging, as before a high and low voltage signal would control the base of the other two transistors. I was wondering if it would work and if I need a reference voltage for the transistors to work?

Thanks in advance,

Mark
3  Using Arduino / General Electronics / Re: H Bridge design on: June 28, 2012, 04:48:08 pm
Thanks MarkT & Grumpy_Mike,

That's exactly the idea, I want to use the l298 to drive the high & low side of the H-Bridge, If its OK will you guys I will redo the schematic and repost it?

Thanks again for the help!

Mark
4  Using Arduino / General Electronics / Re: H Bridge design on: June 28, 2012, 04:34:48 pm
Hi Runaway Pancake,

I'n using a 12v motor (http://www.robotshop.com/ca/PDF/rbban63-banebots-DC-motor-specs.pdf)

Is V_ce(sat) the voltage loss across the output transistor?

Thanks,

Mark
5  Using Arduino / General Electronics / Re: H Bridge design on: June 28, 2012, 12:28:51 pm
Hello again,

Any objections to using a L298 (http://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf) to drive the the MOSFETS?
The reason I ask, is that I already have them, and getting new components where I live just takes forever!

Thanks again for your help!

Mark
6  Using Arduino / General Electronics / Re: H Bridge design on: June 28, 2012, 05:07:51 am
All,

Many many thanks for your help, I really appreciate it.
I will go back to the latest link and review the design.
If you don't mind I will post the revised schematic for further comments?.

Thanks again!

Mark
7  Using Arduino / General Electronics / Re: H Bridge design on: June 27, 2012, 04:58:03 pm
Hi Grumpy_Mike,

Thanks for your comments, can you please clarify what will fry?

Please see this link, the Arduino is connected directly to the gate of the mosfet?

http://bildr.org/2012/03/rfp30n06le-arduino/

Thanks again for your comments.

Mark
8  Using Arduino / General Electronics / H Bridge design on: June 27, 2012, 04:46:29 pm
Hello all,

Although I have been playing around with the Arduino for a while now I have always used pre manufactured circuits.
I decided to break the habit with the "simple" H-Bridge.
I was wondering if someone could review it for me and maybe spot any major errors (think my cap value is wrong?).
I have attached my design schematic and design calcs which are entirely based on this article:

http://modularcircuits.tantosonline.com/blog/articles/h-bridge-secrets/

Many thanks in advance for you help,

Regards,

Mark
9  Using Arduino / Networking, Protocols, and Devices / Getting 2 arduinos to talk on: June 10, 2012, 12:13:25 pm
Hello all,

I have managed to get two arduino boards to talk to each other with a very simple sketch. I have connected the two boards via the rx & tx pins, but it only seems to work as long as the boards are powered via usb. As soon as I use a battery pack it fails to work?
The boards are close to each other leads are only 3" long.
Any ideas what could be causing the problem?

Thanks in advance for your help.

Mark
10  Using Arduino / Project Guidance / Re: Pre test review on: May 11, 2012, 01:10:57 pm
AWOL/Pylon many thanks for your comments, I guess I still have lots to learn!  smiley-roll-sweat
I will try again.
11  Using Arduino / Project Guidance / Pre test review on: May 11, 2012, 06:32:36 am
Afternoon all,

I have been asking for help over the last months with the RS485 protocol, after lots of help from the forum I managed to get my head around the concept. Instead of using someone else's code I wanted to write my own (silly I know just wanted a challenge) seems like I bit off more than I could chew, but none the less I have managed to write some sending and receiving code, I plan on setting up the hardware tonight/tomorrow for a full test, but I would like if possible for some member's to review it and maybe advise me where I could make the code less repetitive or comber sum, many thanks in advance for any help.

Sending code
Code:
//Proof of concept for sending array of rs485 created 10.05.12 by Mark Netto

long A = A2;// sets analog pin two as A
long B = A3;// sets analog pin three as B
long newA = 0; //variable to store value of inputA
long newB = 0; //variable to store value of inputB
static long oldA = 0;//variable used to compare values of input A
static long oldB = 0;//variable used to compare values of input B
long packet[4];//packet array to store all data to transmit.
int TXpin = 8;//transmit enable pin = pin 8
long START = 11111;//start of transmission byte
long END   = 10101;//end of transmission byte
long CRC = (packet[0]+packet[1]+packet[2]+packet[3]);//crc check

void setup()
{
  Serial.begin(19200);
  pinMode(TX, OUTPUT);
}

void loop()
{
  newA = analogRead(A/4);
  newB = analogRead(B/4);
 
 if ((oldA != newA)||(oldB != newB))
 {
   oldA=newA;
   oldB=newB;
   create();
   send();
   delay(2500);
 }
}


void create()
{
 packet[0] = START;
 packet[1] = oldA ;
 packet[2] = oldB ;
 packet[3] = END ;
 packet[4] = CRC  ;
}

void send()
{
  digitalWrite(TXpin, HIGH);//enable transmission
  for(int i=0; i < 4; i++)
{
Serial.println(packet[i]);
}
 digitalWrite(TXpin, LOW);//disable transmission
}


Receiving code
Code:
//Proof of concept for recieving array over rs485 created 11.05.12 by M. Netto


#include <Servo.h>
Servo myservo; // Create servo object to control a servo.
int pos1 = 0; // Variable to store the servo position.
int pos2 = 0; // Variable to store the servo position.
long packet[4];//packet array to store incoming values.
long A;//variable A.
long B;//Variable B.
long ICRC;//variable for incoming CRC value.
int RXpin = 5;//sets pin 5 as RX enable pin.
long START = 11111;//start of transmission byte.
long END   = 10101;//end of transmission byte.
long CRC = (packet[0]+packet[1]+packet[2]+packet[3]);//crc check

void setup()
{
Serial.begin(19200);
pinMode(RXpin,OUTPUT);
myservo.attach(8); // Attaches the servo on pin 8 to the servo object.
myservo.attach(9); // Attaches the servo on pin 9 to the servo object. 
}

void loop()
{
  start:
  void recieve();
  ICRC = packet[4];
  if(ICRC == CRC)
  {
    A = packet[1];
    B = packet[2];
  }
  else
  {
   goto start;
  }
 
pos1 = map(A, 0,1000, 180, 0);
myservo.write(pos1);
pos1 = map(B, 0,1000, 180, 0);
myservo.write(pos2);
delay(5);
 
}


void receive()
{
 if (Serial.available() > 0) // confirm data is available
{
 if (Serial.read() == START);
 {
  packet[0]=START;//asign start to packet [0]
  }
 if(Serial.available() >0);
 {
  packet[1] = Serial.read();//asign start to packet [1]
  }
 if(Serial.available() >0);
 {
  packet[2] = Serial.read();//asign start to packet [2]
  }
 if(Serial.available() == END);
 {
  packet[3] = END;
  }
  if(Serial.available() >0);
 {
  packet[4] = Serial.read();//asign start to packet [4]
  }
 
}
}

Regards,

Mark
12  Using Arduino / Programming Questions / Re: Functions on: May 11, 2012, 05:38:09 am
Many thanks!
13  Using Arduino / Programming Questions / Functions on: May 11, 2012, 05:31:12 am
Hello all,

I'm familiar with functions and declaring them with void function(){}, but I have recently come across a function written as follows:

 void sendMSG(byte address1,byte address2,byte data_type,byte code1,byte code2,byte Sign,byte data1,byte data2,byte data3,byte data4){

The question is what purpose does it serve to place that data in-between the ().

Thanks in advance,

Mark
14  Using Arduino / Project Guidance / Re: Ethics & Arduino on: February 15, 2012, 06:31:37 am
Hello all,

Thanks for all your replies, I always try to give more than I take, I might approach the local education  department to introduce a Arduino module in there art/design and technology syllabus. If I can donate I will, but unless the money is going to an individual such as liudr, the benefit might not be as wide spread? what do you think?
I you have any more ideas/proposals on how I can give back I'm all ears  smiley-roll-sweat

Many thanks again,

Mark

P.S. love Osgeld comment  smiley
15  Using Arduino / Project Guidance / Ethics & Arduino on: February 13, 2012, 05:43:12 pm
Ladies and gentlemen,

As I continue to gain experience and knowledge(most from this forum) I can't help restraining my excitement and project ideas. As a natural outcome I have applied the possibilities of Arduino to my line of work (mech eng), although these ideas or concepts are merely just that, ideas. The complexity and development of these ideas is surely going to depend on feedback from forum members. With time the projects I'm planning could provide financial return (very big could!) What would be the norm and do the members who helped get part of that return, or is a thanks accepted. I just want to make sure I don't cheat anyone even though it might be unintentionally.

Thanks,

Mark
Pages: [1] 2 3