| Electronics > Beginners |
| Unsure about which Arduino to start out with for my project! |
| (1/5) > >> |
| Monkey123:
So I have 0 experience with electronics and little programming knowledge, but I want to make a project and learn as I go. If I can make it work. I might pay someone to build it properly, and maybe even, in the future launch it as a product. The thing is, I’m thinking I should start out with an arduino, but I’m not sure if eg. The Arduino Uno will cut it, as this device will need a pile of sensors. Can soneone point me in a good direction to start out. Here is the list of stuff. GPS GSM (the least power hungry imaginable) Bluetooth low-energy (BLE) Humidity Sensor Temperature Sensor Accelerometer The device will ultimately need to be as small as possible, and run for a long time on a couple of Lithium-ferrite 18650’s, but for now I’m only worried about trying to make something that works. I don’t think there are many analog connections there. Maybe the temp and humidity, but running on battery, it might be more accurate to have them digital as well. Hence, I’m mostly worried about the amount of digital and serial ports I will need. Is it possible to do with an Arduino Uno, or is there something else, that’s well documented that I could use? And just to make the whole project a bit crazier, I will ultimately need the GSM sms communication to be asymmetrically encrypted using keys that are negotiated through bluetooth. Is stuff like this even possible on a cute little Atmel mcu? Thanks in advance! |
| picandmix:
Hi, The short answer is an Arduino Uno Clone bought for about £5 on Ebay, from uk or do you use Norway ? The reason, as a beginner you may electrically damage it during your tests and the genuine Arduino Uno is quiet expensive. The Uno may or may not have enough memory or ports to complete your whole project, but one of that complexity should be completed as separate modules that can be readily built and tested on the Uno as it has the easy to use plug in headers etc. As your whole project nears completion your will be better placed to judge what device is needed for the final build. While the Arduino IDE is a good starting point, for larger coding you may find the features of Atmel Studio 7 with the free Visual Micro plug in for Arduino a much more versatile tool. |
| rstofer:
You're right to be concerned about IO limitations but you didn't give us any info on how your sensors communicate. You can tie a bunch of sensors to an I2C port and this only requires two wires for a bunch of devices since they have their own internal addresses. Just make sure that the devices on the bus have unique addresses. SPI is another protocol and it takes 4 pins for the first device plus an additional pin for each subsequent device unless you get clever with CS'. You could use a 3 line to 8 line decoder to use just 3 pins to address 8 devices. RS232 or TTL serial is the least friendly because you can't share the bus between multiple devices unless you change the serial stream to something like RS485. I suspect your GPS and GSM will want to use a serial bus and you probably only have one. So, without knowing anything about your sensors, it is impossible to say how many pins you need. You could always start with a Arduino Mega 2560 and work down. http://www.circuitstoday.com/arduino-mega-pinout-schematics The Arduino Nano is also a good choice and there are lots of clones. It has a more usable form factor and plugs right in to prototype boards. It gives up nothing except board space over the Uno. There are certainly uCs that are more suitable to multiple IO channels than the Arduino. Any of the STM32F boards will have more pins and more peripherals. But, without knowing how the sensors communicate there isn't much to say. |
| TomS_:
--- Quote from: rstofer on May 28, 2018, 05:27:10 pm ---RS232 or TTL serial is the least friendly because you can't share the bus between multiple devices unless you change the serial stream to something like RS485. I suspect your GPS and GSM will want to use a serial bus and you probably only have one. --- End quote --- Something like a 4052 can take care of the "I only have one UART available" problem. It has a pair of 1:4 muxes in a single package, so you can use one to switch Arduino TX to one of 4 devices, and the other to select Arduino RX from the same 4 devices. The two muxes are bi-directional so either one can do TX or RX, and they are both driven by the same select pins, so they both switch at the same time. Ive used them a couple of times in various projects. Then it becomes mostly a "software problem", rather than hardware, in terms of communicating with multiple UART based devices - configure the 4052 to select to the appropriate device, (re)configure the UART module as/if required, send and receive bytes, job done. You may just need some pull ups on the TX lines out of the mux to prevent the inputs from floating at the other side. Perhaps a little more complexity, but its just a single chip and some resistors, so its not tooooo bad. |
| rstofer:
Yes, but... As I understand GPS, it sends a serial message whether you want it or not. What you would like to do is capture each character in an interrupt routine and assemble the message. You almost certainly don't want to poll for a message. This isn't going to work with any kind of MUX arrangement, you would have to select the device, wait for the start sequence (which will be, on average, half a message away) and then start assembling. In the meantime, the CPU is blocked. There are a lot of uCs that have multiple serial ports. Sometimes the development boards don't bring them all out to pins, sometimes they do. It is not uncommon to have 4 available serial ports. In the 'stamp' form factor, I like the mbed LPC1768. Depending on SPI and I2C requirements, the mbed can have as many as 3 serial ports. See pinout here: https://os.mbed.com/platforms/mbed-LPC1768/ The first SPI channel doesn't conflict with a serial port. Both I2C channels conflict with a serial port and the 2d SPI channel conflicts with the 3rd serial port. So, whether this works comes down to what comm methods are required. |
| Navigation |
| Message Index |
| Next page |