Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Battery powered raspberry pi (http://www.chiefdelphi.com/forums/showthread.php?t=117989)

efoote868 16-12-2013 12:59

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by Joe Johnson (Post 1313203)
What does the Chief Delphi community think?

Joe J.

Maybe you have an example of this, but I'm drawing a blank as to when you're going to set your robot out onto the field without starting in some sort of standard configuration.

Have there been situations where you can't move parts on the robot without power?

Joe Johnson 16-12-2013 14:51

Re: Battery powered raspberry pi
 
With regard to moving the robot with power down this happens all the time. But even if it happens only once in a while, do you want to be the team that has its auton mode freak because a field reset requires you to turn your robot off and on.

The problem with using a "know position" at the start is that this is a pretty squishy position in a number of cases. Not accurate enough to reliably shoot frisbees last year (at least for the one robot that I worked with, 3958)

The idea of writing to flash periodically, this solves many problems (especially just a quick power cycle without moving the robot). But it doesn't really solve the move while the robot is off problem.

I THINK that folks are saying this is legal. Is it wise? not sure. Time will tell.

Joe J.

techhelpbb 16-12-2013 14:59

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by Joe Johnson (Post 1313270)
With regard to moving the robot with power down this happens all the time. But even if it happens only once in a while, do you want to be the team that has its auton mode freak because a field reset requires you to turn your robot off and on.

The problem with using a "know position" at the start is that this is a pretty squishy position in a number of cases. Not accurate enough to reliably shoot frisbees last year (at least for the one robot that I worked with, 3958)

The idea of writing to flash periodically, this solves many problems (especially just a quick power cycle without moving the robot). But it doesn't really solve the move while the robot is off problem.

I THINK that folks are saying this is legal. Is it wise? not sure. Time will tell.

Joe J.

So far as I know you can leave a COTS laptop on the robot powered up and even if you couldn't it is easy enough to get flash storage on the laptop to suspend it.

It's not going to create a safety situation because the cRIO must be in control of the motors on the robot so having a laptop like that on the robot is not going to move anything with the cRIO powered down (otherwise it will not pass inspection).

Alan Anderson 16-12-2013 15:07

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by Joe Johnson (Post 1313270)
The idea of writing to flash periodically, this solves many problems (especially just a quick power cycle without moving the robot). But it doesn't really solve the move while the robot is off problem.

Nothing solves the "move while the robot is off problem" if you don't have an absolute position sensor.

What's the real reason for avoiding potentiometers? There are also magnetic angle sensors that serve the same purpose but lack the mechanical/electrical wear issue, and some of them don't need a physical connection to the rotating shaft.

Of course, one of the easiest solutions to the problem is to use an actuator that doesn't require feedback for it to go to a known position. Plenty of teams use pneumatic cylinders with very good results. You do need a problem that lends itself to that solution, however.

Joe Johnson 16-12-2013 17:45

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by Alan Anderson (Post 1313274)
Nothing solves the "move while the robot is off problem" if you don't have an absolute position sensor.

Yes and no. If I can set the zeroes of the encoders in the pit and not have to turn off the laptop then I think I am all set because the laptop (and its children processors that are doing the quadrature decode) are keeping track even when the robot is powered off.

As to why? encoders on the motors are so much nicer from a controls point of view. With no backlash to worry about, you can have a nice tight loop controlling motor velocity, then have a slower loop controlling position. At least that is the theory. Once you have encoders on the motors, it seems like a waste to have to put pots on the joint as well. But, it is also a waste to have to put a PC on the robot just to keep your sensors alive so... ...it is a trade off either way.

It is an interesting idea (says the ME who doesn't have to implement the software or the electronics to make it happen!)

Joe J.

yash101 17-12-2013 00:02

Re: Battery powered raspberry pi
 
Do you guys have a suggestion of a low-power MCU to use for the controls? I am currently thinking about using the propeller, but that isn't exactly low-power. It can draw as much as 300mA, running all 8 cogs at max, and all I/O at max threshold!

efoote868 17-12-2013 08:18

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by Joe Johnson (Post 1313336)
It is an interesting idea (says the ME who doesn't have to implement the software or the electronics to make it happen!)

Joe J.

If there is a similar rule about batteries integral to COTS parts, it merits asking the GDC if your idea follows the spirit of the rule, since your extra battery is powering more than just the laptop.

Also standard caveat applies - opinions on CD are just that, and they won't hold any weight during an inspection.

techhelpbb 17-12-2013 08:41

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by efoote868 (Post 1313618)
If there is a similar rule about batteries integral to COTS parts, it merits asking the GDC if your idea follows the spirit of the rule, since your extra battery is powering more than just the laptop.

Also standard caveat applies - opinions on CD are just that, and they won't hold any weight during an inspection.

If GDC says no they changed their minds. Team 11 asked for me years ago officially and actually had USB cameras on the robot powered by the laptop during competition. Neither year we needed the vision system. We expected different people to interpret the rules differently. So rather than take anything for granted we tried. So if FIRST rules against this now then they've changed the game and very likely we won't waste our time with a vision system again unless the RoboRIO in 2015 offers a better working example of Java performing this task.

FIRST could alter the rules to disallow custom circuits connected to the COTS device but in doing that you now have a can of worms for the connection between the COTS device and the robot. FIRST could clarify the rules about the COTS device being powered on or off but that invites an issue where the students now have to link the power to a battery or non-battery equipped device to the main breaker. A Spike relay for example driven by the cRIO to comply with other rules, and therefore extending the boot time of the COTS device with the cRIO boot time. FIRST could say that only COTS devices could be connected to the USB ports of a COTS device but then what if you need to cut the cord on the USB camera to route it around inside the robot? If you can't power the custom circuits for a COTS device from the COTS device are you allowed to splice power from the PDB into the USB device referencing a common ground (that could be a risky issue so probably not). Can we connect to opto-isolated devices and power them from the robot mains (there are opti-isolated USB cables). So obviously this opens the door to many other questions that will beg official answers because the window to alter the 2014 documentation is pretty much past closed at this point.

If the goal here is to interpret the rules so that there are no sources of power on the robot then that is not possible. Even if the main breaker is disconnected the robot battery and the wires to the main breaker are still very much live.

Also, back to an earlier point in this topic, if GDC now says the COTS device can't power accessories like a USB camera then someone needs to ask in the official forums about bootstrapping the power to the COTS device external to the robot with a FRC legal battery before the mains is turned on. I've never seen someone bootstrap power like that on a competition robot and so it should be asked anyway.

Quote:

Originally Posted by yash101 (Post 1313533)
Do you guys have a suggestion of a low-power MCU to use for the controls? I am currently thinking about using the propeller, but that isn't exactly low-power. It can draw as much as 300mA, running all 8 cogs at max, and all I/O at max threshold!

That sounds like terrible power draw but it really is not.
If 28 I/O pins are sourcing or sinking 10mA each that's 280mA.
As the circuit designer you completely control that aspect of the external circuit design.
So unless you as the circuit designer demand 10mA per I/O pin it won't exist.

So what you are really asking is for 8 processors with power management turned off (because there are power saving features in the Parallax Propeller) and windowed static RAM with 28 I/Os that offer a lower maximum current.

Keep in mind that the 1st generation Parallax Propeller is 3.3VDC so it's already demonstrating a common solution to powering that device from batteries (reduce the voltages and often the currents follow per Ohm's law).

So I would be interested...apples for apples...what is a better choice? 8 of the smallest lowest power MCU you can get plus equivalent circuitry will draw more current max. The only way I can think of to reduce the power further is strip features or further reduce the voltage and at some point you'll loose 5V tolerant I/O and then you'll need level shifters which draw power.

yash101 17-12-2013 15:35

Re: Battery powered raspberry pi
 
Yeah. I did point out worst-case scenarios, but I think the Prop may draw 100mA at lease, commutating a boost converter. I'd have to set up an entire core to do a PID loop, when the voltage goes lower than 4.9v, pulse the boost converter. When the voltage gets higher than 5.1v, wait for it to drop to 4.9v, then pulse the boost converter. Running this a couple hundred times a second, with a pretty big Capacitor (5,000uF), that should be a good enough speed to give a very stable output of up to, maybe 5 amps!

The Propeller is quite picky about voltage, and requires an LDO regulator, because of their very high accuracy. Most other microcontrollers, like PICs, and some AVRs have quite some tolerance and will work from 2v7 to 5v! That would make the design process more headache free! Also, the Propeller has no built-in memory, something that even the BASIC stamp has! That means more chips, a higher price and more failure points! It also means that you will have a bigger board size! 28I/O seems quite overkill for a UPS, unless I make this an integrated lighting controller as well :D. But yeah, the Propeller's video generator means that We could have displays on the sides of the robot showing advertisements*, etc.

But yeah, that would be unnecessary fluff and would be 100% un-required for most teams!

You can already buy integrated lighting controllers, or maybe even individually-controllable ones to control from the cRIO!

I am looking for an MCU series that can be programmed in C. I'm in high school, so I don't have the time to learn ten different Assembler languages. Also, around 8-12 I/O would be nice, and a 4 channel 12 or 16-bit ADC would be nice, allowing me to ditch the MCU3204!

*Stuff about your team, not the stuff that comes on your TV!

techhelpbb 17-12-2013 15:57

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by yash101 (Post 1313805)
Yeah. I did point out worst-case scenarios, but I think the Prop may draw 100mA at lease, commutating a boost converter. I'd have to set up an entire core to do a PID loop, when the voltage goes lower than 4.9v, pulse the boost converter. When the voltage gets higher than 5.1v, wait for it to drop to 4.9v, then pulse the boost converter. Running this a couple hundred times a second, with a pretty big Capacitor (5,000uF), that should be a good enough speed to give a very stable output of up to, maybe 5 amps!

You can do that with an operational amplifer as a comparator you do not need an MCU for that. In fact some MCU I have used in power supply systems have integrated voltage comparators.

Quote:

The Propeller is quite picky about voltage, and requires an LDO regulator, because of their very high accuracy. Most other microcontrollers, like PICs, and some AVRs have quite some tolerance and will work from 2v7 to 5v! That would make the design process more headache free!
If your regulation is that loose you can not expect to measure voltage.
In fact you will not get close.

Quote:

Also, the Propeller has no built-in memory, something that even the BASIC stamp has! That means more chips, a higher price and more failure points!
It has ROM masked for Spin and the lookup tables. There is no way 8 chips with the windowed RAM is cheaper or smaller than the Parallax Propeller QFP with crystal and external flash. Plus even the BASIC Stamp has external flash memory.

Even with 2 chips you still need a crystal oscillator and other parts and you might need a reset controller with something like the 8051.

As far as failure points you would have to mess up pretty bad to be better off. Unless you use the internal R/C oscillator in a cheap low end 8bit Microchip or Atmel AVR chip. Plus the external program storage means that if you kill that storage you save the MCU itself. Not so big a deal for an experienced user but an issue for the inexperienced or eventually it will become an issue.

Plus there's the whole: potentially needing a chip programmer issues you are overlooking unless you use some form of ISP (In-System-Programming). Never mind the potential need for a debugger which the Parallax Propeller to some extent already offers.

Quote:

It also means that you will have a bigger board size!
The QFP version of the Propeller is pretty small. There are smaller MCU but even the BASIC Stamp has an onboard regulator, external RAM and the crystal which will make the board bigger. Since most of the Parallax parts fit on a board that's about 600mil across to fit a 600mil DIP IC socket I bet you won't make this smaller without cutting some corners.

For example an R/C time constant will make your timers temperature sensitive and will drift.
Fine for something not timing sensitive but not so good if you need the timing of something predictable.

Quote:

28 I/O seems quite overkill for a UPS
You do not need an MCU for this purpose. How is no I/O :).

Quote:

, unless I make this an integrated lighting controller as well :D. But yeah, the Propeller's video generator means that We could have displays on the sides of the robot showing advertisements*, etc.

But yeah, that would be unnecessary fluff and would be 100% un-required for most teams!
You can already buy integrated lighting controllers, or maybe even individually-controllable ones to control from the cRIO!
If you don't need all the features of the Parallax Propeller then look at the 8bit Microchip PIC (like the older FIRST systems) and Atmel AVR controllers (you probably know them as Arduino). You probably don't want to learn how to use an Intel 8051 architecture or 6800 architecture so that is off the table because that tends to involve a lot of interconnects and extra parts. (There are about 1 dozen less frequently mentioned MCU I could put here but I won't because as a high school student you'll drive yourself nuts learning it just to discover it's not as standard in the industry). I will mention the Hitachi H8 because of the older LEGO Mindstorms RCX bricks. The lower end Microchip and AVR parts are even less expensive but in all cases you will be doing everything by sharing time on that single processor system. Expect to make choices with peripherals because to stretch that single processor further they add peripherals to offload specific tasks into logic within those MCU.

Quote:

I am looking for an MCU series that can be programmed in C. I'm in high school, so I don't have the time to learn ten different Assembler languages.
https://sites.google.com/site/propellergcc/

I believe previously you wanted to program in Java but here you go.
There are 100 or more other languages or ports available on the Propeller as well but that's neither here nor there.

Quote:

Also, around 8-12 I/O would be nice, and a 4 channel 12 or 16-bit ADC would be nice, allowing me to ditch the MCU3204!
Single ended or differential?
Muxed or unmuxed?

Muxed A/D inputs let you switch analog inputs but you can't read them all at the same time.
Differential inputs allow you to lift the monitored circuit ground.
The cRIO analog bumper is single ended, ground is the system ground, and even the cRIO uses an external ADC.

yash101 17-12-2013 18:39

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by techhelpbb (Post 1313818)
You can do that with an operational amplifer as a comparator you do not need an MCU for that. In fact some MCU I have used in power supply systems have integrated voltage comparators.

What is an example of a decent MCU with a built-in comparator? Using a comparator will allow me to increase the max current output because the chip will be able to switch faster.

Quote:

If your regulation is that loose you can not expect to measure voltage.
In fact you will not get close.
This is for the MCU to run off. The vRef will be regulated by LDO (with a capacitor) to get power spikes out of the equation. The 2.7V min voltage means that I will be able to run the chip at a lower voltage.

Quote:

It has ROM masked for Spin and the lookup tables. There is no way 8 chips with the windowed RAM is cheaper or smaller than the Parallax Propeller QFP with crystal and external flash. Plus even the BASIC Stamp has external flash memory.
Yeah! I forgot about that! I last played with the BASIC Stamp two years ago. Then, it was taken over by it's powerful son, the Propeller!

Quote:

Even with 2 chips you still need a crystal oscillator and other parts and you might need a reset controller with something like the 8051.
I don't need the eight cores. Eight cores is just overkill. Plus, typical microcontrollers, even the SX, allow interrupts. While the Propeller is the perfect platform for development, it isn't suitable for the end product. Even better would be to use Pi GPIO, which can switch at over 100MHz! That's what you get when you power a small thing with a big processor, or load a sedan with the engine of an airplane (If even possible) :D

Currently, it seems as though here are some good choices, for the end product.
PIC32
PIC
PicAxe
AVR
SX
[strikethrough]BASIC Stamp[/strikethrough]

Quote:

As far as failure points you would have to mess up pretty bad to be better off. Unless you use the internal R/C oscillator in a cheap low end 8bit Microchip or Atmel AVR chip. Plus the external program storage means that if you kill that storage you save the MCU itself. Not so big a deal for an experienced user but an issue for the inexperienced or eventually it will become an issue.
I agree. Even RadioShack components will last a class 10 earthquake (Has it even happened before?). However, as the number of parts increases, the complexity increases (almost always), so there will be more failure points. It would also make perfect designing harder!

Quote:

Plus there's the whole: potentially needing a chip programmer issues you are overlooking unless you use some form of ISP (In-System-Programming). Never mind the potential need for a debugger which the Parallax Propeller to some extent already offers.
That is true. As mentioned before, I am looking for chips with serial programming capabilities like all (I think) of Parallax's MCUs!

Quote:

The QFP version of the Propeller is pretty small. There are smaller MCU but even the BASIC Stamp has an onboard regulator, external RAM and the crystal which will make the board bigger. Since most of the Parallax parts fit on a board that's about 600mil across to fit a 600mil DIP IC socket I bet you won't make this smaller without cutting some corners.
It is small, but for now, I will be playing with DIPs! I suck at SMT soldering, so I won't use it until I get more experience at it.

[quote]For example an R/C time constant will make your timers temperature sensitive and will drift.
Fine for something not timing sensitive but not so good if you need the timing of something predictable.
[quote]

I won't be using RC because it is hard to get very accurate values quickly. I am going to use an MCP3204, with a Sigma-Delta setup because it offers a very high refresh rate, faster than the Propeller can handle!

Quote:

You do not need an MCU for this purpose. How is no I/O :).
That is true. However, MCUs can be the BIY Hobbyist/Prototyper's best friend because it is easy to configure them. They will function as millions of transistors, addressable by code!

Quote:

If you don't need all the features of the Parallax Propeller then look at the 8bit Microchip PIC (like the older FIRST systems) and Atmel AVR controllers (you probably know them as Arduino). You probably don't want to learn how to use an Intel 8051 architecture or 6800 architecture so that is off the table because that tends to involve a lot of interconnects and extra parts. (There are about 1 dozen less frequently mentioned MCU I could put here but I won't because as a high school student you'll drive yourself nuts learning it just to discover it's not as standard in the industry). I will mention the Hitachi H8 because of the older LEGO Mindstorms RCX bricks. The lower end Microchip and AVR parts are even less expensive but in all cases you will be doing everything by sharing time on that single processor system. Expect to make choices with peripherals because to stretch that single processor further they add peripherals to offload specific tasks into logic within those MCU.
I will test with different parts, off-the-shelf boost/buck converters, and try to face off MCUs, if I have the time (I probably will need to learn a different language for each one!

Quote:

https://sites.google.com/site/propellergcc/

I believe previously you wanted to program in Java but here you go.
There are 100 or more other languages or ports available on the Propeller as well but that's neither here nor there.
You already pointed me to Propeller@WikiSpaces, an article on how to program in Java on this platform. Thanks :)

Quote:

Single ended or differential?
Muxed or unmuxed?
Do you mean Mixed? Doing a google searches kept pointing me to Mixed. I probably will go for Unmixed if possible, though mixed may work if the switch times are good.

Quote:

Muxed A/D inputs let you switch analog inputs but you can't read them all at the same time.
Differential inputs allow you to lift the monitored circuit ground.
The cRIO analog bumper is single ended, ground is the system ground, and even the cRIO uses an external ADC.
I am thinking that an external ADC may be the best ;)

techhelpbb 17-12-2013 20:04

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by yash101 (Post 1313873)
What is an example of a decent MCU with a built-in comparator? Using a comparator will allow me to increase the max current output because the chip will be able to switch faster.

Microchip and Atmel both offer 8bit MCU with comparators.
Look up the Microchip and Atmel product selectors on their websites it lists all the current production models and you can filter that list to find the ones that fit what you want.

Quote:

This is for the MCU to run off. The vRef will be regulated by LDO (with a capacitor) to get power spikes out of the equation. The 2.7V min voltage means that I will be able to run the chip at a lower voltage.
I've gotta ask why you think that lower voltage is going to help you. At this point even the Propeller has a lower drop out voltage than most of the rest of the robot and since this is a FRC targeted idea: why do you need an even lower drop out? If the argument is: but it's another 1V or so I can drop I think you really ought to try to run one of these 2.7-5V chips a bit and see why that's not as great an idea as you think it is. You still need some voltage to drop. At some point you'll still start to brown out and it'll still be be between 3V and 4V DC.

Quote:

I don't need the eight cores. Eight cores is just overkill. Plus, typical microcontrollers, even the SX, allow interrupts. While the Propeller is the perfect platform for development, it isn't suitable for the end product. Even better would be to use Pi GPIO, which can switch at over 100MHz! That's what you get when you power a small thing with a big processor, or load a sedan with the engine of an airplane (If even possible) :D
I can't argue that you need 8 cores for what you are doing. There are many things that do not need 1 core (this is one of them). However I can point out to you, actually again, that interrupts are not a wonderful solution to a lot of problems. They create complex situations that are sometimes painfully difficult to digest and can leave you with a problem you can't easily replicate. Stalling development in a fast past environment like FRC where it might have consequences. Should you learn interrupts - yes. Does learning interrupts by necessity make them better than polling or logic - not at all. Somewhere the scientific method should help you deduce which is better for what purpose.

Quote:

Currently, it seems as though here are some good choices, for the end product.
PIC32
PIC
PicAxe
AVR
SX
[strikethrough]BASIC Stamp[/strikethrough]
The first is a 32bit version of the Microchip product offering. It's not quite low end ARM in performance and like the AVR MEGA it's not what most people think of as midrange or low end CPU either.

PIC and PICAXE are both 8bit Microchip PICs.
One has software in it already.

Atmel AVR and the AVR MEGA are 8bit microcontrollers.
Atmel XMEGA offer 16bit.
Atmel AVR U3 offer 32bit (think PIC32 competitor space).

The Parallax Semiconductor (previously Ubicom) chips are 8bit but fast.
I have plenty of old SX chips I don't use because anything that needs that sort of RISC speed I probably move too much data to use those chips.

Quote:

I agree. Even RadioShack components will last a class 10 earthquake (Has it even happened before?). However, as the number of parts increases, the complexity increases (almost always), so there will be more failure points. It would also make perfect designing harder!
Whoever told you a design can be perfect needs to look for flaws harder.

If you want to design PCB you may as well start learning how to connect parts because you can not avoid it. It's true that putting some things in the chips can reduce board complexity and the number of layers. However there are many examples of where putting something like an ADC in a chip produces a not so great example of an ADC because you can't alter the ADC to deal with system issues.

I have 2 LPKF PCB mills. I make 2 layer boards all the time. There are many examples where I am assured that I need 4 layers and even in the RF range it works as long as I respect design practice and shield.

PCB designing is a big job and requires a fair degree of knowledge. Do not fear it just learn how to do it because if you make a career out of electronics you'll be doing it again in the future.

Quote:

That is true. As mentioned before, I am looking for chips with serial programming capabilities like all (I think) of Parallax's MCUs!
You want the flash ISP chips then. You need to get an ISP adapter or make one probably to go from USB to ISP header (and there are different ISP headers).

The Propeller development boards come with the USB to serial adapters.
You'll be in a situation where you don't have that.
ISP is basically serial but usually it's not done these days with a serial port.

There are plenty of cheap Chinese knockoffs of the PIC and AVR ISP programmers that work great.

Quote:

It is small, but for now, I will be playing with DIPs! I suck at SMT soldering, so I won't use it until I get more experience at it.
Best way to get experience is get experience. That said DIP has excellent durability and that's why still today a lot of military electronics are DIP. If you want SMT without soldering find an assembly house.

Quote:

I won't be using RC because it is hard to get very accurate values quickly. I am going to use an MCP3204, with a Sigma-Delta setup because it offers a very high refresh rate, faster than the Propeller can handle!
You are incorrect. I can outrun an MCP3204 with a Propeller but I will do it in assembler.
Now for a better question - what are you doing with that data?

Quote:

That is true. However, MCUs can be the BIY Hobbyist/Prototyper's best friend because it is easy to configure them. They will function as millions of transistors, addressable by code!
Technically if you want the right tool for the right job you'd remember that you can't just program all the transistors in an MCU. You can't even do that in an FPGA. You can work with the building blocks and interfaces you are offered. In an FPGA those are logic that, if you desired, you could slap together to make a processor like the Propeller (that's how it was prototyped BTW). In an MCU/CPU those blocks are dedicated to functions and the most variability is offered by instructing those functions.

