Show Posts
Pages: 1 [2] 3 4 ... 14
16  Forum 2005-2010 (read only) / Interfacing / Re: 30 Second Timer + LED Display + Pager Motor HE on: April 21, 2008, 11:39:08 am
My approach to this would not be to use interrupts, but to use state machines which are checked every milli second.

In pseudo code in the main loop I would havesomething like:

Code:
prvMilli = 0;

loop(){
  crtMilli = millis();
  if (crtMilli != prvMilli) {
    prvMilli = crtMilli;    

    // this bit runs every milli second - check for things to do

   if (serial.available){
     get the serial character
     if (serchar = 'a'){
      do the a thing
     }
     if (serchar = 'b'){
        do the 'b' thing
     }
    
     TimerVal --;
     if (TimerVal =<0){
        TimerVal = 5000;

        do teh 5 second timer stuff
      }
      etc.

   }
  }
}

All processes would be implemented as state machines with none of the states taking longer than a milli second - that way there are no clock cycles wasted.

I hope that was clear(ish).

Sorry for not putting up proper code - my first coding language isn't c.

Mike



17  Forum 2005-2010 (read only) / Interfacing / Re: Arduino + PHP on: March 19, 2008, 09:31:47 am
I have no experience with Processing, but with VB and Delphi there are several libraries "out there" that will do serial comms.

For Delphi, I know more Delphi than VB, this one look scompetent:

http://www.domis.de/cms/index.php?module=ContentExpress&func=display&ceid=7

Regards,

MIke
18  Forum 2005-2010 (read only) / Interfacing / Re: Arduino + PHP on: March 18, 2008, 05:03:23 am
OK - I understand now.

This is most easily done using serial ports.

The arduino communicate to the PC using the serial port. You need an application running on the PC which can read and write to the serial port. This app can be written in C, but maybe easier in Visual Basic, Delphi or Processing.

That application will be able to poll an email server directly or it can call a PHP script running on a server somewhere.

HTH,

Mike
19  Forum 2005-2010 (read only) / Interfacing / Re: Arduino + PHP on: March 17, 2008, 09:25:09 am
Arduino with PHP?

This could mean a number of things:

1) Running PHP on an Arduino, like you would on a webserver.

2) Comiling PHP so it runs on the Arduino in a similar way to C/C++ in the IDE.

3) Running some code on the Arduino which calls a php script on a web server.

Can you elaborate on what you are trying to do?

Regards,

Mike
20  Forum 2005-2010 (read only) / Interfacing / Re: rgb led 196x32 matrix on: March 18, 2008, 05:58:11 am
Here's a place that does them: http://www.selectricsigns.com/  you can find out how much they cost from them.

There is a datasheet there - input power requirments were (IIRC) 12V @ 3A. Not huge, but not insignificant either.

As for how to wire it up - modules may be a the right way. One thing I was thinking is that these kind of displays have been around for a long time, going back to the 8080 or Z80 era. It would not have been usual in those days to have many processors. It would probably haev been done with parallel loaded shift registers.

It might give a clue as to how to structure a modern design.

