Anker Astro E4 to power Raspberry Pi - raspberry-pi

Looking for some help to be honest, This is not my area of knoladge atall.
Ive read around the question of powering my Pi with a battery, now I nabbed one of these guys for my phone
http://www.amazon.co.uk/13000mAh-Portable-External-Technology-Motorola-Black/dp/B00BQ5KHJW/ref=sr_1_cc_1?s=aps&ie=UTF8&qid=1420826597&sr=1-1-catcorr&keywords=anker+astro+e4
Incase the link dies in the future;
Item model number: AK-79AN13K2-BA
AnkerĀ® 2nd Gen Astro E4 13000mAh 2-Port (3A Output) Fast
Max 3A Out
5V Out
Now, from what i've read there have been mixed notes of, don't use batterys, only use this battery, don't do this, don't exeed this magical number ( which was differant each time ). so any help would be grately needed. If i was to power my pi via this thing. im I going to get a poof of smoke and need to replace the poor pi :(

A raspberry Pi is powered via USB, which means that it simply takes the 5V supplied via USB to run. As long as your current source is stable (ie. it doesn't change when you draw current from it), no device will care whether it is a battery or a switching power supply. Now, a bare raspberry Pi B uses less than 2W of power, 2W/5V = 0.4A = 400mA, so if that battery pack lives up to its specification, you are going to be fine. The device is spec'ed to provide 13000mAh, so at a constant current of 400mA, this would last you more than 32 hours.
Now, most people attach something to the raspberry, and that something will also draw power, but just add that power to the calculations above, to see if it's going to work out.

Related

raspberry pi gpio or rs232 relay board for simultaneous output bit-map?

I really wanted at first an rs232 8-channel relay board that I could command devices to turn on/off with a command string.
All of the ones I found online have the same deficiency in functionality for me: you can't set a subset of relays at the exact time. I can set relay 1 on, and then relay 7 on afterwards, I can set all 8 relays at once, but there is no command structure to pick out the exact leds I would like to turn on/off.
In the past I have dealt with hardware that had a bit-map of the IO pins, and a bit-map of the states and would apply all 8 settings at once. here are some examples:
to set pins 1 and 7 to on and the other pins off (8-bit binary bit-mapping,) send the following byte: in binary: 0100 0001b
to set pins 1,2,3,6 to on and the other pins off (8-bit binary bit-mapping,) send the following byte: in binary: 0010 0111b
I couldn't find any such device to do this so I thought I could make one with a raspberry pi using a simple 8-channel relay board, something like this:
https://www.amazon.com/SainSmart-101-70-102-8-Channel-Relay-Module/dp/B0057OC5WK
but on a Raspberry Pi, I'm running into the same issue: I don't see a way to set the gpio pins as a block command, only individually setting them in a for loop. I looked all morning and can see things like gpioctl, and mmio, but I can't put it all together to a simple proof of concept program on a testboard, any help would be appreciated.
I would really like a solution in C or scripting,
Thanks,
jleslie

Ethernet cable to DB15 connector

Morning Overflowers,
For a specific in-house application for my company, I need to be able to make a Gigabit ethernet connection go through DB15 connectors, as seen bellow.
Here is what I'm trying to achieve:
For the first version, I just cut in half a cat 5e ethernet cable. I did not care too much about the pin-out from the cable to the DB15 connector and in the end I ended up having a 10MBit/s data rate, which is super low. Also my cable was super short, 2m in total.
For the second version I used a 5m cat 6 cable for one side, and the remain of the other cat 5e cable (resoldered) for the other side. I was more careful about the pinout and used the 4 left most pins to place the ethernet pairs as seen here:
The data rate is this time 100 MBits/s, but still not 1 GBits/s.
Before going through a 3rd version I thought I'd use my brain a little. I noticed while soldering that although inside a cat 5e/cat 6 cable there are 4 pairs, not all of them are side by side on the RJ45 socket as seen on figure bellow where blue and green wires are a bit mixed.
There is probably a reason for that arrangement and putting pairs together other that inside the cable itself is not probably a good idea, which leads to my question.
For version 3, should I just keep pin 1 to 8 in that order and solder them to the DB15 connector on adjacent pins?
More generally I am aware that unless the DB15 section is super short I won't be able to maintain Gibabit ethernet due to noise and other problems caused by unmatched pairs on that section.
I am open to any suggestion or tips or anything :)
Thanks in advance
After trial and errors, it turned out that it works fine if you arrange pairs to match a RJ45 connector (like on the figure "ethernet plug wiring"). The quality of the cable is probably not the one of a perfect 5e/6 cable but my computer can negociate a Gbits connection and transfer files over the network at speeds way above 10 MB/s reaching 50 MB/s. I always soldered more section with various connectors and it worked fine too.

How can an Ebike speedsensor regulate the voltage for its throttle?

I want to rebuilt my High-Speed Ebike after it went down.
I tried a Chinese out-of-the-box controller ($40) but it only rotates the 36DC 400W motor at 3 speeds.
Since I want to enhance the bike (GPS, RasPi) I might better intergrate the whole thing, so now I'm thinking of a bare PCB to regulate the speed of the 3 phase motor. Regulation is done by an analogue pot with knob. Could be this one
I'm looking for a way to replace the knob with a electronic version, that takes its input from the speedsensor. This is magnetic switch (Hall?), normal open.
So I'm looking for something that builds up a voltage between 1.8 and 4.9v, depending on the frequency of pulses from the sensor.
I hope this makes sense and somebody is able to get me on track for a solution.
TIA!
It works the other way around. There's no voltage to be 'build up', rather there should be a max voltage (5V) availlable that's dimmed to lower levels by a 10K digital potentiometer. The lever is controlled by a SPI-signal that's generated by the Pi.
Microchip Technology has quite a bunch of them: https://www.microchip.com/paramChartSearch/chart.aspx?branchID=11026
Still have to work this out on a board, though.

Raspberry B+ Power Supply calculation

I'm new to Raspberry Pi and I don't understand about electricity. I bought a Raspberry B+ today and a 5V 3A power supply, but I'm afraid to connect it because in several places I read about using 5V 2A power supplies. I believe that only higher voltages can damage the Pi but, since I don't know about Amp, I don't know if this is true for 3A too.
My ideia is create a mini-personal server in my home, running Pidora. For data, I have a 1 Tb external USB drive with no external power supply (Seagate model SRD00F1).
My questions are:
can I use the 5V 3A power supply on Raspberry Pi B+ without damage it?
this power supply is compatible with my external USB drive to keep it on safely?
Thank you!
The Raspberry Pi FAQ says that the B+ uses between 0.7 and 1.0 amps, and suggest a 1.2 amp power supply as a minimum.
Using a power supply with a higher amperage rating will not harm your Raspberry Pi. Devices only draw as much current (amperage) as they need. Any additional capacity is unused.
This is where your question about the external hard drive comes in. If you see in the FAQ, they suggest that you might want a larger power supply if you use all of the USB ports. Every USB device you plug in is going to draw more current. To figure out how much you need, you just add up the requirements of all of the devices like so:
Raspberry Pi = 0.7-1.0A
Mouse/Keyboard = 0.5A
Hard Drive = 1.0A
========================
TOTAL = 2.5A
(These numbers are all fake... be sure to check the requirements for your actual devices.)
So if your devices total 2.5A then a 3A supply will handle all of these plus some room for expansion. If all of your devices total 3.5A, maybe you need to consider a bigger one.

Direct control of Floppy drive

I'm trying to extract data from 3.5" floppy disks formatted on a +D interface for a ZX spectrum. It's close but not exactly the same as for a PC. I've written software to do this in the past useing the BIOS to access a floppy.
However some disks are old and have bad sectors. I am trying to create a floppy drive controller to read a disk at a bit level to recover as much data as possible. I'm fully aware of how difficult this might be. I have however written a disk utility program that interfaced with the interface at a machine code level on the original spectrum computer, written in Z80 assembly software to emulate MSDOS to access and write files to FAT12 floppy disks. The original computer that accessed these disks did so using a 3.4MHz processor, so the Rasperry Pi that I'm thinking of using should be more than fast enough. I might even be able to run it from Linux but if not I have figured out to access the GPIO port, screen, keyboard and SD card using assembly language that would not need any kernal to run it. I've read up on how floppy drive reads and write data and have seen some basic example of how to opperate the floppy disk (not just the stepping motor).
I've done some research but have a few questions I can't seem to find answers to, and wonder if people here might know.
1) The read data pin (30). Does this return a logic high/low value of what's under the read head (rounding up or down to logic high or low), or is it analog? I ask because if it's analog, getting any input back would enable me to better try and recover corrupt sectors,but would make interface circuit harder to make, and depending on ADC used make interface with GPIO harder, and slower.
2) I know the molex power of +5V and +12V. But what current would a floppy expect?
3) I assume that the control pins from the ribbon cable on the floppy work at 0 or +5V, but that people seem to be able to run them at +3.3V. Does anyone know what they should be running at, and what their current tolerance are: what voltage and current the inputs expect, and what current/voltage the outputs deliver?
Many thanks for any information/knowledge that you might have on this.
A little late, but if someone else is interested:
1) The data output of the floppy is open-collector. So you can pull it up to your 3.3 Volts and will be fine.
2) 600 mA # 12V, 500 mA # 5V should be safe
3) Think of TTL input, that expects 2.4 Volts for HIGH. (2.5V according to the NEC 3.5" floppy drive).