Running a Motor Driver Board L298N on 12v power supply with the BBC Micro:bit - motordriver

sorry if my query sounds odd. I am trying to determine whether my micro:bit will be affected badly if I did the following:
I have the GND wire of it's battery pack and the GND wire of the 9v battery running through the POWER GND pin of the driver. Currently, the 5V pin of the driver is being used, not the 12V power. I have coded a 2 wheeled( dc gear motor) buggy and want to 'upgrade' it to a 4 wheeled 'monster' buggy.
If I were to use the 12V pin ( and provide the 12V for the power supply, would the GND affect the micro:bit badly at all?
Thanks for your help, I'm new to this and this is my first question too. Any help about electronics is appreciated!

Related

CC2541 (HM10) HID and programming

AIM: use the processor and bluetooth purely on the cc2541 to read from the free pins on the board but outputting in HID format so it could be used as a keyboard.
I understand that there are a few offical TI hardware components that usually are used to program it (I cannot afford the development kit). Would someone please help me either using arduino and a FTDI board program the cc2541 to do this?
While I have no idea how to use the CC2541, if you're limited by a budget you could get a HC-05 for 4 dollars-ish, and if you so happen to have a (old) PC with a parallel port you can reflash it using RN-42 firmware (need to solder 6 wires and plug em into that port with some resistors), which will allow it do become HID devices like joysticks,keyboards and mice.
Just in case someone stumble on this post later on, the following could help a lot I guess ;)
flashing an HC-05 with another firmware using an FTDI adapter
Enjoy ;)
+

Pulldown a pullup by default and then pullup again on an ESP2866

I have an (Adafruit Feather Huzzah) ESP2866 WiFi module which has an (EN) pin to disable the 3v3 output on the chip. This pin is pulled up by default and normally you would just connect it to GND in order to switch off the 3v3 regulator (and disable the peripherals).
What I am trying to achieve is that when the ESP2866 is in "Deep Sleep" mode that the 3v3 output is disabled. Ideally if there was a pin that was pulled down by default when the device is asleep then I could just hook that into (EN) pin but I don't think this exists. However, there are pins that are pulled high by default when the device is fully awake.
What I was considering doing was using a high value resistor to create a weak pull down on this pin by using this to join GND to (EN). Then I would also directly join another pin that is pulled up when the module is on to "cancel out" the pull down. I have a feeling that I might need to end up using a transistor (or a few components) to toggle this low.
Reading the Adafruit forums I have since discovered that pulling the EN pin also switches off the ESP2866 internal circuitry so it will never come back out of deep sleep. On this basis there is no solution to this specific question as there will never be a high pin (without some form of external circuitry).
Thanks to those who bothered to read.

spark in arduino,relay and Bluetooth module

My problem is there was a spark when I plug in the voltage source of my 220 V bulb.I have my arduino uno r3,hc-05 Bluetooth Module,Relay Module and 220V bulb.
I cut the wire of my 220V Bulb.
One wire that is near to the bulb was connected to (COM)common connection of our relay.
The other cut was connected to ground.
The Relay Module's VCC was connected to Arduino's 5V.
The Relay's input pin was connected arduino's pin 13 as well as the Normally open(NO) pin of reay.The Relay's ground ws also connected to Arduino's ground.
My Bluetooth module tx was connected to aruino's rx ans Bluetooth module's rx was connected to tx.
I also connected Bluetooth Module,5v to the Arduino's 5v.
and A ground from Bluetooth module to Arduino's Ground.
I made my own version of schematic diagram and this is how it works.It is not that nice but I hoope you will understand.
The small squares serve's as the BreadBoard
https://twitter.com/n_galia/status/419876079403147264/photo/1
Here is a simple relay driver you can use with the Arduino. The component values are not super important, R4 could be larger, R3 can be larger, you can use just about any 5V relay and any NPN transistor. As show it should work with most low/medium sized relay. When active you can check the voltage between Q1's collector and ground. It should be less then a volt. About 4mA is provided by the Ardunio, far below it's output capacity.
PLEASE BE CAREFUL!! you are working with high current and high voltage power. Blowing up an Ardunio is minor compared to the damage you can do to yourself.
The revised schematic might not work either. If your relay is a basic relay a driver will be required. The Ardunio can only sink about 20mA and it's likely your relay will need more to function correctly. The relay coil might look like a short to the Arduino.
If you have a relay with a built in logic level driver or a solid state relay, or even a TRIAC part (not a relay) you might be OK.
In situations like this its advised to use an optical coupler between the Arduino and the relay.
The optical coupler has a transistor that will dive the relay in its output, the transistor is actually a light sensitive transistor (photo-transistor) which is turned on via an LED built into the package. The Arduino would drive this LED (though a limiting resistor) which would activate the transistor to drive the Relay. This way the low voltage electronics are totally protected and isolated from the high voltage stuff.
Ouch!
The Arduino is not compatible of dealing with your 220Vac lines from power and to the light.
Your Arduino may not function correctly anymore.
I have attached a revision to your wiring.