It is an illusion that analog is dead >entirely<. An analog circuit is not subject to illusion of synchronized timing to a clock. True digital has valuable contributions it can make but truly an array of programmable transistor interconnects is an analog construct it does not require a clock even if it can harness it. In fact there was a company that used to make analog programmable circuits.

I often see students trying to bang all problems with the same hammer. Anyone telling you as a student in high school you can't handle analog electronics is being dishonest. I was fixing tube televisions by 7th grade. In the context of your comments previously by the time I was in high school I was programming in assembler on 5 platforms and at least 3 of those professionally for parts of projects (at least one of those was a multimillion dollar job). So whatever reason I could handle that having graduated from high school in 1994 it shouldn't have become harder.

Quote:

I will test with different parts, off-the-shelf boost/buck converters, and try to face off MCUs, if I have the time (I probably will need to learn a different language for each one!
Yes and no. However because the other MCU on your list have proprietary and integrated peripherals you'll have to learn those and their quirks.

Quote:

You already pointed me to Propeller@WikiSpaces, an article on how to program in Java on this platform. Thanks :)
I just told you where to find C/C++ for the Propeller as well.

Quote:

Do you mean Mixed? Doing a google searches kept pointing me to Mixed. I probably will go for Unmixed if possible, though mixed may work if the switch times are good.
No I wrote what I wrote. An analog mux is a switch usually made from CMOS that functions as a low loss way to connect the internal input of an ADC to another external input of the chip package (in this application). So a chip might say it has 8 analog inputs but it might be 2 single ended ADC with a mux.

