Show Posts
Pages: [1] 2 3
1  Using Arduino / Project Guidance / Re: Good inexpensive sensors and gyroscopes... on: April 04, 2014, 01:19:54 am
I use the MPU 6050 gyro/ accel sensor  in some of my projects and it should be fine. You might find it for $4 on ebay / chinese website. It uses I2C communication.
2  Using Arduino / General Electronics / Re: problems in H bridge on: March 12, 2014, 12:16:10 am
A disadvantage of the pnp / npn bridge is that the pnp transistors usually have worse stats compared to npn, so they probably have lower beta and more voltage drop. From a schematic point of view  the complimentary h bridge also has to be driven either with HI or LOW, but it can't be hi-z since the top pnp will look like a diode and activate the bottom one through the 2 * 1k resistors. That's why that HC14 inverter is there . Since an arduino starts in hi-z while the bootloader initialises this might not be the best idea. I used such a bridge with 4 arduino pins, or you could use 2 more transistors ( or 2 inverters)  and 2 pins.

The all npn bridge can be left with the inputs floating. As such you can connect it to 2 arduino pins. On the other hand driving the all npn bridge with 2 HI = self destruct. The pnp bridge does not have that function. Instead it brakes.

hope this is accurate.
3  Using Arduino / Project Guidance / Re: weird behavior after a long power cycle - fuse issue? on: March 11, 2014, 10:39:06 pm
A very strange issue, a similar thing happened to me, however it was caused by large current draw from a battery supply . The strange thing is it should have never dropped the voltage low enough to upset anything. I thought it was because it was happening very fast, possibly. I haven't used the scope at that time and I was very happy to use a step-up to fix the problem.
But yes, it required reprogramming after every instance.

It would seem there is a voltage range that corrupts the flash is some situations.
4  Using Arduino / Programming Questions / Re: Knob with speed limit on: March 10, 2014, 11:40:40 pm
I think this might work but I can't test it since my last arduino is tied up in a project right now.

Code:
// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

#include <Servo.h>
 
Servo myservo;  // create servo object to control a servo
 
int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

int speed = 5;

void setup()
{
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object

}
 
void loop()
{
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 1023, 0, 179);     // scale it to use it with the servo (value between 0 and 180)
  if( val > myservo.read() + speed) myservo.write( myservo.read() + speed) ;
  else
  if (val < myservo.read() - speed) myservo.write( myservo.read() - speed) ;
  else  myservo.write(val);                  // sets the servo position according to the scaled value
 
  delay(15);                           // waits for the servo to get there
}

5  Using Arduino / Programming Questions / Re: The effect of delays on a timer on: March 10, 2014, 10:56:57 pm
The arduino clock (quartz) could be assumed to have a,  say, 1% accuracy. But if you use delay 1ms in your loop you have to count the time of the other instructions before delay as well. If you check the millis timer for an elapsed value of two hours it could be expected to have good accuracy.
6  Using Arduino / Project Guidance / Re: One TTL (RX, TX) port to both half duplex RS485 and RS232 at the same time? on: March 10, 2014, 07:46:40 pm
Max 485 has a shutdown pin which would make this trivial. However MAX232 does not. I am sure you could find a substitute with a shutdown / hi-z pin. If not you could power it from an arduino pin and switch it off when not needed. You would also need two diodes and pull downs to isolate inputs / outputs. It looks to me like it would work. Or you could use a CMOS buffer with hi-z function to isolate. Or even a 4066 switch.
7  Using Arduino / Project Guidance / Re: PLS. HELP avrdude:warning:cannot set sck period.please check for usbasp firmware on: February 27, 2014, 09:07:35 pm
It might be obvious, but are you actually following the instructions of the "gizduino" when programming it? Like apparently setting a jumper and pressing the reset button?

8  Using Arduino / Sensors / Re: ir reading no much diference .... on: October 14, 2013, 09:27:35 pm
I hope you have just forgot to tell us about the resistor in series with the IR led. There are some other problems, too, such as the fact that the LPT phototransistor is clear, and as such it will react to daylight as well. The reason you read such high A0 values could be because the phototransistor is saturated with daylight. You might have better results reducing the 10k resistor to say, 1k.
9  Using Arduino / Sensors / Re: Which optical mouse sensor is this? on: October 14, 2013, 09:08:17 pm
The pcb tracks seem to support a pan3101 layout (or compatible)
10  Using Arduino / Motors, Mechanics, and Power / Re: Measuring AC Power to make best use of Solar Panel output on: October 14, 2013, 08:16:26 pm
How does using a multiplier address the power factor issue? You are unable to measure any current at zero volt crossing, so you will have a power factor bias. I hope I haven't missed anything important,
11  Using Arduino / Programming Questions / Re: Can't get MPU6050 and Jeff Rowberg's DMP code to work. on: October 12, 2013, 11:27:31 pm
Yeah, I had a look at the code and ended up on the "Quaternion" wikipedia page. I closed that soon after. Anyway, it shows that it is often harder to understand someone elses program then it is to write a new one.

However, I can post something useful, a complimentary filter is very simple, it goes like this:

angle = 0.90 *  ( gyro + angle) + 0.10 * acceleration_derived_angle;

This works because last part acts as a low pass filter and the first part as a (pseudo)  high pass filter. A better explanation can be found at http://web.mit.edu/scolton/www/filter.pdf.

12  Using Arduino / Motors, Mechanics, and Power / Re: Clarity on PWM "perceived" voltage please? on: October 12, 2013, 10:35:17 pm
The reason why this works can be understood if you think the motor is broken by power it uses (it overheats) rather then a voltage. The power the motor uses is the same in both situations.  If you were powering up a led, it would break because the current would exceed it's maximum value.
13  Using Arduino / General Electronics / Re: Switching high power outputs quickly on: September 28, 2013, 12:33:41 am
You could do it with some creativity, If you bypass the arduino 5V  regulator and connect the arduino 5V to your 12 V high side, you could switch P - mosfets (logic level) by setting the outputs to ground. Setting them to "High" would turn them off.

To provide proper power for the arduino you would need a negative supply voltage regulator like a LM7905 which would connect to arduino ground.

It's sounds a bit complicated, and I really can't explain it any better.
14  Using Arduino / Motors, Mechanics, and Power / Re: Help with PID via encoder and PWM on: September 23, 2013, 07:45:17 pm
Could it be because you turned on the pid in setup before you set Input / Output?
15  Using Arduino / Sensors / Re: Quadcopter Stabilizing (I2C Gyro Acc) on: September 23, 2013, 05:52:10 am
My question is why map the accel to -90 , 90, isn't the angle related to cos of gravity vector? Or is it for some other purpose?
Pages: [1] 2 3