Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Networking, Protocols, and Devices / Re: HiLink-HLK-RM04 modules review on: January 03, 2014, 04:38:20 pm
Quote

Hi,

The TestBoard you mentioned is something like this?
http://www.alibaba.com/showroom/hlk--rm04-test-board.html

As I know, there is no 3.3V -> 5V converter on this board.
The only converter on this board is a MAX232ACPE, which will convert +- 3.3v to +- 12V.
You can't connect Arduino's UART with the UART of DB9 connector (or the UART testing points) on the board, because
the voltage level of those pins have been converted to +-12V by MAX232ACPE.


Thanks for the info. I will try and connect it directly to the HLK-RM04 unit next... smiley-wink
2  Using Arduino / Networking, Protocols, and Devices / Re: HiLink-HLK-RM04 modules review on: January 03, 2014, 05:27:15 am
Hi,

I just connected RM04 with my mega2560 *directly* as blow:

RM04 pins                       mega2560 pins
UART_RX(pin 20)          TX1 (pin 18)
UART_TX(pin 21)            RX1 (pin 19)
RXD(pin 22)                      TX2(pin 16)
TXD(pin 26)                      RX2(pin 17)
VCC (pin 1, 28)                  5V out
GND                                     GND

junk out is usually due to the difference of baud rate setting, suggest to check it again.

BTW, I found if your Arduino board is using USB cable as the power source and your USB cable is not
good enough, RM04 will keep rebooting and can't work normally.


Thanks, I bought the TestBoard that comes with the HLK-RM04 module. It has its own power supply so I can rule that out.
I also agree that the Junk being received looks like the wrong baud rate. unfortunately I have check it multiple times and I have also checked it on a third device with no improvement.

Only think that I can see that might cause it is an extra Serial to RS232 converter that the test board has. (3.3v -> 5V serail converter)
Or... I might have a non working unit...  have order a second one just to make sure. smiley

Thanks for your help.
3  Using Arduino / Networking, Protocols, and Devices / Re: HiLink-HLK-RM04 modules review on: January 03, 2014, 12:17:05 am
Hi guys,

For plan 2, I wrote a library which has almost the same usage as Arduino's WiFi library.
Here is the source code and its usage:  https://github.com/chunlinhan/WiFiRM04

Currently, this library still lacks the UDP support, maybe someone else could add it for me  smiley-lol.



Hi. How do you hook your RM04 up to your Arduino? 
I have tried the following with no luck:
  • I have tried connecting the RX/TX cables from the HKL-RM04 to my Arduino's D0-1 but I only get junk as out put.
  • Have tried both Serial ports on the WifiUnit with no luck.
  • I have checked the baud rate and that is the same set on the RM04.
  • Tried it with a CP2104 USB to UART as well and it returns the same char's.


Am I missing something? Any help will be appreciated... smiley-wink
4  Using Arduino / Networking, Protocols, and Devices / Can Software Serial be used with 3 devices? on: December 31, 2013, 11:12:51 pm
Is it possible to use the Software Serial Library with 3 devices on an Arduino Uno?
(This excludes the Hardware Serial port on D0+D1)

The parts for the project will arrive in the next two weeks but I thought I'd just ask the question. The project involves having 3 RS485 connections.

I know the library has some limitations like receiving and transmitting at the same time. This is not an issue as the Arduino Running the 3 Software Serials will act as an Master sending 1 request at a time and then waiting for a reply.

Just did a search and another option is to use a SPI/I2C to UART converter if the above is not doable. http://www.digikey.com/product-detail/en/SC16IS752IPW,112/568-4016-5-ND/1158199

Any help would be appreciated... Thanks.


5  Using Arduino / Programming Questions / Re: Is it possible to make global "defines" that work with libraries? on: August 20, 2013, 04:48:52 am
You can create a pointer to a SS instance then use "new" or call the begin() or similar. I've done it before but can't remember the syntax offhand so I'll look for some code.


EDIT: Found some code

Code:
static SoftwareSerial * _mySs;