If that's the case you can't actually read all the inputs at the same time. You have to switch the mux.

Quote:

I am thinking that an external ADC may be the best ;)
Internal or external ADCs are beasts and the faster they run the more annoying they can be. I worked on oscilloscopes using the XMEGA in Altoids cans that you could put on the robot. 2 channels and all of that internal to the Atmel XMEGA. Cheap yes but with plenty of complications.

Another good part about knowing your external ADC and it being SPI/I2C is you can pivot that knowledge to another MCU. So let's say you decide the Propeller is a way over the top for a production product. So you leave your existing ADC circuit and put it on the other MCU.

That was a big factor in my choice in my helping to propose a 2015 control system. I wanted to know that peripherals were flexible. You could connect them to ARM, Atmel and PIC and connect those all together and the knowledge would transplant (mostly). Building blocks like LEGO instead of a limited COTS product.

yash101 17-12-2013 21:24

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by techhelpbb (Post 1313949)
Microchip and Atmel both offer 8bit MCU with comparators.
Look up the Microchip and Atmel product selectors on their websites it lists all the current production models and you can filter that list to find the ones that fit what you want.



I've gotta ask why you think that lower voltage is going to help you. At this point even the Propeller has a lower drop out voltage than most of the rest of the robot and since this is a FRC targeted idea: why do you need an even lower drop out? If the argument is: but it's another 1V or so I can drop I think you really ought to try to run one of these 2.7-5V chips a bit and see why that's not as great an idea as you think it is. You still need some voltage to drop. At some point you'll still start to brown out and it'll still be be between 3V and 4V DC.



