![]() ![]() ![]() ![]() While there are other ways of overcoming this, I subsequently found additional code libraries that allow changing the sizes of the buffers, and also speed up writing to the SD card. I found that the standard Arduino programming system limits the serial buffer sizes, so I got a lot of buffer overflows when I first tested it with the two input streams. It seems to draw about 60 - 70 mA from the 12v supply. I powered it with an integrated 5v switching power supply to minimise the power it draws. There are a couple of adaptations to make it work with the Mega, but these are all covered in the Adafruit documentation. The datalogger "shield" is from Adafruit, it has an SD card slot, a real-time clock, and a prototyping area I used to mount the Max232. I only need two initially, and used a Max232 chip to interface between RS232 and the TTL level of the Arduino UARTs - this enables both input and output of RS 232 NMEA data. The Mega 2560 has four UART's, so providing 3-4 NMEA inputs and outputs is no problem. ![]() If you need to power things like relays, solenoids, or motors, you will need to use transistors, and pass through the channels only the control signals.I have just finished testing a 2 port NMEA multiplexer and data logger I have built based on an Arduino Mega 2560. The maximum current that can go through a channel is 25 mA. There is also the EN pin that if driven HIGH, it disables the connection of the SIG pin with any of the 16 channels. For example, by writing 1010 to S3 S2 S1 S0, the C10 channel gets connected to the SIG pin. You write to these pins a binary code, and the corresponding channel is selected. The SIG pin connects to any of the 16 channels, C0 – C15. You could connect to these 16 lines… sensors, buttons, transistors to control relays, or even serial lines from other Arduinos. You can use this module to increase the number of inputs and outputs on your Arduino, since it only needs 6 or 5 pins to provide access to 16 data lines. You position the switch by writing to the control pins and then you let the data flow in either direction. You can think of it as an SP16T switch that is digitally controlled. This IC is a 16-channel analog multiplexer/demultiplexer. The name of the library refers to the IC that is on the Analog/Digital MUX Breakout from Sparkfun. This is a tutorial on the MUX74HC4067 library. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |