Loading...
  Show Posts
Pages: 1 [2] 3 4 5
16  Using Arduino / Sensors / Re: adaencoder and HDD motor on: September 25, 2012, 10:06:51 pm
I'm back from the article.

At Step#4 ( I read it before starting this thread) there is 3 Signal from schematic.
adaencoder library only take 2.

Is there any work around ?

-bino-
17  Using Arduino / Sensors / Re: adaencoder and HDD motor on: September 25, 2012, 09:46:30 pm
Dear Pylon

Thankyou for your warn ... i'll back to the article.

-bino-
18  Using Arduino / Sensors / Re: Using two flow sensors connected to one Arduino. on: September 25, 2012, 09:41:07 pm
I think we can use PinChangeInt

One Digital input for each FlowSensor

Lets say the variable to hold Fuel Consumption is 'fc'.
First PinChangeInt (The forward) will add 1 to fc, and the second (The return) will substract 1 from fc

The main loop only check for time periode.
When the periode reached, calculate the real fuel consumption basd on fc and your sensor spec (pulse/galon). That if you want consumption per time

Alternatively, if you easy about acuration, you can put freq devider (prescaler) between the Forward-Sensor and First PinChangeInt.

I'm pretty sure soon you will also want to look at the RPM.

Have a nice hack
-bino-
19  Using Arduino / Sensors / adaencoder and HDD motor on: September 24, 2012, 11:17:18 pm
Dear All.

I learn about the adaemcoder library http://code.google.com/p/adaencoder/

It attract me since it use PinChangeInt, very blessing for 328 based board user.

I want to use my HDD motor as the encoder .... copy cating http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/

The problem is the fact that HDD motor have 4 pins rather than 3.
Is there any work around that can turn this HDD motor tobe 3 pin encoder

Sincerely
-bino-
20  Using Arduino / Programming Questions / aJSON: How to change item value ? on: May 08, 2012, 09:37:33 pm
Dear All.

I need to send out data from arduino in JSON Format.
I Try to learn about aJSON.

Here is my current test code.

Code:
#include <aJSON.h>

void setup()
{
  Serial.begin(9600);
  delay(1000);
  Serial.println("aJSON Test");
  aJsonObject *root;
  root=aJson.createObject();
  aJson.addNumberToObject(root,"mynumber_a",1920);
  aJson.addNumberToObject(root,"mynumber_b",2570);
  char *json_String=aJson.print(root);
  delay(2000);
  Serial.println(json_String);
}
void loop()
{}

My question is : How to change the value of "mynumber_a" and "mynumber_b" inside my loop ?
Do I have to delete and re-add the object ?

Sincerely
-bino-
21  Using Arduino / Project Guidance / Re: Senior project Questions/Advice seeking on: May 08, 2012, 07:30:38 am
What if something like this:
1. Sensors : 2 Sensors
a. Sensor1 facing to 'front'
b. Sensor2 facing down

2. Flight Scheme.

a.When first turn on, make the drone fly verticaly until it pass pre-defined altitude. Alititude is counted using sensor2.


b. fly forward, until the sensor1 catch predefined distance.

c. turn right, let's say 30 degre.

d. loop to #b ... do it until the batery out of power.

Sincerely
-bino-

22  Using Arduino / Project Guidance / Re: PinChangeInt : Monitoring Marine engine on: May 07, 2012, 08:48:45 pm

I question the tachometer circuit. It's output will be a signal between 0 and 15V, either a pulse width modulated signal or an analog voltage (depending on filtering). I think the VR signal conditioner on the front end needs some protection and it may not work at slow speeds. I don't understand what the block labeled "charge pump" does unless it is a switched cap amplifier to isolate the output from the input.


That "Charge pump" is internal of LM2917

Ok Here my try

I'm adopting http://www.ti.com/lit/ds/symlink/lm2907-n.pdf Page 10.
It say 66 Hz / Volt ... thats how my max Volt will be very High at first.
Then I try to put Voltage devider to the output ... and feed the devided voltage to arduino


OOpppsss ... My apologize ... I don't know the code to shrink down the image for display

R3 and R4 are the voltage devider.

MPU is : Magnetic PickUp
TACH Pin is the one that connected to Arduino Analog Pin.
Whith 132 tooth wheel the freq/RPM is : 2.2 Hz/RPM
And with that Volt devider, Hopefully the Volt/RPM is arround :  0.00105922002889 Volt