I can't argue that you need 8 cores for what you are doing. There are many things that do not need 1 core (this is one of them). However I can point out to you, actually again, that interrupts are not a wonderful solution to a lot of problems. They create complex situations that are sometimes painfully difficult to digest and can leave you with a problem you can't easily replicate. Stalling development in a fast past environment like FRC where it might have consequences. Should you learn interrupts - yes. Does learning interrupts by necessity make them better than polling or logic: not at all. Somewhere the scientific method should help you deduce which is better for what purpose.



The first is a 32bit version of the Microchips product offering. It's not quite ARM and like the AVR MEGA it's not what most people think of as midrange or low end CPU either.

PIC and PICAXE are both 8bit Microchip PICs.
One has software in it already.

Atmel AVR and the AVR MEGA are 8bit microcontrollers.
Atmel XMEGA offer 16bit.
Atmel AVR U3 offer 32bit (think PIC32 competitor space).

The Parallax Semiconductor (previously Ubicom) chips are 8bit but fast.
I have plenty of old SX chips I don't use because anything that needs that sort of RISC speed I probably move too much data to use those chips.



Whoever told you a design can be perfect needs to look for flaws harder.

If you want to design PCB you may as well start learning how to connect parts because you can not avoid it. It's true that putting some things in the chips can reduce board complexity and the number of layers. However there are many examples of where putting something like an ADC in a chip produces a not so great example of an ADC because you can't alter the ADC to deal with system issues.

I have 2 LPKF PCB mills. I make 2 layer boards all the time. There are many examples where I am assured that I need 4 layers and even in the RF range it works as long as I respect design practice and shield.

PCB designing is a big job and requires a fair degree of knowledge. Do not fear it just learn how to do it because if you make a career out of electronics you'll be doing it again in the future.



You want the flash ISP chips then. You need to get an ISP adapter or make one probably to go from USB to ISP header (and there are different ISP headers).

The Propeller development boards come with the USB to serial adapters.
You'll be in a situation where you don't have that.
ISP is basically serial but usually it's not done these days with a serial port.

There are plenty of cheap Chinese knockoffs of the PIC and AVR ISP programmers that work great.



Best way to get experience is get experience. That said DIP has excellent durability and that's why still today a lot of military electronics are DIP. If you want SMT without soldering find an assembly house.



You are incorrect. I can outrun an MCP3204 with a Propeller but I will do it in assembler.
Now for a better question - what are you doing with that data?



Technically if you want the right tool for the right job you'd remember that you can't just program all the transistors in an MCU. You can't even do that in an FPGA. You can work with the building blocks and interfaces you are offered. In an FPGA those are logic that, if you desired, you could slap together to make a processor like the Propeller (that's how it was prototyped BTW). In an MCU/CPU those blocks are dedicated to functions and the most variability is offered by instructing those functions.

It is an illusion that analog is dead >entirely<. An analog circuit is not subject to illusion of synchronized timing to a clock. True digital has valuable contributions it can make but truly an array of programmable transistor interconnects is an analog construct it does not require a clock even if it can harness it. In fact there was a company that used to make analog programmable circuits.

I often see students trying to bang all problems with the same hammer. Anyone telling you as a student in high school you can't handle analog electronics is being dishonest. I was fixing tube televisions by 7th grade. In the context of your comments previously by the time I was in high school I was programming in assembler on 5 platforms and at least 3 of those professionally for parts of projects (at least one of those was a multimillion dollar job). So whatever reason I could handle that having graduated from high school in 1994 it shouldn't have become harder.



Yes and no. However because the other MCU on your list have proprietary and integrated peripherals you'll have to learn those and their quirks.



I just told you where to find C/C++ for the Propeller as well.



No I wrote what I wrote. An analog mux is a switch usually made from CMOS that functions as a low loss way to connect the internal input of an ADC to another external input of the chip package (in this application). So a chip might say it has 8 analog inputs but it might be 2 single ended ADC with a mux.

If that's the case you can't actually read all the inputs at the same time. You have to switch the mux.



Internal or external ADCs are beasts and the faster they run the more annoying they can be. I worked on oscilloscopes using the XMEGA in Altoids cans that you could put on the robot. 2 channels and all of that internal to the Atmel XMEGA. Cheap yes but with plenty of complications.

