JColvin

Administrators
  • Content Count

    3059
  • Joined

  • Last visited

  • Days Won

    96

Everything posted by JColvin

  1. Hi everybody, I have made an Instructable on how to create Digilent's Box Monster! You can learn how to make the Box Monster here as well as the Halloween themed version on the Box Monster both the Digilent Blog, and Instructables.
  2. Like NMacDonald and mmigliacio, I too made a project for the Digilent Halloween Contest. A Halloween themed Box Monster! The Corrugated Conqueror has been (somewhat) tamed; rather than biting anybody who gets too close, he only opens up his mouth when people get close enough to him in order to tell them "Happy Halloween", but looks still looks ominous with his glowing green eyes when nobody is around. You check him out in the youtube video below.
  3. If you want to use the Analog Discovery with a breadboard you will, as you said, need to turn those female headers into male headers. Digikey does have single pin headers available, but based on a per pin basis, it will be a little cheaper to break those larger amounts of pin headers into individual pin headers which can be easily done with pliers or wire cutters. Naturally, this will be somewhat tedious to do, but you can always get more of the larger pin headers (Digilent has a set of 5 available here) if something goes wrong. Alternatively, you could also use breadboard jumper wires as your gender changers. I personally prefer the breadboard jumper wires purely because I have a bunch of those right at my desk. In the end, it'll come down to what you'll prefer the most or find the most convenient for your project. Let me know if you have any more questions.
  4. I am not an authority on the Analog Discovery, so I don't necessarily have a complete technical answer for you but here is my understanding. Digilent does not stock any variable power supplies, so we are unable to include a variable power supply with the Analog Discovery. The Analog Discovery itself is only able to be powered through its USB port (hence the 5V range on the power supply) and does not have a way to be externally powered and be connected to a computer simultaneously. That being said, you could use an external power supply to power your circuit and use the Analog Discovery for testing purposes since its voltmeters are able to handle up to a recommended +/- 25V on each pin (+/- 50V peak to peak). Please let me know if you have any more questions. Thanks, James
  5. Sweet! It looks like a lot of fun; I'm impressed with that you got all of that going with your first time programming in MPIDE.
  6. Hi, Having worked with the PmodDA4, I believe I know what issue you are running into, but please correct me if this is not the case. You are correct in that the update DAC address command is 0011 and that the value for all eight outputs is 1111. However, the on board DAC assumes by default that it is using an external voltage reference on one of its pins. Since it rather inconvenient to use an external reference voltage for the chip, what you will need to do is send a command to use its internal reference voltage of 2.5V. This 32 bit message you will need to send in four 8 bit chunks is 00001000 00000000 00000000 00000001. You can see the data sheet reference for this command on pages 24 and 25 for the DAC (http://www.analog.com/static/imported-files/data_sheets/AD5628_5648_5668.pdf) Let me know if you have any other questions. Thanks, James
  7. Ah. Presuming that your output is performing as desired, then the reason your motor is not rotating is because you are trying to rotate it to quickly. The fastest that I was ever able to rotate the stepper motor was about 60 rotations per minute or about 1Hz. You may be able to get the motor to rotate quicker by using a larger voltage signal, but it will get nowhere near the 400Hz that you are wanting. The only way that I know to fix this is to get a new stepper motor that is capable of rotating that quickly. Unfortunately, I don't personally know of a stepper motor off the top of my head which is capable of that speed; I believe there are motors that can go that quickly, I just don't know which ones can.
  8. JColvin

    DVI Receive on Zybo

    Hi vadim, Actually, would you mind if you summarized your answer here on the forum? That way other people who encounter the same issue but need a little more guidance on how to resolve the problem can find out here. You don't have to if you don't want to though. Thanks, James
  9. Hello! I have made an Instructable on how to use a stepper motor in unipolar mode. The code is specifically designed to run the stepper motor with a chipKIT board, but the general principle of how the stepper motor is run can be applied to any system board. You can check it out here. Thanks, James
  10. Hi, I chatted with you earlier today, but I am putting a condensed reply here as well. If you are using a 5 wire stepper motor that looks like this one in the picture link below: http://www.instructables.com/file/FF7YQ75I0XOISBQ then the way that the wires are arranged are follows: The orange wire corresponds to coil 1the yellow wire corresponds to coil 2the pink wire corresponds to coil 3the blue wire corresponds to coil 4and the red wire corresponds to the center taps on the two sets of coils. You can connect the four coils to the pins on the PmodSTEP as well. If you are connecting to J2 (the four pin connection), I would recommend attaching the orange wire to pin 1, the yellow wire to pin 2, the pink wire to pin 3, and the blue wire to pin 4. The red wire should be left floating in this case. These four pins (1, 2, 3, and 4) are associated with the pins 7, 8, 9, and 10, respectively, on the 6x2 pin header. To run the stepper motor in this configuration (bipolar mode) you will need some way to get current flowing through the electromagnetic coils in the reverse direction. This can be done by either having a board that can output both positive and negative voltage signals, or by using an H-Bridge. Alternatively, you can also connect the 5 pin stepper motor to pin header J3 on the PmodSTEP. Here, I would recommend attaching the orange wire to pin 1, the yellow wire to pin 2, the pink wire to pin 5, and the blue wire to pin 6. The red wire can be attached to either pin 3 or pin 4; it does not matter which one you choose. The pins 1, 2, 5, and 6 on J3 are also associated with the pins 7, 8, 9, and 10, respectively, on the 6x2 pin header. To run the stepper motor in this configuration (unipolar mode), all you need is to have your board produce a positive voltage signal and a ground signal; no H-bridge will be required. You can learn how unipolar mode works in principle by following my Instructable here. Please let me know if you have any other questions.
  11. JColvin

    AnalogShield

    Hi cmeuchel, I believe I have found the source of your original problem. The issue that you are running into is with the fact that the analog.read() function returns an unsigned 16 bit value. However, you have count declared as an "int" meaning it is a signed (+/-) value. Therefore, because you are assigning an unsigned value to a signed value, the most significant bit (the largest value which accounts for all of your higher voltages) is no longer interpreted as a number, so-to-speak, but as a minus sign, messing up any attempts to correctly interpret the value. So, when you are reading the 0V, the analog.read() function will return a value slightly larger than 32767, such as 32842 (greater by 75). However, because the highest bit is interpreted as a negative sign instead of a '1' for the binary number, the C language sees the first number of the extra 75 as the negative sign (to make it -32767) and the remaining 74 out of the 75 extra as additional values making the final value which you printed -32693. (-32767 + 74 = -32693). With the even higher voltages, this negative value will continue to get closer and closer to a value of '0'. The easiest way to fix this is to simply declare your variable count as an unsigned integer: unsigned int count = 0;This will fix your count value at higher voltages. I also spotted one other issue with your map() function. The second and third parameters for your map function are the min and max values, respectively, that you are expecting to be getting from the value you want to "scale" (count in this case). However, as the analog.read function only returns unsigned int values between 0 and 65535 (with the zero value corresponding to -5V and the 65535 value corresponding to +5V) so you will never be giving the map function that lower bound of -32767. So, there are a couple of ways to fix this, which you have already done to an extent, but I'll list them anyway for the sake of explanation. One is when you calculate your voltage from your analog.read value use the voltage = count * (10.0 / 65535.0) - 5;equation in order to account for the fact that the 0 to 65535 range that analog.read gives is associated with -5V to +5V (a 10 V range). The -5V will then get the voltage back to the correct polarity. You would then also want to change the map function to say val = map(count, 0.0, 65535.0, -5.0, 5.0); Alternatively, if you really wanted to keep the -32767 and the 32767 as the 2nd and 3rd values in your map() function, you could subtract 32767 from your "count" variable before giving it to the map() function. count = analog.read(0) - 32767; val = map(count, -32767.0, 32767.0, -5, 5);This will then "map" your count to the -5V to 5V scale that the analog.read() function is working off of. Let me know if you have any questions. Thanks, James
  12. To get the UART working on the PmodMAXSONAR you need to connect the "RX" pin on the Pmod to the "RX" pin to the microcontroller. To find out what pin that is, you need to go to the "Board_data.c" file for your microcontroller (NOT the board defs file that the MAXSonar library suggests). To find this file (since the library doesn't tell you where it is) you need to open up the original mpide folder when you first installed mpide. Mine is called "mpide-0023-windows-20130715", so yours likely has a similar name. Within this folder, open up the "hardware" folder, then the "pic32" folder, then the "varients" folder, and then find whichever microcontroller board you happen to be using and open up the "Board_data.c". Since the demo code is using the Serial port 1, this means we are using UART2. So, search the document (via Control+F or Command+F or whatever is appropriate) for "U2RX". The associated number with the U2RX is the pin that we need to define the RXpin as in the demo code and the pin we will connect the RX pin from the PmodMAXSONAR to. Let me know if you have any questions. Thanks, James
  13. Hi, How do you get the UART mode on the PmodMAXSONAR to work correctly? While using the provided demo code, I am able to get the PWM and Analog modes to report correct distances, but I seem to be having trouble to get the UART version to work. What pin(s) should I be using? Thanks, James
  14. Hi Sharon, Thank you for that catch! We'll get it fixed as soon as we can. Thanks, James
  15. Hi J&W, From my understanding, the short answer is yes, you will be able to use the PmodRF2 with the Basys2 board to send and receive text. This is because, from a "high-level" point of view, the Pmod will communicate with the host board (the FPGA in this case) using high and low voltage signals. The reason the reference manual indicates that the PmodRF2 should be used with microcontrollers is because the associated software stack (I think) handles the all of the checking for radio signals, controlling power consumption, and dealing with all of the addresses on the chip. That being said, it is possible to create code for the Basys2 that essentially mimics SPI (at least that is my understanding of how FPGA coding works) since the FPGA is just talking directly with the Pmod, not directly the second Basys2. You could then have the FPGA transmit values that write (via high and low voltage signals) your data to the appropriate transmit register in the MRF24J40 chip present on the Pmod and also read data from the receive register that is in the chip. Having never really dealt with wireless communication of any kind, I will be honest in saying that this sounds like a lot of work in getting the communication up and running. But from what I understand, this is the case for any kind of wireless communication; radio frequency, bluetooth, WiFi or otherwise. So, as the Pmod Guy, the answer to your question is yes, it is possible to use the PmodRF2 with your Basys2 boards to send messages to its twin board. Please let me know if you have any more questions, and I will do my best to find out. Thanks,James
  16. After doing a bit of research, I found out what the 5th wire (the red one), could be used for. The Stepper motor claims it needs to use 5V, so if you hooked up the stepper motor inputs to a Darlington Transistor array, when you drive a particular input HIGH on the microcontroller, the Darilington Transistor will bring that particular output to a LOW state, which will encourage current to be drawn. Since stepper motors work by electromagnets, when we are driving a particular magnet low, this means that the rotating motor shaft itself will need to be at a HIGH state so that it is a "magnetic opposite" to the "on" electromagnet. Basically, this means that the 5th wire on the stepper motor will need to be attached to a 5V line in order to have the motor work. This also gives it a lot more torque than I was seeing before and allowed me to get about 48 revolutions/min. As for connecting to the PmodSTEP, an external connector will need to be used. The PmodSTEP only accounts for the popular 4-wire (a purely bipolar stepper motor) and the universal (bipolar and unipolar) 6-wire stepper motor. The 5-wire stepper motor in the chipKIT Starter Kit is actually a 6-wire stepper motor; however, the two central taps to the coils are internally tied together to create a 5-wire header.
  17. I eventually found in the Analog Devices datasheet the structure of the 32 bits of information, but it still wasn't working until I realized (by combing through the datasheet some more) that I needed to set up the internal reference voltage for the chip since it normally checks for an external reference voltage by default. So, to help avoid any further confusion, I made an Instructable on how to (successfully) use the PmodDA4 here. Let me know if you have any questions. Thanks, James
  18. What I found is that while both of these Pmods support motor feedback from Hall Effect sensors (or some other kind of feedback), the PmodHB3 presumes that the feedback sensor is not incorporated into the motor itself but is rather an external sensor. So, the two motor feedback pins, SA and SB, are on their own header (J5) on the Pmod. On the other hand, the PmodHB5 presumes that the feedback sensors are incorporated into the motor itself and have their signal wires on the same wire header as the motor outputs present on the J2 header. Otherwise, the two Pmods are functionally the same.
  19. I noticed the PmodHB3 and the PmodHB5 seem to be really similar in both their schematics and reference manuals, so I wanted to know what the difference between them was.
  20. I have a question (not surprisingly) about the stepper motor that comes in the chipKIT Starter Kit (28BYJ48A). I know that I'm supposed to pulse the four lines to make the electromagnets "turn on" in such a way to make the motor turn one way or the other. I did so by driving various I/O pins on the chipKIT uC32 high and low and got it to rotate, but it seems I can only get it to rotate up to a maximum speed of ~12 revolutions/min, since any shorter delay than 3 ms between driving the magnets high/low seems to make the electromagnets shift around faster than the motor can keep up. My other question (which I'm honestly more curious about) is what the 5th wire for on the header for the stepper motor? According to this website, that wire should be hooked up to a 5V line, but when I hook that line up to 5V (or 3.3V or ground) the motor shaft stops rotating; I'm only getting it to rotate when that 5th line (the red one) is floating. So... should I be seeing this? Thanks, James P.S. How would I hook up this 5 pin header to the PmodSTEP? The PmodSTEP only has 4 and 6 pin headers so the 5-pin header from the stepper motor physically doesn't fit.
  21. My name is James and I am one of the interns here at Digilent and am currently working to become a Pmod expert and will be happy to help you out with any difficulties you might be encountering.
  22. Hi LariSan, Could you provide the link to where the promo video is located? Thanks, James Colvin