Sincerely
-bino-
23  Using Arduino / Project Guidance / Re: PinChangeInt : Monitoring Marine engine on: May 07, 2012, 08:01:12 pm

Bingo.  Bring that max 6000 pulses-per-second down to a more reasonable number by dividing by (e.g.) 2, 3, or 6.  That relaxes the demand on the AVR handling interrupt requests considerably.  High dividers trade reduced resolution for less processing time.  Assuming you're just looking for a heads-up display for RPM, you don't need single-revolution precision anyway.

Actualy it is for data loging.
The log will be used to judge the sailor behavior.


(Although, in retrospect, it looks like this is basically what Nick was suggesting by using the timer input to fire once every however-many pulses.)

Agree.
But as I state above, i'm not good enough to understand His code.
I never play with timer before.

I only have 2 weeks to finish the project, including all server side programming.

Sincerely
-bino-
24  Using Arduino / Project Guidance / Re: PinChangeInt : Monitoring Marine engine on: May 07, 2012, 07:56:49 pm
Dear DuaneB
guys why wouldn't you use a counter ic as a prescaler on the 6000 pulses per second ?



Could you please give me the part name ?

Sincerely
-bino-
25  Using Arduino / Project Guidance / Re: PinChangeInt : Monitoring Marine engine on: May 07, 2012, 03:29:04 am
Dear Nick Gammon.


So you would prefer to work with 4925 volts than just have a timer count pulses?


I knew that arduino analog will unable to handle that level of voltage

Well ... actualy after some correction on that ''
with 132 tooth wheel, it can reach 154.985074626866 V at 4720 RPM

Using Voltage devider before entering Analog Pin


using R1=300 Ohm , and R2=10 Ohm
and
Vout = (R1/(R1+R2)*Vin

The Vout at 4720 RPM will be 4.99951853635051 Volt ... It is compatible with Analog PIN

The problem will : How much is the real max RPM of the engine

Sincerely
-bino-
26  Using Arduino / Project Guidance / Re: PinChangeInt : Monitoring Marine engine on: May 07, 2012, 02:21:15 am
Dear Nick Gammon.

My apologize, my brain is not good enough to understand your code.
Thats why I look for a dumb work around.


I got additional info about target engine
The engine have 132 tooth flywheel, and max RPM is 2500

and I will use this to convert from Frequency to Voltage



with Magnetic Pickup like above, I thing I can use (cmiiw) the math of :

Freq = Gear x Rpm

means that the max Freq will be : 132 x 2500 = 330,000 Hz

and the max Voltage will be 4925.373134328 V.
Using Voltage devider of factor 0.001 at the Vout point, I'll got max volt of 4.925373 V where the arduino analog pin can handle.
And I thing the max analogread value returnd will be (4.925373/5)*1023 => 1007.7313
That is the max value that will be reported to PC.

Thats what I can thing it so far.

Sincerely
-bino-
27  Using Arduino / Project Guidance / Re: PinChangeInt : Monitoring Marine engine on: May 07, 2012, 12:22:31 am
Dear Nick Gamon and El_supremo.

I realy appreciate your enlightment.

Hmmm ... second thought ....
What About this :
1. Use PinChange For that 4 Flow meter (Low pulse per minute), and
2. Use Frequency-to-voltage IC and feed the output to Analog pin to read the current engine RPM

Something that noted at http://www.jaycar.com.au/images_uploaded/LM2907.PDF page 7 (Minimum Component Tachometer) , Plus a voltage devider .

About periodic Serial.println .... could be done.
Maybe once per second ?

Sincerely
-bino-
28  Using Arduino / Project Guidance / Re: PinChangeInt : Monitoring Marine engine on: May 06, 2012, 10:44:07 pm
Dear Nick Gammon
I really really appreciate your enlightment

Why not use the external interrupts, rather than the pin change interrupts?
Since there is only 2 external interupts on arduino, while I need to handle 6 pulse source

What is the objective here? To work out the engine speed?

You can use timers to count events like that, which will be very efficient and accurate. I have some examples here:

http://www.gammon.com.au/forum/?id=11504

Really good examples, but I try to off-load the Math/Counting from arduino to a PC. Thats why I just use the arduino as 'pulse to ASCII' translator

Sincerely
-bino-
29  Using Arduino / Project Guidance / PinChangeInt : Monitoring Marine engine on: May 06, 2012, 10:02:40 pm
Dear All ...

I'm planning on using arduino and a PC as data logger of Marine Engine (tug boat with 2 diesel engine).
The arduino will only function as 'pulse to ascii converter'.
The pulse will come from :
- 4 x Fuel Flow meter
- 2 x RPM (Magnetic Pickup)

Currently all I know is that the max fuel flow is 4L/minute , while the Flow sensor is about 1000 pulse per L.
So for single FlowMeter there will be max of 4000 pulse per minute, about 67 pulse per second.

About the magnetic pickup for RPM :
1. The flywheel is +/- : 200 Tooth
2. Max RPM : 1800 RPM
So the max pulse for the RPM will be around : 360000 pulse per minute , 6000 pulse per second.

So the summary, Arduino will receive (at max) :
1. 4x Interupt , each at 67 Interupt per second
2. 2x Interupt , each at 6000 interupt per second

I'm planing to use PinChangeInt library to receive pulse, something like this :
Code:
/*
Adopted from :
http://arduino.cc/playground/Main/PinChangeIntExample?action=sourceblock&num=1
*/
#include <PinChangeInt.h>
#include <PinChangeIntConfig.h>

#define FL_A1 14  // Will be flowmeter A1
#define FL_A2 15  // Will be flowmeter A2
#define RPM_A 16  // Will be RPM A

#define FL_B1 14  // Will be flowmeter B1
#define FL_B2 15  // Will be flowmeter B2
#define RPM_B 16  // Will be RPM B

void setup() {
  Serial.begin(9600);
  Serial.print("PinChangeInt test on pin 14-19");

  pinMode(FL_A1, INPUT);     //set the pin to input
  digitalWrite(FL_A1, HIGH); //use the internal pullup resistor
  PCintPort::attachInterrupt(FL_A1, cb_fla1,RISING); // attach a PinChange Interrupt

  pinMode(FL_A2, INPUT);     //set the pin to input
  digitalWrite(FL_A2, HIGH); //use the internal pullup resistor
  PCintPort::attachInterrupt(FL_A2, cb_fla2,RISING); // attach a PinChange Interrupt

  pinMode(RPM_A, INPUT);     //set the pin to input
  digitalWrite(RPM_A, HIGH); //use the internal pullup resistor
  PCintPort::attachInterrupt(RPM_A, cb_rpma,RISING); // attach a PinChange Interrupt

  pinMode(FL_B1, INPUT);     //set the pin to input
  digitalWrite(FL_B1, HIGH); //use the internal pullup resistor
  PCintPort::attachInterrupt(FL_B1, cb_fla1,RISING); // attach a PinChange Interrupt

  pinMode(FL_B2, INPUT);     //set the pin to input
  digitalWrite(FL_B2, HIGH); //use the internal pullup resistor
  PCintPort::attachInterrupt(FL_B2, cb_fla2,RISING); // attach a PinChange Interrupt

  pinMode(RPM_B, INPUT);     //set the pin to input
  digitalWrite(RPM_B, HIGH); //use the internal pullup resistor
  PCintPort::attachInterrupt(RPM_B, cb_rpmb,RISING); // attach a PinChange Interrupt

  }

void loop() {
}

void cb_fla1()
{
  Serial.println("A,FL,1");
}
void cb_fla2()
{
  Serial.println("A,FL,2");
}
void cb_rpma()
{
  Serial.println("A,RPM,0");
}

void cb_flb1()
{
  Serial.println("B,FL,1");
}
void cb_flb2()
{
  Serial.println("B,FL,2");
}
void cb_rpmb()
{
  Serial.println("B,RPM,0");
}

My question :
1. Is there any processing time enough for that interupts ?
2. Will the interupts process hit/break/intervere each other ?

Note : Currently I don't have any pulse generators on my desk to simulate the task.

Sincerely
-bino-
30  Topics / Product Design / Just to share. Arduino eagle library with drilled top side pad on: December 28, 2011, 06:28:48 am
Dear All ..
I don't know if it will have any use or not.

SMD part is easy to get.
But when we design Arduino Shield based on available eagle library .. we need to use Long stackable PInHeader.
This kind of pinheader is hard to find in such are.

So I think we need an eagle library with "pad" on top side.

My try is to use Adafruit library.
I made a note of all :
- Drill Size
- Pad Diameter
- Pad location of each pin
- Pad Names

I delete the original botom side pad ,
Put SMD pad with the size as noted pad diameter and 100% Roundness
Combine it with "Hole" at size of noted drill size

And here it come in attachment,
Note : not tested yet .. maybe you can help me to print it on transparency and compare it with your Arduino board

Sincerely
-bino-
Pages: 1 [2] 3 4 5