Show Posts
Pages: [1] 2 3
1  Using Arduino / Networking, Protocols, and Devices / Defining addresses for multiple transmitters, using nRF24L01 and RF24 lib on: September 06, 2014, 11:36:24 pm

I'm just starting an arduino project using the nRF24L01 and the RF24 library.  My attempt will be to have many transmitters and one base station.

My primary question is ... do I need specifically change the address and "hardcode" it  in each transmitter when uploading the code to each transmitter?  I thought/hoped that each transmitter would automagically assign itself the next address available, or something along those lines.

Or perhaps the base would sense a new transmitter and tell it what its new address is. Is this approach not feasible?

There will be unknown number of transmitters; some may be added at later time.  This may extend past 6 transmitters, so getting into the tree topography may be necessary.  Does the base station code need to be updated each time a new node is added?

2  Using Arduino / Microcontrollers / Re: What battery is best for Arduino Pro mini with nRf24L01 on: September 06, 2014, 10:22:47 pm
What are you using to step down your voltage to 3.3v?  I initially tried with a linear regulator (7805) which does not work. You need to use a LDO, something like TPS7133.
3  Using Arduino / Displays / Re: Interfacing to a VFD29-2002I with Logic Controls board on: March 15, 2014, 12:27:59 pm
Hi raschemmel ... thanks for that reply.

I don't actually need (want) to stay with the DB9 connector since its just the arduino and the VFD display involved or my project, so I would prefer to just cut it off and then have the loose wires at one end and the Ethernet connector at the other that plugs into the circuit board.

Your link to the convert is good, thanks. I guess I could still use this; the cable I have is a DB9 female and that converter is also female. I'll look to see if a male version exists or else I could wire plug to plug.  On the other hand, now that this has pointed me to the MAX3232 chip, I could just get that and there seems to be plenty examples on using the chip alone in RS232 arduino circuit.

On the otherhand, a local used gadget shop has the same used VFD with Hitachi driver already on it, for $25, so I may jump wimp out and buy that. I spent long enough time on this project already, and I already have a LCD screen working with it. I just wanted a VFD instead because its for in my car and feel it would view better than the LCD would.

Thanks for the confirmation on the converter and direction. I'll consider my options here and see which way I want to go.

4  Using Arduino / Displays / Interfacing to a VFD29-2002I with Logic Controls board on: March 13, 2014, 11:41:16 pm

I salvaged a 20x2 VFD (VFD29-2002I) from a cash register machine; this was used for the $amount display on a pole beside the cash registered. The VFD itself is mounted to a Logic Controls circuit board, model LD9-PD3-7), part of the LD9000 series I believe.

Here is a LD9000 user manual PDF for the Logic Controls pole unit, using the VFD:

There is a cable that has a DB9F  connector at one end (to plug to computer) and the other is an 8-wire either-net type (phone jack) type plug that connects to the circuit board.

Page 11 of the LD9000 user manual indicates the pin layout of the DB9 connector (8 wire version):

1. DCD (tied to pins 4&6 )
2 TXD to PC
3 RXD from PC
3. DTR (tied to pins 1&6 )
4. Ground
5. DSR (tied to pins 1&4 )
6. RTS (tied to pin 8 )
7. CTS (tied to pin 7 )
8. NC

Questions ...

- Can the arduino UNO talk RS232 directly to this device (with libraries) or do I need to use ardware for RS232 conversion to TTL ?

- what does it mean (tied to pins 4&6) ?  Does this mean a wire jumpers pin 1 to both 4 & 6?

If anyone has general comments on strategy to use this VFD with my arduino I'd appreciate your feedback.

5  Using Arduino / LEDs and Multiplexing / Using ShiftPWM and TLC5940 libraries in same app? on: November 06, 2013, 06:33:42 pm

I have my arduino project going in two parts. One part is using the public ShiftPWM library to runs multiple leds via output shift registers. The second part I have is running multiple servos via the TLC5940 PWM IC chip using the TLC5940 arduino library.

The problem I have is when I try to merge the two codes into one application. I believe one of them is interfering with the other in regards interrupts or timers???

If anyone is familiar with using these libraries, or ideally has gotten them both to operate together in the same application, I would very much like some tips to making them get along in same app.

Should one or the other be in SPI mode with the other is software?

Do they have interrupt and/or timer conflicts in their default configuration?

6  Using Arduino / Programming Questions / Registering I2C event in class file on: October 21, 2013, 04:12:40 pm

