I have bought an HC-12 module, but as much as I have investigated I have not found a way that a Raspberry Pi with a bluetooth detector called bluelog can detect it.
What do I have to do so that HC-12 wired to a Arduino can be detected with the bluetooth scanner?
How to set HC-12 in 'discoverable' mode?
Thank you
HC12 is a 433MHz transceiver. Bluetooth operates at 2.4GHz
What you're trying to do is impossible and doesn't make any sense.
There are other modules like HC05 or HC06 that communicate via Bluetooth. Your HC12 does not. You'll need a second of those transceivers to establish a connection between the Arduino and Raspberry PI.
This will give you up to 1km of range at lower bandwidth while Bluetooth only works across several meters.
So pick whatever suits your requirements best. A HC12 alone won't do much.
Maybe you should spend a few minutes on researching how radio transmission works befor you buy any equipment.
Related
I'm getting interested in electronics. As a beginner thing, I wanted to try to manually turn on and off my plasma globe through Python code. The globe takes in a 5 volt DC power supply. I can power it through my laptop, which is a nitro 5. So it's sending a constant 5 volts.
I need to communicate with the USB (serial port?). The module Pyserial seems to be the right choice. However, no matter what I try it can't identify the USB serial port. Not even when I plug in a phone. I think it can only identify a COM port, whatever that is. What's the difference? In my device manager, there isn't even a COM port section.
I know it's possible to communicate through that USB port because it can send data to and from my phone, so is this simple thing even possible? Thanks!
Well, the problem is that your plasma ball has most likely not USB interface at all, meaning that from the 4 wires you maybe got inside the cable (rx; tx; GND; 5V) only the 5 volts are used inside the ball to give the HV circuit power.
Other than that, pyserial is a meant to be used for serial communication like devices with RS232 not USB interface.
If i wanted to control the ball from my computer with software i would program an AVR µc to interact via serial communication (probably with an MOS-FET as a switch), from that point on you could use for example your python module to turn it on and of.
I have a project in hand where I need to connect 5 or more arduinos as slaves to Raspberry Pi. Load Cells, Reed Switch, Solenoid lock will be connected to each of the arduino. The arduinos need to send the weight readings when a communication is started by the raspberry pi(master). Only a single arduino will be activated at a time. The arduinos will be placed at a maximum of 6ft distance from the raspberry pi. I need advice regarding how to make this connection. I read that I2C cannot be used for long distances so I am unsure if 6 ft is a long distance for I2C. Next, I am trying to see if a USB would work for my case but the issue is the Pi has only 4 USB slots. So can I use a external USB hub with an external power supply and connected each of the arduinos to the USB hub and provide individual power supply to the arduinos? Will this arrangement work or should I be looking at any other protocol apart from I2C and USB?? Any advice on this will be much appreciated. Thanks a lot for your time.
Arduino (Nano, Uno, Mega etc.) can communicate via SPI, I2C or UART.
Long story short, SPI is not suitable for your application. It is used for fast data transfer over short distances (usually milimeters or centimeters), so mainly for communication between chips mounted on the same PCB or PCBs close together (e.g. display shields).
Using I2C is perfectly fine (let's say up to 10 meters) and in your case it is a way to go. The maximum possible length depends on baud rate, for 10 meters a 9600 baud rate would be OK. The big advantage is that you need only 2 wires to connect all Arduinos, the disadvantage is that only one device can transfer data at the time – in your case, that does not matter.
UART is used for communication with many external modules (GSM, GPS, HMI, ...) and also in combination with USB-TTL chip for communication via USB (virtual COM port). In your case, you can use UART e.g. in combination with external UART-RS485 converter module, but there is no need since you can use I2C.
Can run simple programs on Arduino without any elese connected. However the minute I add any sensor (eg gas sensor) or module (eg ENC28J60). the usb serial port on device manger disapears.
Actually anything coonected to Vcc (5 v or 3.3V) and ground of the Arduino Nano Mega 328 causes this problem.
I tried changing borad to Mega 168 etc, but same issue.
A couple of things come to mind:
Ground loops. Using a meter (DVM et al) check for a difference in potential between the ground of the USB bus and the ground of the Arduino. Check both AC and DC settings. You shouldn't see much more than millivolts, but if you do - it needs to be fixed.
If you're using one of those el-cheapo 2-prong wall-wart style power supplies, be aware that a lot of them have some serious ripple on them as they're not generally well filtered. Connecting the (-) negative terminal on the output of those to your USB bus can give you all kinds of fun. And not the kind you'd want. Adding a 0.01uF capacitor between Vcc and ground at the power supply output feed will help with filtering noise.
If the device is powered exclusively by the USB port, know that the 2.0 specification only provides for about 500ma (2.5W). If you have other USB devices hanging off the same bus, your current draw may overload and result in the bus shutting down that port.
Don't mix 3.3VDC components with 5.0VDC components. In other words, if you have a 3.3V bus, attaching the bus or driving something requiring 5.0VDC won't work. You need a converter to go between 3.3V powered devices and those running on 5.0V
Many gas sensors require significant current - it sounds like you're running it off the USB port and I suspect that this is what is causing your crash.
I like to build a project to make my gardening work smarter! My goal is to measure soil temperature, soil water content, light intensity and also taking a picture, and then wirelessly upload these datasets to a webpage. I can also control the irrigation system (turn on/off the pump switch) via the webpage.
These sensors are anagogic! However, the Raspberry Pi Face (PiFace) Digital Interface is only able to take care of digital signals. The PiFace comes with the relaies, which is pretty handy for a startup project. I just like to get some premade boards and ensemble them easily without too work.
Can I layer up a Raspberry Pi board, an Arduino bridge shield, an Arduino board and a PiFace (or a relay board) without wiring?
I really need a recommended "shopping list" to start with. What should I choose?
I suggest you try following the steps outlined in Arduino and the Raspberry Pi.
I agree that you should involve an Arduino as your conduit to the outside world. Then do a simple serial connection between the two. If you get any Arduino except for the new Due, you have got to get from 5 V (Arduino) to 3.3 V (Raspberry Pi). I'd suggest Sparkfun's Logic Level converter.
Sparkfun also has a good light sensor, TEMT6000 Breakout Board.
While you're there, you can grab a couple of thermistors to measure temperature, Thermistor 10K.
Also, Make did an article on almost exactly what you intend on doing (from the Arduino side), Microcontroller-assisted gardening.
On the Raspberry Pi side, Pygame will give you a huge head-start on connecting to the Arduino and taking webcam shots. A Halloween Sound Trigger with Raspberry Pi and Arduino should get you started.
According to what you describe, you may achieve this with only an Arduino UNO, an Ethernet Shield, sensors (at least temperature and light) and a cheap CMOS camera.
If you want to take advantage of the two worlds (Raspberry with Arduino I/O capabilities), you may also consider the Raspberry Pi to Arduino shields connection bridge from Cooking-Hacks: they provide both library and tutorial to start with.
What I have in mind is having a number of sensors (temperature, accelerometer, sound level meter) that are controlled by a micro controller. What I want to do is take this information and transmit it wireless to a laptop that will take this information and put it on to a web server using Zigbee. I don't know where to start.
Since you don't have any hardware as of yet, you might want to give the Arduino a try. The hardware is affordable, can be connected to your system via USB while being programmable in-system.
The basic board can be extended via so called "shields", which offer additional features. In your case, the XBee shield would be appropriate. Connecting your laptop to a XBee module is as simple as using Sparkfun's breakout board and a mini-USB cable.
The Arduino has a large community, so you will find a lot of resources, like books, online material, example code etc.
We also provide wireless modules that can be used for serial data transmission. They can be found at www.starmanelectric.com Our modules are very similar to the xbee, but more plug and play. They can be a great for going wireless for the first time. Our devices are designed to function like a "wireless cable" so if you're used to using wires then you'll be up and running in no time at all. We also have circuit examples for transmitting to a laptop serial port or USB. Any micro-controller will be fine for this application, as long as it has a serial port and a few ADCs to sample your data. Our modules also provide simple analog in/out which can run in parallel to the serial. If you want to compare to other systems, I would google "wireless serial modules"
Regards,
Michael
Starman Electric