_mySs = new SoftwareSerial(rxpin, txpin);
_mySs->begin (baud);
_mySs->write (c);
if (_mySs->available() {
    c = _mySs->read();
}


_____
Rob

Works like a charm!!!! Now I can config my pins and not have duplicate code... Developers heaven!!!   smiley-lol smiley-lol smiley-lol
6  Using Arduino / Programming Questions / Re: Is it possible to make global "defines" that work with libraries? on: August 20, 2013, 04:03:18 am
You can create a pointer to a SS instance then use "new" or call the begin() or similar. I've done it before but can't remember the syntax offhand so I'll look for some code.


EDIT: Found some code

Code:
static SoftwareSerial * _mySs;

_mySs = new SoftwareSerial(rxpin, txpin);
_mySs->begin (baud);
_mySs->write (c);
if (_mySs->available() {
    c = _mySs->read();
}


_____
Rob


That seems more like what I am after. What is the reason for making it static?
7  Using Arduino / Programming Questions / Re: Is it possible to make global "defines" that work with libraries? on: August 20, 2013, 03:55:31 am
First, if you post your code is more simple to suggest a solution.
Second, you can create a method for your class like Init() or Begin() and ask as parameter the pin for SoftwareSerial.

For example Ethernet class have a constructor but in setup() you must use Ethernet.begin()

This is my library:
https://github.com/Protoneer/RS485-Arduino-Library/blob/master/RS485.h
https://github.com/Protoneer/RS485-Arduino-Library/blob/master/RS485.cpp

I think the issue is the Serial Object being global in the library....
CPP-L4  SoftwareSerial rs485 (RX_PIN, TX_PIN);
8  Using Arduino / Programming Questions / Is it possible to make global "defines" that work with libraries? on: August 20, 2013, 02:52:14 am
I am trying to make my application a little more configurable.

My project consists out of a library that use SoftwareSerial. I want to be able to change the pins used by SoftwareSerial from inside my sketch.
Problem is SoftwareSerial only sets its pin with its constructor.

Is there a way that I can do a "Define" in my sketch that applies it to my library that instantiates SoftwareSerial and applies my define at compile time?

Other option I have is to maybe define SoftwareSerial in my main sketch and pass SS to my library.... (Not sure how to thought)
Or Change the SS library to allow for Pin change.(Don't want to move away from using standard libraries.)

Any suggestions would be appreciated, thanks.   
9  Using Arduino / General Electronics / Re: Designing a 5V regulator using smt parts. on: August 12, 2013, 08:22:47 pm
Depending on the input voltage and current used you should pay careful attention to heatsinking the regulator, usually with via-stitched ground planes on both sides but you can also get special SMD heatsinks as well.

_____
Rob

Thanks for the advice... I will definitely add it to my design.
10  Using Arduino / General Electronics / Re: Designing a 5V regulator using smt parts. on: August 12, 2013, 07:30:25 pm
I also notice that the 0.1uf had a crazy amount of tolerance... -20%, +80% (My feeling is that I should look for another option,right?)
The temperature coefficient for that ceramic is Y5V, which is a class-3 dielectric.  It has a very significant voltage and temperature coefficient.  You should avoid Y5V and Z5U in almost all cases.  For most hobby projects they might be fine, since they work best at room temperature.

Good thing you mentioned that as the unit will be used in a growing room for mushroom. The power supply is for a remote MCU(ATMega88) that communicates via rs485.
Temp : -5/50C
Humidity : 50/100%
11  Using Arduino / General Electronics / Designing a 5V regulator using smt parts. on: August 12, 2013, 05:58:51 pm
Hi...

I am revising my designs and I looking at making them more compact. So I am venturing into the world of surface mounted components.

My question is about the capacitors to use with a 5V regulator.

Here are the items I am looking at using:

Can I use the 0805 caps or are there a reason that the little "Can"http://www.digikey.co.nz/product-detail/en/EEE-1HA0R1SR/PCE3913TR-ND/766080 like capacitors are used?

I also notice that the 0.1uf had a crazy amount of tolerance... -20%, +80% (My feeling is that I should look for another option,right?)

Any input will be appreciated. Thanks. smiley-wink
12  Using Arduino / Microcontrollers / Re: Bare-bone Leonardo Schematics on: August 04, 2013, 01:03:48 am
I have also looked at the Teensy Ver2 schematics and Freetronics Leostick...

http://pjrc.com/teensy/schematic.html
https://github.com/freetronics/LeoStick/blob/master/LeoStick.pdf

The bit that confuses me is that even if they use the same MCU they have their own hardware configurations and don't use the Leonardo setup.
Could that just be a Bootloader thing?
13  Using Arduino / Microcontrollers / Re: Bare-bone Leonardo Schematics on: August 04, 2013, 01:00:08 am
here is the schematic

http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf

I am planning doing this myself, you can remove the extra led's and the power stuff if you plan on only using USB power, maybe L1 which is a ferrite bead to help clean up the analog input voltage, but there is not really that much to it

Yes... there are a bunch that can be removed. Would you be interested in teaming up with me to get this solved?

I have also looked at : http://imall.iteadstudio.com/itaeduino-leonardo.html - Have a look under downloads for the schematics

Its always good to have a few versions of a design to compare... smiley-wink
14  Using Arduino / Programming Questions / Re: Serial Proxy that runs on a Arduino. Does it exist already? on: August 04, 2013, 12:40:25 am
I/O pins are no problem, a port expander chip or two will soon solve that. Memory is another issue however.

Rather than have two processors, which is rarely a good idea, why not use a bigger processor like an ATmega 644 or one of the Mega board processors like the 1280. Finally if that is not enough why not go for an Arduino Due?

All valid options. But... smiley-grin

Arduino Mega's and Due's are to expensive for most projects I would say... Using a non-standard MCU vs a widely available MCU like the UNO also has its draw backs.

That's why I thought the Serial Proxy might be a very convenient way of keeping things backward compatible but still plug and play.

Thanks for you input.. smiley-wink
15  Using Arduino / Microcontrollers / Bare-bone Leonardo Schematics on: August 04, 2013, 12:21:18 am
Hi there,

I have developed a general perpose shield that adds an extra ATMega328(info.protoneer.com/2) to your setup. Currently I program the secondary
MCU with the ArduinoISP sketch. This works fine but I would like to add a USB port to it so you can program and send serial commands independently to the secondary MCU shield.

The ATMega32U4 would work well for this and because the Leonardo is based on it,it would add full compatibility for my shield.

What would be the bare minimum components needed to make a board that is Leonardo compatible?

 

Pages: [1] 2 3 ... 5