Using two Uno's and I2C to communicate with each other, I have this working fine and doing as I want. But now I want to move the worker (slave) code from the sketch into my own class library.

What I want to do is remove all reference of Wire from the sketch and put it intomy class file source code. So in my class INIT() I have the Wire.begin(), which works, however I cannot get right how to register my own class method "receiveEvent()" in the Wire.onReceive(receiveEvent). I keep getting compiler errors.

In my class header I declare ...
void receiveEvent (int howMany)

Then in the INIT() method of class source (ie. class called "MyClass").

Wire.onReceive(receiveEvent);    //this won't compile
Wire.onReceive(MyClass::receiveEvent);  //this won't compile

Sorry I don't have exact compiler error message with my, but its along the lines of "can't find method 'receiveEvent'", and/or no Wire.onReceive method found to match signature.

Anyone know how to declare your ISR events in your own class source file?

Thanks for any tips/comments.


7  Using Arduino / Project Guidance / Re: Feasibility guidance for a first project on: August 24, 2013, 10:02:09 pm
You said you want to put the arduino between the wall outlet and the motor. But since your original message said it was a small DC motor, I suspect your using a wallwart, thus your output power is really some low level DC voltage, and not 110 AC mains power.

Assuming low DC voltage, the components that you want to put together could be:

  • proximity sensor (google for a PIR motion sensor; sounds like you just need cheap short range sort)
  • an alternate approach to the motion detector would be infrared emitter and detector. If the cat enters a specific entrance way then you could setup the emitter/detector in break-beam manner to be the trigger; google for that circuit example
  • H-bridge to activate the motor, forwards or backwards; google a 754410. You run the wallwart DC power to the h-bridge, and use your arduino code to turn on/off or set forwards/backwards by talking to the h-bridge. The h-bridge runs the power to the motor, but your arduino controls the h-bridge.

It doesn't really need to be anymore complicated than that. Since you indicated your already programmer savvy, I'll leave programming the signal detect coding and h-bridge activation as well as timer control details to you. smiley

Hope that helps.
8  Using Arduino / Project Guidance / Re: What happens when I run out of space? on: August 24, 2013, 09:42:16 pm
Use parallel shift registers, something like 74HC595. You use 3 pins from the arduino and get in return 8 outputs. You can daisy chain multiple shift registers to each other ( get 8 outputs * numbers registers) without increasing your original 3 wires. And their cheap.
9  Using Arduino / Project Guidance / Re: Button programming issue on: August 24, 2013, 03:09:01 pm
Simple use a boolean variable, (call it ledState) in your program. Whenever you detect a button press, then if the boolean variable ledState is false then set it true, else set it false. At the same time, write HIGH or LOW to you led pin.

sample coding approach ...

if (button pressed)
  if (ledState)
  {  //led is already on, so turn it off
     ledState = false;
     digitalwrite(ledPin, LOW);
  {//led is already off, so turn it on
     ledState = true;
     digitalwrite(ledPin, HIGH);

You will most likely quickly notice odd or erratic behavior when pressing the button and how the light sometimes goes on or off. Time then to google "button debouce".

10  Using Arduino / Project Guidance / Re: How would I efficiently control the speed and direction of 6 12v dc motors? on: August 24, 2013, 02:57:49 pm
The SN754410 is a nice H-Bridge that can run two motors, bi-directional, with breaking or freespin, and supports PWM. And at a couple$ each, their low cost.

The description says ...
The SN754410 is a quadruple high-current half-H
driver designed to provide bidirectional drive
currents up to 1 A at voltages from 4.5 V to 36 V.

If you use a single parallel shift output register (74HC595) then you can use 3 wires (digital high/low) from your arduino to run 8 output signals from the 74HC595 register. The 8 signals from the 74HC595 can be 8 on/off signals to 4 H-bridges (2 motors per bridge).

You can even, if your able to code it on the arduino, code PWM looping code that sends pulse signals to the 74HC595 which in turn pulses the h-bridge motors on/off to control speed.

If you need/want to monitor input signals (motion, light, water, temp, etc, sensors) to activate your motors, then you can use a 74HC165 input shift register (3 wires to arduino) to monitor for 8 input signals. Both the HC595 and HC165 support daisy chaining so you can increase the number of inputs/output signals to your arduino without changing the number of wires to the arduino.

So, 3 wires from your arduino to control 8 or more output signals (8 * number of HC595 chips). If you add the 74HC165 for input signal monitoring, then 6 wires total to do both input and output signals.

If you do just simple input signal on/off monitoring, and simple on/off output signals to start/stop motors, then the arduino coding is pretty straightforward, lots of examples to be found. If you needed to code the PWM, then that's more advanced coding.

I happen to be working and using on all these strategies on my current project, so I know they are all workable approaches.

11  Using Arduino / Project Guidance / Re: Not another proximity question! Detecting objects around me. on: August 02, 2013, 04:33:44 pm
Interesting; along that lines I'm going to try a bank of ultrasonic "senders", programmatically controlling each one on/off in sequence. Thanks.
12  Using Arduino / Project Guidance / Not another proximity question! Detecting objects around me. on: August 01, 2013, 04:08:03 pm

I've been reading up on various detection and proximity sensors, but I'm not getting clear handle on how I might go about a project.

If we have for example a movable vehicle (battery powered car), and I want to mount multiple detection sensors around the vehicle, what strategy(s) might work well to be able to tell if an object, or multiple objects, were straight in front of the car, or front left or front right, etc.

Simple object detection "out front" is too vague.  Also, have to consider multiple objects in the field of view.

Is there a sensor that can give feedback about objects in field of view and the relative angle/position from the sensor?

Imagine detecting table legs, or char legs.

Could multiple sensors, say on the front of the car, be used to section the total field of view into smaller sections. Would they then create "ghosts" responses to each other?

Just trying to get a handle on what type of sensors and/or strategy that would work well for this scenario.

Programming control of the sensors using the arduino is the assumption.

Thanks for any feedback and comments.

13  Using Arduino / Programming Questions / Re: Building new library, header, and other library on: April 09, 2013, 02:46:50 pm
FYI ... I've resolved my issues.

As PaulS suggests, the executable code in the TLC5940 header was largely the issue.  I've moved the TLC library out of the core arduino structure and into "my documents" arduino/library folder tree. I then modified the tlc header to contain just the prototypes and moved the code/functions into the TLC class itself in the main .cpp source.

Now with my own library files in my documents/arduino/library, along with TLC in its own mydocuments/arduino library folder, the includes work cleanly without having to specify the full path, and it all compiles with no errors.

Thanks for the feedback.
14  Using Arduino / Programming Questions / Re: Building new library, header, and other library on: April 06, 2013, 06:50:18 pm
ok, so from your reply#2 I'm getting the jist of the issue; not being able to include a 3rd party lib into another lib. However from PaulS response, "it CAN be done", so I'm still looking.

Perhaps I will try and extract the  TLC routines I need out and put them into my lib, or else embed my routines into the tlc lib.
15  Using Arduino / Programming Questions / Re: Building new library, header, and other library on: April 06, 2013, 11:32:26 am
Drats! The "TTCS - Copy.cpp" is a copy of my source library left in the library folder. I created it when I was preparing the source for upload here. It's not the original reason for the errors, it only added a couple more  smiley-red

Anyways, removed the "copy", using the same source as listed above, and these are the errors.

TTCS\TTCS.cpp.o: In function `tlc_angleToVal':
C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:113: multiple definition of `tlc_angleToVal(unsigned char)'
TTCS.cpp.o:C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:113: first defined here
TTCS\TTCS.cpp.o: In function `tlc_valToAngle':
C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:122: multiple definition of `tlc_valToAngle(unsigned int)'
TTCS.cpp.o:C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:122: first defined here
TTCS\TTCS.cpp.o: In function `tlc_getServo(unsigned char)':
C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:106: multiple definition of `tlc_getServo(unsigned char)'
TTCS.cpp.o:C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:106: first defined here
TTCS\TTCS.cpp.o: In function `tlc_setServo(unsigned char, unsigned char)':
C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:99: multiple definition of `tlc_setServo(unsigned char, unsigned char)'
TTCS.cpp.o:C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:99: first defined here
TTCS\TTCS.cpp.o: In function `tlc_initServos(unsigned char)':
C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:76: multiple definition of `tlc_initServos(unsigned char)'
TTCS.cpp.o:C:\Program Files (x86)\arduino-1.0.3\libraries\Tlc5940/tlc_servos.h:76: first defined here

So from PaulS comment ..."Tlc5490 is NOT a core library, and has no business in the core library folder." ... is that a problem or just a complaint? And what does it mean, not being in the "core library" folder. I'm starting to suspect there's a user library folder I should be using?
Pages: [1] 2 3