Combination of chipsets

I have a question recarding the capability of the combination of different chips.
We have a PIC16F1824 microchip controller, is it possible to connect this with the bluetooth module from http://www.microchip.com/pagehandler/en-us/technology/bluetooth and read data from a chip, which is connected with this microchip controller ?
Thanks in advanced!
With kind regards,
Tim
Yes, both the PIC and the bluetooth module have a UART interface. The only thing you need to be careful of is if they use the same supply voltage. If not, look through the data sheets to ensure that the I/O pins on both devices will tolerate the I/O voltage mismatch. The most common case is a 3.3V device with inputs that are not tolerant of 5V logic.

How would I control the output of the power in USB ports in Linux?

I built a robot from a thin client pc (can run Windows CE or Linux) and two servo motors. I put USB ends on the servo motors, so when they are plugged in to the thin client they continuously run. In Linux, how could I set the amount of current or voltage going from the USB ports to the servo motors? Would I be able to run a shell script to set the power of a certain USB port to slow down a motor or stop one? If this cannot be done through software, what is the easiest way to do this through hardware without having to buy too much?
The USB voltage is fixed at a nominal 5 volts and cannot be controlled.
The behavior of USB devices regarding their current draw is well defined in the USB specifications. USB devices are supposed to draw up to 1 unit load (100mA) unless they have negotiated a higher load from the USB host. It's quite likely that the servo motors that you have are going to need to draw higher currents than that, and wouldn't be able to request it without being a USB device and negotiating with the host.
It's also likely, depending on the servo motor that you are trying to control, that you'll need to either provide a PWM signal or an analogue voltage to control motor position. USB hosts are not intended to provide either of these.
Your best options to drive your motor from your PC are:
Get a dedicated USB controller for your servo motor (if one exists)
Make your own, based on a small microprocessor (eg. using an arduino)
Choose a different port on the PC. If available, PC parallel ports can be controlled to provide control for motor drivers.
The answers here seem to say it is a hardware issue, but I think this is a software issue. ASUS has Ai Charge which more then doubles the volts to charging Apple products from a standard 2.0 usb port.
USB 1.0, 2.0 and 3.0 Specs (All at 5 volts) 4 Wires (2 Data and 2
dedicated power)
Voltage Breakdown: USB 1.0 and USB 2.0 = 0.5A or 500 mA = 2.5 watt
USB 3.0 = 0.9A or 900mA = 4.5 watt Wall wart = 1.5A or 1500 mA = 7.5
watt Ai Charge = 1.2A or 1200mA = 6 watt
Ai Charge works on ASUS and non-ASUS motherboards and is a program you can install in Windows.
Personally I HATE Apple so I want to figure out a way to do this 1.2A usb 2.0 output trick for my netbook while running Linux.
I don't believe it is possible to directly manipulate the USB voltages. They are designed to provide a +5V output at all times unless power is diminised with other hubs.
You might be better served posting this question on http://electronics.stackexchange.com
you need to use PWM to control motors speed, to do that you need a micro controller, PIC18F series supports USB communication, there are plenty of code samples available internet how to use USB in PIC18F series, also you need a transistor array or H-Bridge to control mortors from PIC.
The simplest way to communicate is, program a USB serial in PIC18F micro controller, and when you plug that 18F to your computer, it will detect USB serial port, so you can send the commands to serial port to control speeds.
I dont think its possible, and even if it was, consider this: The USB port is not suposed to power motors because you can burn the USB port. USB is limited to 500mA (or there abouts) and any power device like a motor can potentially require more than that.
Another thing is that servos should be driven with constant voltage, and the speed is controlled by timing impulses on the control wire.
http://en.wikipedia.org/wiki/Pulse-width_modulation
You should use a driver (hardware) to power the motor with an external power source.
This is transistor's purpose, or try with a potentiometer

Resources