Labels

Showing posts with label Test Setup. Show all posts
Showing posts with label Test Setup. Show all posts

Thursday, September 5, 2019

HomeLink HA Interface #5 - Ooops!

I decided to get back into putting the interface together and finishing out the prototype.  I also decided to pull it apart from the breadboard and put the hardware onto an Adafruit perma-proto board that would interface directly to the RPi0W.  Little did I know that I would make a strategic mistake.

First of all, I pulled up Fritzing and put the wiring up on the board (visually) as shown:


As shown, I added three red LEDs to be able to pulse as a visual reference when the HomeLink channel is selected.  I also place a 7805 power tab in the lower right hand corner of the board.  If the board looks weird it's because it is the size normally used for a regular sized RPi.  And yes, it does overhang.  The 5 lines are actually a cable that goes from the breadboard to the LiftMaster.  These can be seen in the following images:








The Ooops in the title stems from the fact that when I applied power (9v to the breadboard connector) I encountered the following:


  1. while the RPi0W was booting, I tried out the clicker with the LiftMaster and it was working fine
  2. the bootup of the RPi0W seemed to be going fine, then it rebooted, and then rebooted, etc.
  3. I reached over to turn off the monitor I was using and burned my finger on the 7805 poking up from the breakboard
  4. I went and got my temperature laser reader and when I rebooted the RPi0W I was reading in short order about 150 degrees Fahrenheit.  Way too much current was being drawn.

What I have since surmised is that the peripherals that I had plugged into the RPi0W were drawing way more than the 1 amp max the 7805 could handle.  So what I plan on doing is removing the 7805 and replacing it with a 5v 2.5a supply that plugs into the RPi0W connected with a step up converter to push 9v to the LiftMaster which only draws 40ma.

Wednesday, February 21, 2018

New Network Layout #1 - Layout of my experimental network vlan

I have been very fortunate to be able to put together pretty much any network layout that I want.  I have made some changes over the years culminating in what I have currently.  Through many trials, I have been able to get to the point that I am comfortable with the layout and how it works.  The experimental network is below:



As you can see in this diagram, I have a Gateway vlan which I connect most of my toys to.  The Gateway vlan in turn is connected, through various routers to the Internet hosted by my ISP.  For purposes of this discussion, how I connect is immaterial.  I have a pfSense router which isolates the Experimental vlan (Exp) from the Gateway vlan.  I also have a Personal vlan (Pers) which is used to monitor the Exp and is isolated from the Exp by another pfSense router.  I can update/command experiments in the Exp from anywhere in the house that is connected to the Pers.  The Exp is also connected to the outside world during Christmas (and other specific times) through a Ubiquiti WAP.  When Christmas rolls around the wifi connection is turned on to command some wifi-enabled switches and some wifi-enabled LED displays via experiments in the Exp vlan.  Since I am using a lot of managed switches, I am able to connect an Ubuntu server to the Exp, along with an RPi Cluster, and additional RPi experiments.  I also have a permanent RPi development terminal that I can use to ssh into various experiments as necessary.  The Ubuntu server supplies a number of VMs that are useful for development work including a subversion repository and some bug/issue tracking software like RedMine.

Friday, August 21, 2015

Have a new toy - RPI-Console

I have a new toy in my arsenal, this is the RPI-Console from land-boards that I received when making a contribution to Kickstarter.  I was looking for a device to use at work (or home) to update software on a Raspberry Pi without having to have a connection to a monitor or keyboard/mouse.  Then the RPI-Console showed up on Kickstarter and met most of my needs.  I can now use my laptop keyboard/screen to interface with the console on the RPi, including powering the RPi from the USB port on my laptop.  This the smaller version and I have a 40 pin version which I also received as part of the Kickstarter promotion.


As you can see from the next picture, I have been using this at the office to work on an RPi2 during lunch.  I just take the cover off of the RPi2 case and plug the RPI-Console into it, plug the USB cable and fire up a copy of Putty on my laptop; instant console!  I have been able to run raspi-config from the console to get the microSD card setup, and further setup things so that I can update the RPi2 software through a wireless bridge (not shown in the picture).