Another good part about knowing your external ADC and it being SPI/I2C is you can pivot that knowledge to another MCU. So let's say you decide the Propeller is a way over the top for a production product. So you leave your existing ADC circuit and put it on the other MCU.

That was a big factor in my choice in my helping to propose a 2015 control system. I wanted to know that peripherals were flexible. You could connect them to ARM, Atmel and PIC and connect those all together and the knowledge would transplant (mostly). Building blocks like LEGO instead of a limited COTS product.

I'll search for some MCUs with that features upon the start of my Christmas Break, which I am devoting to robotics!

The lower voltage won't directly help me. It will help me in the voltage regulator etcetera. I like the multi-core environment much more, the reason why I want to use a Propeller for the host controller. I will dedicate a core to the settings, a core to continuously fetch the ADC and store it's value. There will be a separate core for each regulator, making sure that the current spikes don't cause sudden voltage ups and downs. This is the reason why I will use a semi-large capacitor on the output. I like using an MCU because the frontend will allow me to change settings like the output voltage. If I can calculate how much the voltage will be increased by each switch, the frontend can be used to set exact voltage, for example, 4.9v instead of 5v. Or, if you are wierd and want something like 12v coming from a USB port (Why would anyone want that?!?!), that could be set up! MCUs are just lovely because you can customize them completely and do what you want!