Also, I seem to remember there being a magazine project some years ago, too. (Probably Elector, but maybe the UK magazine Practical Electronic.

Its a good project - certainly gets the brain going.

Just found this kit: http://www.hobbytron.com/vk5600g.html

Runs off a single 18 pin 18C54 PIC - no sign of anyother ICs, so must be multiplexing the whole lot. I doubt this is how it is done on the commercial units.

Mike
21  Forum 2005-2010 (read only) / Interfacing / Re: Laser harp working - thanks for help!! on: March 03, 2008, 05:51:21 am
That looks stunning.

Has anyone got a link to a suitable laser module?

Thanks,

Mike
22  Forum 2005-2010 (read only) / Development / Re: Automobile Cruise Control Project on: March 03, 2008, 08:37:54 am
Quote
Wouldnt you want to find vehicle speed instead of engine rpm?

You can use either - assuming the tyres don't skid and there is no clutch slip there is a linear relationship between engine revs and speed on a car with a manual gearbox. It is different with an auto box.

You should monitor engine revs anyway and stop controlling when engine revs either change unexpectedly (clutch pedal depressed) or changes with no corresponding change in speed (skid, accident, flying over bridge etc).

This is an interesting project - one I have thought of doing many times. IMO, the hardware is the trickiest bit, so I would take the advice of seeing if you can get some hardware from a junk yard.
23  Forum 2005-2010 (read only) / Troubleshooting / Re: Best rechargeable battery setup for Arduino BT on: September 09, 2008, 05:34:22 am
According to this page:

http://www.arduino.cc/en/Guide/ArduinoBT

the Arduino BT will run with an input as low as 1.2V. So, it could run from one AAA battery or from a Lithium cell.

That said, they may not last long.

Mike
24  Forum 2005-2010 (read only) / Interfacing / Re: Programmable Thermostat, Light Dimmer System on: April 21, 2008, 05:06:18 am
Quote
First, I need the thermostat to keep a day/hour/minute clock and I'm not sure about the best way to do that.  

There are a number of real time clock chips around that use a two or three wire interface. This one for example: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2686 though there are others. Just add a 32kHz crystal and a battery and you're good to go.


Quote
Second, I'm guessing I'll be using relays to control the signals sent to the HVAC units.  Apparently there are four wires - a 24V DC supply from the HVAC transformer and then three signal wires - one for the A/C unit, one for the heater, and one for the fan.  When you close the 24V DC to any of the three control wires, it turns on that  HVAC function.  So, I need relays to control the 24V DC with the signal off the Arduino, correct?

This sounds correct. There are many miniature relays around that could switch 24V. The real question is what load is being swithed - ie how much current is drawn. You will probably need a little transistor between the Arduino and the relay coil, though.

You can always test the how circuit works as you expect by wiring toggle switches and putting an ammeter in series with the switch.

Regards,

Mike
25  Forum 2005-2010 (read only) / Interfacing / Re: Programmable Thermostat, Light Dimmer System on: April 21, 2008, 04:53:38 am
Quote
 The code for this is not a problem - what I don't know I'm sure I can find on the Arduino tutorial site, but I'm wondering if anyone knows where I would start on any sort of relay/dimmer system that could interface between the Arduino and the 120V 20A lighting circuits.

Thyristors and triacs are frequently used for AC light dimming.

This page: http://www.allaboutcircuits.com/vol_3/chpt_7/5.html seems pretty comprehensive.

I have heard of a light dimmer kit available (I believe it was an Elektor kit) that has an analogue input to control brightness which may prove to be suitable.

Mike

26  Forum 2005-2010 (read only) / Interfacing / Re: Measuring water flow on: July 24, 2008, 08:16:56 am
Quote
My next qyestion is; How do I count those pulses with the Arduino? Do I have to add some extra hardware or can I connect the pulse output directly to the Arduino board?

That depends on the details of the output circuit of the flowmeter.

Often these things will have an open collector to ground - all you will need is a pull-up resistor to the Arduino supply (or use the internal pull-up resistor on the input pin).

Can you point us to a datasheet of the flowmeter you are using?

edit . . .

Is this the flowmeter:

http://www.swissflow.com/en/SF800/Flow_Meter_Specifications

If so, there is no mention of output circuirty - I think it reasonable to expect 5V pulses if you power it with 5V, no extra circuitry needed.


Mike


27  Forum 2005-2010 (read only) / Interfacing / Re: Servo ease in/ease out on: September 29, 2010, 07:04:55 am
You are right, Filmo.

The correct place to be changing the servo behaviour is within the servo.

Using the small step/delay method is clever and will get results that are good enough for many applications, but it is not the best way.

Industrial motor drives often have definable start and stop parameters for just this reason.

Regards,

Mike
28  Forum 2005-2010 (read only) / Interfacing / Re: Arduino and camera/webcam on: November 19, 2008, 09:09:06 am
Whilst I agree with Mike about capturing / storing / sending the video in real-time, it may be possible to do something with the arduino, but not in real-time.

For example, if the application was such that the picture was stable for minutes at a time one could imagine the arduino could capture, store and transmit the picture without breaking into a sweat.

How close you can get to real-time would be interesting to work out.

Mike
29  Forum 2005-2010 (read only) / Interfacing / Re: Arduino + CC2500 2.4Ghz on: September 02, 2008, 12:01:28 pm
Looking at this page:

http://focus.ti.com/docs/prod/folders/print/cc2500.html#features

is the sentence:

"In a typical system, the CC2500 will be used together with a microcontroller and a few additional passive components."

It does look like you will be able to send data from one arduino to another with this device.

Regards,

Mike
30  Forum 2005-2010 (read only) / Interfacing / Re: using a touch screen from a phone on: March 23, 2008, 05:15:15 am
That's it.

You certainly need to set the outputs that drive one pair to input when you drive the other pair, and vice versa.

Sorry if i'm not explaining it too well.
Pages: 1 [2] 3 4 ... 14