I have been impressed with the quality of the board and with the "open kimono" approach that Land-Boards have with their products.  They even have a wiki page which details the testing that they put each board through; a quality job throughout!  I like the fact that the design has a couple of LEDs to indicate serial traffic, receive and transmit, and the fact that you can choose to power from the USB cable or not by a jumper.  The extended pins are a nice touch and allow you to get at the GPIO as needed.

For me this is an ideal interface and reduces the amount of things that I bring into work to be able to do a lunchtime activity. Should the power requirements be more than the USB cable can handle, you can always set the jumper to bring power via the microUSB interface.

Update: I was also successfully able to put a PiTFT onto the RPi2, run a ribbon cable from the additional connector, and plug the RPI-Console into it.  It was also able to power the whole thing including two Netgear wifi adapters.  I think that I am going to be very happy with this purchase.

Monday, September 1, 2014

Multiple Embedded Computer Connections

So now that I have the ability to connect multiple RPis to my network in a separate VLAN, I am trying to figure out how to provide screen images and keyboard/mouse connections to them and also to connect other devices in my network.  There are a number of issues that I am trying to resolve at this point.

  1. I have an almost full managed switch all to myself after moving the Mac Mini to a different managed switch.  I need to make use of this "tail end" switch to the max.
  2. I have 5 different Raspberry Pis that I will need to connect to at any one time plus a number of other devices, including media equipment.  This provides a power and networking issue that needs to be resolved.

Thursday, June 26, 2014

Portable Pi Project - Part #3

Well, I attempted to put the cables together to make the portable RPi.  However, there were several issues that I had to deal with:

(1) when I applied power, it became obvious that there was not enough current going through the wires.  I did check out all of the lines and the voltage was correct.

(2) I found one of the sides of my DPDT switch was momentary.  I needed a switch that was ON-OFF-ON but I picked up one that was ON-OFF-(ON), the (ON) indicating that it was momentary - well, live and learn.

(3) I had the Adafruit 1601 2.8" touch screen on the RPi which added a 100ma load to the power supply, further dragging down the power

(4) the ethernet connection would not light off because of the low power.

So now I am back to trying out the application of power with regular power supplies to make sure that there is not something wrong with the particular RPi that I was using.

After using another, albeit more powerful power supply, I was able to get the RPi to come up and stay up, including the AdaFruit touch screen display. It would appear that I may have misjudged the amount of power needed with the switched setup that I was using earlier.

Monday, May 12, 2014

Portable Pi Project - Part #2

Well work activities, dealing with CEH training and the cert test in two weeks, and other things has prevented me from really stepping up to the plate on the RPi Portable idea.  But to get back to the overall plan on this, I have looked at the power through the system.  The portable looks like the following (not updated from last time):






I have looked at the power lead outs and it looks like a DPDT toggle switch and one 14 position terminal block (I have a 12 position which will have to do) will be able to suit my needs to power everything from either the wall wart or via the battery which is encased with the RPi Portable.  The DPDT will be able to choose the 1.0 amp or 2.1 amp lines from either the wall wart or the battery, and if it has a center off, will be able to act as an on-off switch as well.  What I will need to do is cut up some perfectly good USB cables to make this work.  The cables will end up having a USB plug on one end, and pigtail leads at the other.  I just have to make sure that the data leads are not used in the setup.  So the power circuit should look like the following diagram:





Notice that I have pulled the power out to the board sides for the wall wart. I have also included a power out to the side for charging the battery.  In addition, I have added a board (breadboard) connection so that I can do experiments with this setup as well.  All of the internal connections, except for the DPDT switch can be done with cut USB cables.  It also only requires a 12 position terminal strip.  The high side (2.1 amp connection) goes to the hub and breadboard.  The low side (1.0 amp connection) goes to the RPi and LCD screen.  All grounds are tied together.  Black lines are ground and red lines are 5 volt power lines.

Saturday, September 21, 2013

Portable Pi Project - Part #1

Well I now have some challenges ahead of me. I have decided that I need to make a portable RPi layout for testing. The idea is to bring it in to work to have around during lunchtime, when I get a chance to eat a bowl of soup. I figure if I put an RPi, hub, battery, various USB devices, external wifi adapters, the RPi camera, etc. on a sheet of Lexan I can make good use of it. This will allow me to code and test out some projects while being able to put the RPi into my bag in the morning.
I think that putting the equipment between two sheets of Lexan, with enough standoffs, I should be far enough along. The real problem is the orientation of the peripheral ports. I need to get to the USB, Ethernet, HDMI, SD card slot and maybe the GPIO from the side of the setup. The SD card slot is needed to change out different experiment setups. The others are self explanatory.
If I get it tied down enough with a sufficiently narrow width, it should work.
Update:  I purchased two 8x10 sheets of Lexan from my local Home Depot, along with 6 - 1" plastic standoffs, 4 rubber feet, and mounting hardware.  I wasn't able to find M3 screws or nuts but I did have some that I purchased at a different time.  It turns out that 6-32 will not fit into the mounting holes of the RPi, but M3 will.  I was able to take 1/2" standoffs and cut them in half with a PVC pipe cutter (does a really good job BTW). I mounted the RPi in one corner with the power and SD card slot about 1/4" from the edge; this has the SD card sticking out when it is mounted, but makes it easy to change out.  I wanted to be able to get to the SD card slot for changing the peripheral.  Now my issue is mounting of the other elements.  I figure that I should take apart the USB hub and that should make it easier to mount in the shell.  The current state of the configuration is shown in the following picture.






I am planning on mounting the USB Hub in the center of the left side in the photo (the case for the USB Hub has been removed). The battery will be mounted on the bottom.  I will also mount a USB-WiFi adapter with antenna at the top.  In addition, I will probably mount either an Arduino and/or a USB-Audio adapter on the left.  That should cover me for most applications.  I would assume that I would attach the Logitech keyboard USB dongle on the right side of the USB Hub.

Mounting for the battery and other components has been somewhat of an issue. I would like to be able to remove the battery at times since I also use it with a robot and it also acts as an emergency iPhone battery recharger. I would like to get a clamp type mechanism but I am not sure where I would find such an animal or what it even looks like. Looks like a trip to Home Depot / Loews is in order here.

Tuesday, May 21, 2013

Added several VMs to the RPi subnet

Last night and this morning, I added a number of VMs to the Mac Mini in order to support development of the RPis and to aid in penetration testing of the subnet.  I pulled the VMs from the bitnami repository (http://www.bitnami.org) and also added some VMs that I already had working.  I am using VMWare Fusion on the Mac Mini to provide the host environment.  The VMs were:
  • RPiDev - an ubuntu VM containing bouml, cross compilers, and Arduino development packages (need to add a VNC server so that I can access the VM from one of the RPis)
  • Joomla - a CMS; here primarily for penetration testing
  • LAMP - a generic LAMP package; planning on adding ajaxplorer, a DropBox like file management system; here for file storage plus penetration testing on a generic Linux box
  • Trac - an issues tracking package
  • Subversion - a configuration management package for storage of source code
I now have the equivalent of 5 different computers running on the subnet in addition to the Raspberry Pis that I have in operation at any one moment.  In addition, I opened up a port on the outside of Router-3 so that I could connect directly to the ssh port on one of the RPis, this will aid in being able to run a VNC or ssh connection remotely.

I will probably have to change the subnet addressing.  The reason is that my home network connects to FIOS via an ActionTec router that has the same subnet addressing.  I don't want the two subnets to ever be confused with each other.

Monday, May 20, 2013

Carved out a subnet in my home network for PwnPi tests

It was raining this weekend so I decided to finish up putting together a subnet in my home network for testing the Raspberry Pi.  This will also serve as an enclave for using PwnPi to do some penetration testing.  I have decided to get back into the swing of things security wise since I am taking another certification class.  I have been wanting to learn how to do penetration testing in preparation for going after a CEH (Certified Ethical Hacker) certification.  This is outside of the ISC2 certification domain; where I already have a CISSP (Certified Information Systems Security Professional).  I have a multifold purpose for wanting to do this:
  1. I want to have a separate (logically and physically) network for penetration testing using PwnPi.
  2. Doing penetration testing will not only help me to learn but will also let me know where the weaknesses are in my network.
  3. I want to have a separate network setup to support development work on the RPi.
  4. I want to have a network setup to test out the new OpenWRT package that runs on the RPi; therefore, I need to be able to place the RPi in a router like position easily.
In my house I have three routers and three managed switches which I can use to define separate networking elements.  On one end of the house I have a Mac Mini which I use as a server for experimentation along with several other physical servers which are normally turned off until I want to do some experiments.  Why?  Because I want to learn something about networks and this way I can immerse myself in some learning topic without having to pay money for classes.  At the other end of the house is the RPi experimenters area.  I have a managed switch close to the Mac Mini and another managed switch close to the RPi experimenters area.  The three managed switches are 1GB ethernet switches, so the ethernet cable between them carries a 1GB stream.  I use this as the backbone for my home network.  I realize that it is overkill, but it allows me to do some interesting things.  For my purposes, I wanted to move one of the routers to the RPi experimenters area and set up the switches so that I could use the Mac Mini to host some virtual machines to be connected to the RPi experimenter area.  Diagrammatically it looks like this (most of the information was removed to help in the discussion):




A secondary ethernet port was added to the Mac Mini by plugging in a USB to ethernet cable.  By setting up the router between two ports on the RPi experimenter managed switch, I am able to use the router to move between two separate Vlans.  Vlans (IEEE 802.1Q) are virtual lans and can have the property that more than one vlan traffic can be moving down the same wire but yet not have packets that interfere with each other.  In my case the 1GB wire between the two managed switches have tagged vlan packets that are logically isolated from each other.  This wire carries information from the VMs running on the Mac Mini through the separate Vlan to the router (LAN side).  This in turn is mixed in with the information on the RPis.  The router provides isolation between the Vlans and in a pinch can be disconnected from the main home network; for extra security.  The RPi managed switch and router are in close proximity and I can unplug the unmanaged switch (connecting the RPis together and plug it into the managed switch on a port which is in the home network as necessary.  This is not the only separated Vlan running through my house but I need the isolation in order to continue PwnPi experiments.  Should be fun.

Friday, March 29, 2013

Distance sensor data gathering

So I was able to start gathering sensor data last night.  I wanted to start gathering information on the two distance sensors in order to be able to calibrate the system.  I have enough errors propagating around, I just wanted to understand a little more about the IR and Ultrasonic Distance Sensors themselves and how they behave and how well they measure distance.
In the picture below, you can see the IR distance sensor (GP2D12).  I was able to modify the Arduino code to give me values output on the LCD display.  My measurements were from the front of the sensor housing, that means that I will need to add the offset from the front of the sensor housing to the center of the servo rotation point to get an accurate reading on the measurements.



For the ultrasonic distance sensor (HC-SR04) the measurements will be the same.  I will measure from the front of the sensor housing to the target and will add the distance from the front of the sensor housing to the center of the servo rotation point.



Wires: now that I have everything hooked up on the Lexan plate, the wire jumble on the top of the Arduino breadboard is pretty much a mess.  I am thinking of getting a proto board and putting headers on it in order to not have the jumble on top.  You can see what I mean by the picture below.



When I took the values from the IR distance sensor, I was surprised to notice how much the value changed with each sample.  The measurements are as follows:

Distance Measure1 Measure2 Measure3
2 7.24 7.22 7.26
2.25 6.76 6.72 6.72
2.5 6.84 6.91 6.82
2.75 7.54 7.64 7.68
3 8.23 8.66 8.57
3.25 9.23 9.18 9.15
3.5 9.97 9.97 9.36
3.75 10.95 10.92 10.85
4 11.39 11.32 11.46
4.25 12.28 12.24 12.24
4.5 12.84 13.05 12.84
4.75 13.72 13.72 13.72
5 14.39 14.29 14.24
5.5 15.67 15.73 15.67
5.75 16.63 16.26 16.5
6 17.08 17.14 17.08
6.25 17.96 17.89 17.89
6.5 18.47 18.4 18.18
6.75 19.01 18.7 19.01
7 19.9 20.15 19.98
7.25 20.33 20.24 20.33
7.5 21.52 21.42 21.42
7.75 21.81 21.71 21.9
8 23.26 23.04 23.04
9 25.9 25.51 26.03
10 28.63 28.79 29.11
11 32.89 32.29 33.5
12 36.64 36.4 35.92
13 35.92 31.92 36.4
14 40.65 40.65 40.65


Even though I took three measurements at each distance, the values pretty much vary pretty wildly.  A simplified graph of these measurements are as follows:

Actually, I should probably try and swap the x and y axis.  The x axis is the distance and the y axis is the measured values.  True to the data sheet, values that approach around 2 inches from the front of the sensor will change up and values over about 12 inches seem to start varying wildly.  In between, from 2 to 12 inches, the values seem to be steady and are almost linear given the formula in the sampling routine.  The values that return from the Ultrasonic sensor seem to vary even more crazily (see video below).

What I am learning from this is that I might have to rethink how the robot will follow the wall with the sensor data that I am seeing.



Wednesday, March 27, 2013

The connection diagram has changed

Now that I have come to the conclusion that I can move a lot of the hardware control down to the Arduino, I have redone the Test Setup connection diagram.



This diagram now shows the two ways that I have of controlling the iCreate, either through the Arduino or via a USB serial line.  In addition, I have added the IR and Ultrasonic Distance Sensors and their servos.  I changed out the SSC-32 for the Maestro, since that seems to be a better bet.  I have also added a temporary place holder for a Joystick/Button shield connected to an Arduino.  The purpose for this connection is to be able to use a Joystick controller to control movement and camera remotely, not something I want to have in the final model.

Thursday, February 21, 2013

Setup an RPi as a Wireless Access Point

This morning I used the information I found at TheBITBangTheory to setup one of my RPis to be a wireless access point.  This particular RPi is the one that I have the PiFace plugged into, and would be the one that I would mount on the iCreate.  My theory is this - create an internal network, isolated from the outside that connects the RPis with each other.  Since I am intending on isolating the home network, I should probably put some rules in order to keep outsiders from entering my network while I am attempting to run some experiments.  I am already planning on moving one of my managed switches to the downstairs bedroom for the purpose of isolating the RPi test setup from the rest of my home network.  I just don't want to give anyone on the outside a free ride on my internet connection (Verizon frowns on this).  So I will need to use WPA2 between individual RPis that are part of the test setup and in addition, I will need to put the test setup on a different VLAN from the rest of the house; sort of an experimental network.
I have been appreciative of the article that I found because the author goes into some detail about first determining that your usb wireless adapter is able to do the AP thing.  After determining that the adapter will work, then he goes into explaining about setting up hostapd and udhcpd in an AP mode with encrypted access.  In my particular case, I think that I will use a subnet that is nowhere close to what I use in the house.  That way I can minimize the stray electrons that move about.
Update: I followed the instructions almost to the end but did not execute the last commands that would get the services running.  The reason that I did not do this was that I wanted to wait until after I was home (I'm doing this at work during lunch) to complete the task.  I forsee that I will have a problem since I added the NAT capability and the subnet is not recognized within the house network.

Unfortunately, I was unable,to get the hostapd service to start after the configuration. I took the same wireless USB adapter and was able to use the WiFi Configuration utility on the RPi to connect to my home network. I did notice that I was able to use the Ethernet or the WiFi but not both at the same time. Is there some setting that I have not discovered yet to get this working correctly?

Monday, February 11, 2013

Put up most of the Test Setup this weekend

This weekend I had a little time to try getting my things in order.  I used most of the time to put together a Test Setup in one of the downstairs bedrooms.


I basically took a keyboard stand and placed a 2' by 4' piece of 3/4" plywood on it.  Then I started strapping down other items.  I put my Robotic Arm on a roll around stand to the left of the setup.  I spent most of the time updating and then upgrading each of the three RPis.  I also added a tightvnc server to each of them and made sure the keyboard was US and the bootup goes right directly into the GUI.  I should probably change this to coming up to the command line and then as I need it, bring up the GUI with "startx".  I can do this by executing "sudo raspi-config" from the command line and selecting the GUI to not boot up.  I made sure that each of the RPis have an SSH server running.  I did discover two things over the weekend:

(1) strangely enough, the HDMI-to-VGA cable (the cheapest one that I could get) worked just fine with my VGA monitor.
(2) I discovered that a cable only 4-port USB hub (unpowered) was able to be used to pass power to two RPis at the same time, thereby freeing up one port on the power supply.

I also checked the serial cable, it is based upon an sl2303 chipset.  It seemed to recognize the cable, although I have not checked out the workings of the servos via the SSC-32 yet.

Saturday, February 9, 2013

Started setting up the test setup

Well, today I started setting up my test setup. I started with a few hiccups, namely not being able to get my video working right. After much trying with some USB to VGA interfaces, I went back to a really cheap hdmi to VGA cable that I had bought last week. It worked like a champ. Anyway, here is the setup.





It turned out rather well.

-- LW

Thursday, February 7, 2013

So Which Came First?

My hope in setting up a Test circuit for the RPi is to allow for multiple experiments and software developments without having to do much in the way of circuit design and development.  I do have some prototyping equipment and I do know some things about circuit design but I would rather plug and play to accomplish the task. Besides, I would like to know how far I can get without having to resort to circuit design (I might resort in the future, but not now).  So my list of things to do has changed somewhat:

1. Setup the basic test setup in the downstairs bedroom / computer room with the regular power supplies.
2. Add an additional Ethernet line from the home network to allow for this (I am thinking of putting it on a separate vlan, just to keep it simple and safe).
3. Setup the Ubuntu laptop for experiments with the RPi including compiling a new kernel and possibly running an emulation of the RPi.
4. Experiment 1: setup a thin client VNC/RDP on RPi to be able to access other servers in the home network.
5. Experiment 2: build camera servo pan/tilt unit, mount camera, connect camera servos to SSC-32, run check on pan/tilt with camera streaming on RPi.
6. Experiment 3: setup web service on RPi to allow control from "Control" app on iPad - check against pan/tilt unit, setup camera stream to iPad (might be really hard, or not possible).
7. Experiment 4: connect robotic arm servos to SSC-32, run check on robotic arm servos on RPi
8. Experiment 5: connect bluetooth, check bluetooth control on iCreate on RPi.
9. Experiment 6: setup Raspbmc on RPi (diff SD card), check video streaming to monitor, setup read of HDHR Prime TV signal on Raspbmc.
10. Experiment 7: setup Shorewall router on RPi (diff SD card, secondary USB-Ethernet cable), setup router between different vlans on home network.

Thats all for now.

Configuration for testing camera on iCreate

I thought a little more about what I was going to do after getting the software working on the Test Setup.  When I go to move the RPi and equipment onto the iCreate, I probably need some sort of a test platform.  Since I was already thinking about using multiple RPis, it occurred to me that I could just re-use the test setup with the iCreate by using a wireless interface.  The following diagram shows what I am thinking about.


As you can see in the diagram, the RPi with the PiFace fits nicely into a package that interfaces to the iCreate Command Module and a Distance Sensor.  I was thinking that I might need the distance sensor (around 30cm distance) to figure out what is in the way (chair legs, that kind of thing) and respond to it.  By keeping the test setup intact, I can then write code to interface to what the iCreate is doing.  This seems like a pretty elegant plan of attack for what I want.


Wednesday, February 6, 2013

Posted a question on Reddit about Test Setup

Interesting, I posted a question on Reddit ( see piface_came_in_now_on_to_experimenting) about my test setup asking if anyone had experience with multi-port USB hubs and power requirements.  I did get some posts re my question but another question was raised, namely about the USB-Serial cable that I was using.  To tell you the truth, I had not even thought about it.  I was able to get the cable to work with an old Ubuntu laptop a couple of years ago, so I thought that I would not have any issues.  I will be able to test out the test setup over the weekend, but I will be paying particular attention to this issue.

Tuesday, February 5, 2013

The PiFace Came In

I was able to get several parts in over the last couple of weeks. As shown in this photo, I now have a battery, a new 7 port USB hub, a new RPi, and the new PiFace.




I have plans for later on using the battery, which has both a 1 amp and 2.1 amp output to supply power to a robotic vehicle (using my iCreate robot), specifically the RPi and some servos. The 7 port USB hub can also be used to interface to various pieces of equipment (including a camera) and be controllable via the RPi.  The PiFace will be used to interface to the iCreate and some servos so that I can control both movement and the other equipment at the same time.  I don't have a picture of the SSC-32 which is a multiple servo controller with a serial interface.

My game plan is to setup a test rig for trying out some Robotics things (which I have been wanting to do for a long time).  The test setup looks like the following.



This setup of course assumes that I am not connected to my home network or to an external laptop; which will pretty much happen.  Also, I have a bluetooth setup with the iCreate that I could use, sans PiFace to control movement.  This of course is TBD.