I think that you will have problems in interrupt-based coding if you are used to multi-core, vice-versa. It's based on what the programmer has experience with.

I didn't know that a PICAxe was a PIC with a bootloader! That's quite interesting, and probably why it is the "PIC"Axe!

I program my Propeller in C already. However, for this project, I most-likely will switch to Assembler because of the brisker operation!

Also, I know that MCUs aren't the best thing to use. FPGAs will still beat them. However, FPGAs will lack behind building the gates yourself and creating a circuit that does NO processing! MCUs open up a world of simplicity, however, If I program an MCU wrong, I can change the code. However, redesigning a PCB can be a much more expensive process.

Compare and contrast this to a 3D printer. These make it possible for anyone to build prototypes without shelling thousands of bucks to a mold. In the other hands, using an injection molding system would mean a higher quality. Just think of an MCU as a 3D printer and an IMS as using transistors to build an autonomous system.

Sorry about that. I typically call a Mux by a Multiplexer.

You, being the guru at PAsm, probably know what can be done. With 20MIPS, an MCP3204 could be outrun, but I would have to be as good of a programmer as you, which won't happen in all of a sudden. You, being the guru, how would you code that? It seems quite complicated to run an entire set lines of code to initialize the chip, download the data and store the data in the form of a variable. Then, the same core will decide whether to switch or stay closed. Should I do it in a different method? I don't want the chip to double-switch and damage the electronics behind the regulator. I want this to be a measure twice (read:once) switch once, making sure no fatal errors exist.

For PCB design, I want to start out with CAD and slowly learn tips and tricks to improve the layout. I'm pretty sure that the CAD software should work on making sure the CAD software will optimize the layout.

What PCB layout software do you suggest? I could use Eagle, DipTrace Freeware, Fritzing, or Autodesk Autocad Electrical (My student account gives me access to this. However, it is only non-profit!)

The data from the MCP3204 will be so that the Propeller can react to the changes in the stored voltage. Hey, DO you think that it would be wise to have a high-resistance trace between the terminals of the capacitor so that it will self-discharge quickly after the power goes out? That would be a safety measure, though the voltages in the cap bank would be small

Just a random (and stupid) idea: Would it be possible to make a transformer on the PCB?

The reason why I categorized the PIC32 differently is because they have quite a high max DMIPS rating, and they seem like a different architecture to me.

Oh yes, the Chinese stuff! :) I love some of the Chinese stuff because a few products have a high quality and art dirt cheap! What about if I build an ICSP? They aren't too hard to build and I would get some soldering practice, and may even learn how to solder SMT!

Would it be better for me to fabricate the PCB myself or to have it fabricated?

:DI feel like I almost killed my Pi by writing this post on it:D

Joe Johnson 18-12-2013 00:30

Re: Battery powered raspberry pi
 
Phew! We've covered a lot of ground in that post.

How about a new tangent?

Anybody used a Rpi and the 5Mpixel camera to do anything useful on a FIRST robot?

I am thinking FIRST target ranging, but perhaps "find the big red/blue ball" would be useful as well*

If so, do tell.

Joe J.

*it has been a few years since FIRST has had a big ball as a game piece. I suppose it is about time for a game with a big ball - my money is on that or footballs this year

yash101 18-12-2013 07:52

Re: Battery powered raspberry pi
 
Though I don't know any team that has done RPi processing, I'll have to say, the RPi is unsuitable for a high speed robot lie in FRC. It's hard to get the info you need with the lag you get. However, it is much faster than cRIO processing and you may get 2-3FPS!

As with color tracking, if you wrote code like the CMUCam5, he RPi would be the killer machine, capable of many times the framerate. Why don't you try the CMUCam? It may be what you're looking for ;)


All times are GMT -5. The time now is 22:51.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi